|
| | TSetKeyFuncs (KeyFuncsType KeyFuncs, int32 ExpectedNumElements=0) |
| |
| | TSetKeyFuncs (const TSetKeyFuncs< ElementType, KeyFuncsType > &Other) |
| |
| | TSetKeyFuncs (TSetKeyFuncs< ElementType, KeyFuncsType > &&Other) |
| |
| TSetKeyFuncs & | operator= (const TSetKeyFuncs< ElementType, KeyFuncsType > &Other) |
| |
| TSetKeyFuncs & | operator= (TSetKeyFuncs< ElementType, KeyFuncsType > &&Other) |
| |
| | ~TSetKeyFuncs () |
| |
| void | SetKeyFuncs (KeyFuncsType KeyFuncs) |
| |
| void | Reset () |
| |
| void | Empty (int32 ExpectedNumElements=0) |
| |
| void | Reserve (int32 ExpectedNumElements) |
| |
| void | ResizeToTargetSize () |
| |
| int32 | Num () const |
| |
| SIZE_T | GetAllocatedSize () const |
| |
| FSetKeyFuncsStats | GetStats () const |
| |
| template<typename CompareType > |
| const ElementType * | Find (const CompareType &Key) const |
| |
| template<typename CompareType > |
| const ElementType * | FindByHash (uint32 TypeHash, const CompareType &Key) const |
| |
| void | Add (ElementType Value, bool *bAlreadyExists=nullptr) |
| |
| void | AddByHash (uint32 TypeHash, ElementType Value, bool *bAlreadyExists=nullptr) |
| |
| int32 | Remove (const ElementType &Value) |
| |
| int32 | RemoveByHash (uint32 TypeHash, const ElementType &Value) |
| |
template<
typename ElementType,
typename KeyFuncsType>
class TSetKeyFuncs< ElementType, KeyFuncsType >
Replacement for TSet that takes an instance of KeyFuncs rather than static functions on KeyFuncs.
KeyFuncs must support: struct KeyFuncs { ~KeyFuncs(); KeyFuncs(KeyFuncs&& Other); // Used in constructor and SetKeyFuncs KeyFuncs& operator=(const KeyFuncs& Other); // Used in TSetKeyFuncs operator=(const TSetKeyFuncs&) KeyFuncs& operator=(KeyFuncs&& Other); // Used in TSetKeyFuncs operator=(TSetKeyFuncs&&)
// Functions needed for ElementType ElementType GetInvalidElement(); bool IsInvalid(const ElementType&); uint32 GetTypeHash(const ElementType&); bool Matches(const ElementType& Element, const ElementType& Comparison);
// Functions needed for each ComparisonType passed into Find bool Matches(const ElementType& Element, const ComparisonType& Comparison); uint32 GetTypeHash(const ComparisonType&); };
ElementType must support: ElementType(const ElementType& Other) ElementType(ElementType&& Other)