template<typename TYPE>
class maxon::SetInterface< TYPE >
SetInterface is an interface which provides the usual set functions as virtual methods. Each standard set of the MAXON API can be represented as such an interface, so this allows to write non-template functions which nevertheless are able to deal with any kind of set.
The access to the set happens via virtual methods, so there is an inevitable performance penalty, but this will be negligible for most use cases.
For a set which shall be modified, use WritableSetInterface as type of the function parameter instead.
- Template Parameters
-
TYPE | Type of elements of the set. |
|
MAXON_METHOD Int | GetCount () const |
|
MAXON_FUNCTION Bool | IsEmpty () const |
|
MAXON_FUNCTION Bool | IsPopulated () const |
|
MAXON_METHOD Bool | Contains (const TYPE &value) const |
|
MAXON_METHOD Result< void > | Insert (const TYPE &value, Bool &added=BoolLValue()) |
|
MAXON_METHOD Result< void > | Insert (TYPE &&value, Bool &added=BoolLValue()) |
|
MAXON_METHOD Result< Bool > | Erase (const TYPE &value) |
|
MAXON_METHOD Iterator | Erase (const Iterator &iterator) |
|
MAXON_METHOD void | Reset () |
|
MAXON_METHOD void | Flush () |
|
MAXON_METHOD Result< void > | CopyFrom (const SetInterface &other) |
|
MAXON_METHOD Result< SetInterface * > | Clone (Bool copyContent=true) const |
|
MAXON_METHOD const DataType & | GetValueDataType () const |
|
MAXON_METHOD String | ToString (const FormatStatement *formatStatement=nullptr) const |
|
MAXON_METHOD Int | GetMemorySize () const |
|
| MAXON_ADD_TO_CONST_REFERENCE_CLASS (HashInt GetHashCode() const { CriticalStop("Not implemented.");return 0;};) |
|
template<typename T > |
MAXON_FUNCTION Bool | HasType () const |
|
template<typename T > |
MAXON_FUNCTION void | AssertType () const |
|
template<typename T > |
SetInterface< T > & | AssertCast () |
|
template<typename T > |
const SetInterface< T > & | AssertCast () const |
|
| operator const SetInterface< typename std::conditional< STD_IS_REPLACEMENT (same, const TYPE, const Generic) |
|
| operator SetInterface< typename std::conditional< STD_IS_REPLACEMENT (same, TYPE, Generic) |
|
Generic ::type & | operator const NonConstSet< TYPE > & () |
|
| operator const NonConstSet< typename std::conditional< STD_IS_REPLACEMENT (same, TYPE, Generic) |
|
ConstIterator | Begin () const |
|
Iterator | Begin () |
|
ConstIterator | End () const |
|
Iterator | End () |
|
MAXON_ATTRIBUTE_FORCE_INLINE | SetBase0 (ARGS &&... args) |
|
MAXON_ATTRIBUTE_FORCE_INLINE ResultRef< const TYPE > | Append (typename ByValueParam< TYPE >::type v) |
|
Bool | ContainsAllImpl (COLLECTION2 &&other, OverloadRank0) const |
|
MAXON_ATTRIBUTE_FORCE_INLINE Result< void > | Add (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) |
|
MAXON_ATTRIBUTE_FORCE_INLINE Result< void > | AppendAll (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) |
|
MAXON_ATTRIBUTE_FORCE_INLINE Result< void > | CopyFrom (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::FIT_TO_SIZE) |
|
Result< void > | SubtractImpl (COLLECTION2 &&other, OverloadRank0) |
|
Bool | IsEqualImpl (const COLLECTION2 &other, COMPARE &&cmp, OverloadRank0) const |
|
HashInt | GetHashCode () const |
|
UniqueHash | GetUniqueHashCode () const |
|
template<typename... ARGS> |
MAXON_ATTRIBUTE_FORCE_INLINE | Collection (ARGS &&... args) |
|
ResultOk< void > | VariadicAppend () |
|
template<typename V , typename... VALUES> |
Result< void > | VariadicAppend (V &&value, VALUES &&... rest) |
|
| operator ValueReceiver< const VALUETYPE & > () |
|
| operator ValueReceiver< VALUETYPE && > () |
|
| operator ValueReceiver< typename std::conditional< STD_IS_REPLACEMENT (scalar, VALUETYPE) |
|
DummyParamType & | type () |
|
template<typename FN > |
Result< Bool > | ForEach (FN &&callback) const |
|
template<typename FN > |
Result< Bool > | ForEach (FN &&callback) |
|
template<typename H = COLLECTION> |
H::Iterator | Find (typename ByValueParam< VALUETYPE >::type v) |
|
template<typename H = COLLECTION> |
H::ConstIterator | Find (typename ByValueParam< VALUETYPE >::type v) const |
|
Int | FindIndex (typename ByValueParam< VALUETYPE >::type v) const |
|
MAXON_ATTRIBUTE_FORCE_INLINE Bool | Contains (typename ByValueParam< VALUETYPE >::type v) const |
|
template<typename... ARGS> |
MAXON_ATTRIBUTE_FORCE_INLINE | BaseCollection (ARGS &&... args) |
|
template<typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if< maxon::IsCollection< COLLECTION2 >::value, Bool >::type | operator== (const COLLECTION2 &other) const |
|
template<typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if< maxon::IsCollection< COLLECTION2 >::value, Bool >::type | operator!= (const COLLECTION2 &other) const |
|
template<typename COMPARE = EqualityCompare, typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if< maxon::IsCollection< COLLECTION2 >::value &&!STD_IS_REPLACEMENT(same, typename std::decay< COMPARE >::type, EQUALITY), Bool >::type | IsEqual (const COLLECTION2 &other, COMPARE &&cmp=COMPARE()) const |
|
template<typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE Result< void > | AppendAll (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) |
|
template<typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE Result< void > | CopyFrom (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::FIT_TO_SIZE) |
|
template<typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE Result< void > | Subtract (COLLECTION2 &&other) |
|
template<typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE Result< void > | Intersect (const COLLECTION2 &other) |
|
template<typename COLLECTION2 > |
Bool | Intersects (const COLLECTION2 &other) const |
|
template<typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE Result< void > | CopyFromImpl (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags, OverloadRank0) |
|
template<typename COLLECTION2 > |
Result< void > | AppendAllImpl (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags, Bool overwrite, OverloadRank0) |
|
template<typename COLLECTION2 > |
Result< void > | IntersectImpl (COLLECTION2 &&other, OverloadRank0) |
|
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsEmpty () const |
|
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsPopulated () const |
|
String | ToString (const FormatStatement *formatStatement=nullptr) const |
|
template<typename COLLECTION2 > |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | ContainsAll (COLLECTION2 &&other) const |
|
template<typename COLLECTION2 > |
Bool | ContainsAllImpl (COLLECTION2 &&other, OverloadRank0) const |
|