TNB Library
|
比較機能インターフェース. [詳解]
#include <TnbComparable.h>
公開メンバ関数 | |
virtual INT_PTR | Compare (const TYP &t) const =0 |
[確認] 比較 [詳解] | |
virtual bool | IsEqual (const TYP &t) const |
[確認] 比較 [詳解] | |
bool | operator!= (const TYP &t) const |
[確認] 比較 [詳解] | |
INT_PTR | operator- (const TYP &t) const |
[確認] 比較 [詳解] | |
bool | operator< (const TYP &t) const |
[確認] 比較 [詳解] | |
bool | operator<= (const TYP &t) const |
[確認] 比較 [詳解] | |
bool | operator== (const TYP &t) const |
[確認] 比較 [詳解] | |
bool | operator> (const TYP &t) const |
[確認] 比較 [詳解] | |
bool | operator>= (const TYP &t) const |
[確認] 比較 [詳解] | |
virtual | ~IComparableT (void) |
デストラクタ [詳解] | |
比較機能インターフェース.
このインターフェースを継承し、 Compare() をオーバーロードすることで、 その型に比較機能を実装することが出来ます( == や <= などで比較可能)。
struct TMyType : IComparableT<TMyType> { int i; INT_PTR Compare(const TMyType& t) const { return i - t.i; } }; |
TYP | 実装するクラスを指定します。 |
TnbComparable.h の 53 行目に定義があります。
|
virtual |
デストラクタ
TnbComparable.h の 56 行目に定義があります。
|
pure virtual |
[確認] 比較
t | 比較対象 |
0 | 自分は t と同じ |
1以上 | 自分は t より大きい |
0未満 | 自分は t より小さい |
CBitSet, CDoubleNullTerminateStr, CFileTimeEx, CHashableT< TYP >, CJisStr, CNullableT< TYP >, CSystemTime, CTmlValue, CUtf8Str, IConstCollectionT< bool >, IConstCollectionT< BYTE >, IConstCollectionT< CArrayPtrHandleT< TCHAR > >, IConstCollectionT< CArVaVector >, IConstCollectionT< CAscii >, IConstCollectionT< CCursorManager * >, IConstCollectionT< CDrawersVector >, IConstCollectionT< CFileInfoArray >, IConstCollectionT< char >, IConstCollectionT< CPointerHandleT< IDrawable > >, IConstCollectionT< CStr >, IConstCollectionT< CTmlValue >, IConstCollectionT< CVaVaVector >, IConstCollectionT< CVectorT< BYTE > >, IConstCollectionT< DWORD >, IConstCollectionT< EAttr >, IConstCollectionT< EKind >, IConstCollectionT< HICON >, IConstCollectionT< IDrawable::Ptr >, IConstCollectionT< INDEX >, IConstCollectionT< KEY >, IConstCollectionT< POINT >, IConstCollectionT< short >, IConstCollectionT< SOCKET >, IConstCollectionT< TBindWork * >, IConstCollectionT< TCHAR >, IConstCollectionT< TFuncInfo >, IConstCollectionT< TInfo >, IConstCollectionT< TNB::CArrayPtrHandleT< TParam > >, IConstCollectionT< TNB::CArrayPtrHandleT< TYP > >, IConstCollectionT< TNB::CGrammarAnalyzerT >, IConstCollectionT< TNB::CGrid::TFieldInfo >, IConstCollectionT< TNB::CListQueueT< TYP > >, IConstCollectionT< TNB::CMailAddress >, IConstCollectionT< TNB::CMultiFontTextDrawer::TPart >, IConstCollectionT< TNB::CNmea0183::TGpGsv >, IConstCollectionT< TNB::CPacketCommander::CInner::TTask * >, IConstCollectionT< TNB::CPairT >, IConstCollectionT< TNB::CPairT< CAscii, CAscii > >, IConstCollectionT< TNB::CPairT< COLORREF, CPointerHandleT< TPointInfo > > >, IConstCollectionT< TNB::CPairT< DWORD, TYP > >, IConstCollectionT< TNB::CPairT< FOURCC, TChunkMap > >, IConstCollectionT< TNB::CPairT< FOURCC, TNB::CStrT > >, IConstCollectionT< TNB::CPairT< HTREEITEM, CPointerHandleT< IDrawable > > >, IConstCollectionT< TNB::CPairT< int, HICON > >, IConstCollectionT< TNB::CPairT< KEY, VAL > >, IConstCollectionT< TNB::CPairT< PROPID, CTagInfo > >, IConstCollectionT< TNB::CPairT< T, T > >, IConstCollectionT< TNB::CPairT< TNB::CStrT, CVectorT< BYTE > > >, IConstCollectionT< TNB::CPairT< TNB::CStrT, TNB::CMapT > >, IConstCollectionT< TNB::CPairT< TNB::CStrT, TNB::CSingleSetT< TNB::CStrT > > >, IConstCollectionT< TNB::CPointerHandleT< CCursorManager > >, IConstCollectionT< TNB::CPointerHandleT< TBindWork > >, IConstCollectionT< TNB::CPointerHandleT< TNB::CShapeFile::IRecordContent > >, IConstCollectionT< TNB::CPointerHandleT< TNB::MFC::CDrawingSubMenu > >, IConstCollectionT< TNB::CPointerHandleT< TYP > >, IConstCollectionT< TNB::CShapeFile::IRecordContent * >, IConstCollectionT< TNB::CStrT< TYP > >, IConstCollectionT< TNB::CTmlDocuments::TFileInfo::TFunc >, IConstCollectionT< TNB::CVectorT >, IConstCollectionT< TNB::MFC::CColorfulListBox::CColor::TParam >, IConstCollectionT< TNB::MFC::CDrawingSubMenu * >, IConstCollectionT< TParam * >, IConstCollectionT< TParam >, IConstCollectionT< TValue >, IConstCollectionT< TYP * >, IConstCollectionT< TYP >, IConstCollectionT< UINT >, IConstCollectionT< VAL >, IConstCollectionT< WORD > (計79項目)で実装されています。
|
virtual |
[確認] 比較
t | 比較対象 |
true | 自分は t と同じ |
false | 自分は t と異なる |
CHashableT< TYP >, IConstCollectionT< bool >, IConstCollectionT< BYTE >, IConstCollectionT< CArrayPtrHandleT< TCHAR > >, IConstCollectionT< CArVaVector >, IConstCollectionT< CAscii >, IConstCollectionT< CCursorManager * >, IConstCollectionT< CDrawersVector >, IConstCollectionT< CFileInfoArray >, IConstCollectionT< char >, IConstCollectionT< CPointerHandleT< IDrawable > >, IConstCollectionT< CStr >, IConstCollectionT< CTmlValue >, IConstCollectionT< CVaVaVector >, IConstCollectionT< CVectorT< BYTE > >, IConstCollectionT< DWORD >, IConstCollectionT< EAttr >, IConstCollectionT< EKind >, IConstCollectionT< HICON >, IConstCollectionT< IDrawable::Ptr >, IConstCollectionT< INDEX >, IConstCollectionT< KEY >, IConstCollectionT< POINT >, IConstCollectionT< short >, IConstCollectionT< SOCKET >, IConstCollectionT< TBindWork * >, IConstCollectionT< TCHAR >, IConstCollectionT< TFuncInfo >, IConstCollectionT< TInfo >, IConstCollectionT< TNB::CArrayPtrHandleT< TParam > >, IConstCollectionT< TNB::CArrayPtrHandleT< TYP > >, IConstCollectionT< TNB::CGrammarAnalyzerT >, IConstCollectionT< TNB::CGrid::TFieldInfo >, IConstCollectionT< TNB::CListQueueT< TYP > >, IConstCollectionT< TNB::CMailAddress >, IConstCollectionT< TNB::CMultiFontTextDrawer::TPart >, IConstCollectionT< TNB::CNmea0183::TGpGsv >, IConstCollectionT< TNB::CPacketCommander::CInner::TTask * >, IConstCollectionT< TNB::CPairT >, IConstCollectionT< TNB::CPairT< CAscii, CAscii > >, CMapT< CAscii, CAscii, LPCSTR >, IConstCollectionT< TNB::CPairT< COLORREF, CPointerHandleT< TPointInfo > > >, CMapT< COLORREF, CPointerHandleT< TPointInfo > >, IConstCollectionT< TNB::CPairT< DWORD, TYP > >, CMapT< DWORD, TYP >, IConstCollectionT< TNB::CPairT< FOURCC, TChunkMap > >, CMapT< FOURCC, TChunkMap >, IConstCollectionT< TNB::CPairT< FOURCC, TNB::CStrT > >, CMapT< FOURCC, TNB::CStrT >, IConstCollectionT< TNB::CPairT< HTREEITEM, CPointerHandleT< IDrawable > > >, CMapT< HTREEITEM, CPointerHandleT< IDrawable > >, IConstCollectionT< TNB::CPairT< int, HICON > >, CMapT< int, HICON >, IConstCollectionT< TNB::CPairT< KEY, VAL > >, CMapT< KEY, VAL, INK >, IConstCollectionT< TNB::CPairT< PROPID, CTagInfo > >, CMapT< PROPID, CTagInfo >, IConstCollectionT< TNB::CPairT< T, T > >, IConstCollectionT< TNB::CPairT< TNB::CStrT, CVectorT< BYTE > > >, CMapT< TNB::CStrT, CVectorT< BYTE > >, IConstCollectionT< TNB::CPairT< TNB::CStrT, TNB::CMapT > >, CMapT< TNB::CStrT, TNB::CMapT, LPCTSTR >, IConstCollectionT< TNB::CPairT< TNB::CStrT, TNB::CSingleSetT< TNB::CStrT > > >, CMapT< TNB::CStrT, TNB::CSingleSetT< TNB::CStrT > >, IConstCollectionT< TNB::CPointerHandleT< CCursorManager > >, IConstCollectionT< TNB::CPointerHandleT< TBindWork > >, IConstCollectionT< TNB::CPointerHandleT< TNB::CShapeFile::IRecordContent > >, IConstCollectionT< TNB::CPointerHandleT< TNB::MFC::CDrawingSubMenu > >, IConstCollectionT< TNB::CPointerHandleT< TYP > >, IConstCollectionT< TNB::CShapeFile::IRecordContent * >, IConstCollectionT< TNB::CStrT< TYP > >, IConstCollectionT< TNB::CTmlDocuments::TFileInfo::TFunc >, IConstCollectionT< TNB::CVectorT >, IConstCollectionT< TNB::MFC::CColorfulListBox::CColor::TParam >, IConstCollectionT< TNB::MFC::CDrawingSubMenu * >, IConstCollectionT< TParam * >, IConstCollectionT< TParam >, IConstCollectionT< TValue >, IConstCollectionT< TYP * >, IConstCollectionT< TYP >, IConstCollectionT< UINT >, IConstCollectionT< VAL >, IConstCollectionT< WORD > (計83項目)で再実装されています。
TnbComparable.h の 73 行目に定義があります。
bool operator!= | ( | const TYP & | t | ) | const |
INT_PTR operator- | ( | const TYP & | t | ) | const |
bool operator< | ( | const TYP & | t | ) | const |
bool operator<= | ( | const TYP & | t | ) | const |
bool operator== | ( | const TYP & | t | ) | const |
bool operator> | ( | const TYP & | t | ) | const |
bool operator>= | ( | const TYP & | t | ) | const |