#include <collection.h>
Public Types | |
using | MapType = COLLECTION |
using | Super = BaseCollection< COLLECTION, SUPER > |
using | KeyType = KEYTYPE |
using | ValueType = VALUETYPE |
Public Types inherited from BaseCollection< COLLECTION, SUPER > | |
using | IsCollection = std::true_type |
using | IsBaseArray = std::false_type |
Public Member Functions | |
template<typename... ARGS> | |
MAXON_ATTRIBUTE_FORCE_INLINE | MapBase0 (ARGS &&... args) |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | Contains (typename ByValueParam< KEYTYPE >::type key) const |
template<typename PAIR > | |
MAXON_ATTRIBUTE_FORCE_INLINE SFINAEHelper< Bool, typename PAIR::KeyType >::type | Contains (const PAIR &pair) const |
ResultRef< VALUETYPE > | Append (const KEYTYPE &key) |
template<typename PAIR > | |
SFINAEHelper< ResultRef< VALUETYPE >, typename PAIR::KeyType >::type | Append (const PAIR &pair) |
template<typename COLLECTION2 > | |
Result< void > | Add (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) |
template<typename COLLECTION2 > | |
Result< void > | AppendAll (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY) |
template<typename COLLECTION2 > | |
Result< void > | AppendAllInverse (COLLECTION2 &&other) |
template<typename COLLECTION2 > | |
Bool | ContainsAllImpl (COLLECTION2 &&other, OverloadRank0) const |
template<typename COLLECTION2 > | |
Result< void > | SubtractImpl (COLLECTION2 &&other, OverloadRank0) |
template<typename COLLECTION2 , typename COMPARE > | |
Bool | IsEqualImpl (const COLLECTION2 &other, COMPARE &&cmp, OverloadRank0) const |
HashInt | GetHashCode () const |
UniqueHash | GetUniqueHashCode () const |
Public Member Functions inherited from BaseCollection< COLLECTION, SUPER > | |
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 |
Static Public Member Functions | |
static const KEYTYPE & | GetMapKey (const KEYTYPE &key) |
template<typename PAIR > | |
static const KEYTYPE & | GetMapKey (const PAIR &pair) |
Static Public Attributes | |
static const COLLECTION_KIND | KIND |
using MapType = COLLECTION |
using Super = BaseCollection<COLLECTION, SUPER> |
using KeyType = KEYTYPE |
using ValueType = VALUETYPE |
|
explicit |
MAXON_ATTRIBUTE_FORCE_INLINE Bool Contains | ( | typename ByValueParam< KEYTYPE >::type | key | ) | const |
Returns true if key
is contained in this map.
[in] | key | The key to look for. |
key
, false otherwise. MAXON_ATTRIBUTE_FORCE_INLINE SFINAEHelper<Bool, typename PAIR::KeyType>::type Contains | ( | const PAIR & | pair | ) | const |
Returns true if the key of pair
is mapped to the value of pair
in this map.
[in] | pair | The key-value-pair to look for. |
pair
, false otherwise.
|
static |
|
static |
ResultRef<VALUETYPE> Append | ( | const KEYTYPE & | key | ) |
SFINAEHelper<ResultRef<VALUETYPE>, typename PAIR::KeyType>::type Append | ( | const PAIR & | pair | ) |
Result<void> Add | ( | COLLECTION2 && | other, |
COLLECTION_RESIZE_FLAGS | resizeFlags = COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY |
||
) |
Adds all key-value-mappings from other to this map. Existing entries will be kept, even those with a key contained in other. other has to be a data structure supported by AutoIterator (such as a HashMap or one of the array classes), and its values have to have GetKey() and GetValue() functions. If adding doesn't succeed for all entries, the map will be left in a valid, but intermediate state with only some entries from src added.
[in] | other | Source from which the entries are taken. |
[in] | resizeFlags | If ON_GROW_FIT_TO_SIZE is set, the collection will use only as much memory as needed to hold the data. |
Result<void> AppendAll | ( | COLLECTION2 && | other, |
COLLECTION_RESIZE_FLAGS | resizeFlags = COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY |
||
) |
Adds all key-value-mappings from other to this map. Existing entries will be overwritten if other has an entry with equal key. other has to be a data structure supported by AutoIterator (such as a HashMap or one of the array classes), and its values have to have GetKey() and GetValue() functions. If adding doesn't succeed for all entries, the map will be left in a valid, but intermediate state with only some entries from src added.
[in] | other | Source from which the entries are taken. |
[in] | resizeFlags | If ON_GROW_FIT_TO_SIZE is set, the collection will use only as much memory as needed to hold the data. |
Result<void> AppendAllInverse | ( | COLLECTION2 && | other | ) |
Adds the inverse of all key-value-mappings from other to this map, i.e., the values will be used as keys and vice versa. Existing entries will be overwritten if other has values which equal existing keys. other has to be an iterable object where the values have GetKey() and GetValue() functions. If adding doesn't succeed for all entries, the map will be left in a valid, but intermediate state with only some entries from src added.
[in] | other | Source from which the entries are taken. |
Bool ContainsAllImpl | ( | COLLECTION2 && | other, |
OverloadRank0 | |||
) | const |
Returns true if this collection contains all elements from another collection other
, i.e., if this collection is a superset of other
.
[in] | other | Another collection, may be a foreach iterator over which it will be iterated. |
other
, false otherwise. Result<void> SubtractImpl | ( | COLLECTION2 && | other, |
OverloadRank0 | |||
) |
Bool IsEqualImpl | ( | const COLLECTION2 & | other, |
COMPARE && | cmp, | ||
OverloadRank0 | |||
) | const |
HashInt GetHashCode | ( | ) | const |
UniqueHash GetUniqueHashCode | ( | ) | const |
|
static |