MapBase0< COLLECTION, KEYTYPE, VALUETYPE, SUPER, HASH > Class Template Reference Data Structures

#include <collection.h>

Inheritance diagram for MapBase0< COLLECTION, KEYTYPE, VALUETYPE, SUPER, HASH >:

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

公共成员函数

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 >  添加 (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
-  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 const KEYTYPE &  GetMapKey (const KEYTYPE &key)
template<typename PAIR >
static const KEYTYPE &  GetMapKey (const PAIR &pair)

静态公共属性

static const COLLECTION_KIND   KIND

Member Typedef Documentation

◆  MapType

using MapType = COLLECTION

◆  Super

using Super = BaseCollection <COLLECTION, SUPER>

◆  KeyType

using KeyType = KEYTYPE

◆  ValueType

using ValueType = VALUETYPE

构造函数 & 析构函数文档编制

◆  MapBase0()

MAXON_ATTRIBUTE_FORCE_INLINE MapBase0 ( ARGS &&...  args )
explicit

成员函数文档编制

◆  Contains() [1/2]

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.
返回
True if this map has an enty whose key equals key , false otherwise.

◆  Contains() [2/2]

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.
返回
True if this map has an enty which matches pair , false otherwise.

◆  GetMapKey() [1/2]

static const KEYTYPE& GetMapKey ( const KEYTYPE &  key )
static

◆  GetMapKey() [2/2]

static const KEYTYPE& GetMapKey ( const PAIR &  pair )
static

◆  Append() [1/2]

ResultRef <VALUETYPE> Append ( const KEYTYPE &  key )

◆  Append() [2/2]

SFINAEHelper < ResultRef <VALUETYPE>, typename PAIR::KeyType>::type Append ( const PAIR &  pair )

◆  Add()

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.
返回
True if adding succeeded.

◆  AppendAll()

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.
返回
True if adding succeeded.

◆  AppendAllInverse()

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.
返回
True if adding succeeded.

◆  ContainsAllImpl()

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.
返回
True if this collection contains all elements from other , false otherwise.

◆  SubtractImpl()

Result <void> SubtractImpl ( COLLECTION2 &&  other ,
OverloadRank0    
)

◆  IsEqualImpl()

Bool IsEqualImpl ( const COLLECTION2 &  other ,
COMPARE &&  cmp ,
OverloadRank0    
) const

◆  GetHashCode()

HashInt GetHashCode ( ) const

Member Data Documentation

◆  KIND

const COLLECTION_KIND KIND static