NonConstMap< K, V > Class Template Reference

#include <map.h>

Inheritance diagram for NonConstMap< K, V >:

Public Types

using Super = MapInterface< K, V >
 
using ConstIterator = typename Super::Iterator
 
- Public Types inherited from MapInterface< K, V >
using KeyType = K
 
using ValueType = V
 
using Iterator = IteratorTemplate< false >
 
using ConstIterator = IteratorTemplate< true >
 
- Public Types inherited from MapBase0< MapInterface< K, V >, K, V, EmptyClass, DefaultCompare >
using MapType = MapInterface< K, V >
 
using Super = BaseCollection< MapInterface< K, V >, EmptyClass >
 
using KeyType = K
 
using ValueType = V
 
- Public Types inherited from BaseCollection< COLLECTION, SUPER >
using IsCollection = std::true_type
 
using IsBaseArray = std::false_type
 

Public Member Functions

const NonConstMapToMap () const
 
NonConstMapToMap ()
 
 operator const NonConstMap< Generic, typename std::conditional< STD_IS_REPLACEMENT (same, V, Generic)
 
ResultRef< V > InsertKey (const K &key, Bool &created=BoolLValue()) const
 
ResultRef< V > InsertKey (K &&key, Bool &created=BoolLValue()) const
 
template<typename VALUE >
ResultRef< V > Insert (const K &key, VALUE &&value, Bool &created=BoolLValue()) const
 
template<typename VALUE >
ResultRef< V > Insert (K &&key, VALUE &&value, Bool &created=BoolLValue()) const
 
V * FindValue (const K &key) const
 
Result< BoolErase (const K &key) const
 
ConstIterator Erase (const ConstIterator &iterator) const
 
void Reset () const
 
void Flush () const
 
Result< void > CopyFrom (const Super &other) const
 
ConstIterator Begin () const
 
ConstIterator End () const
 
- Public Member Functions inherited from MapInterface< K, V >
MAXON_METHOD Int GetCount () const
 
MAXON_FUNCTION Bool IsEmpty () const
 
MAXON_FUNCTION Bool IsPopulated () const
 
MAXON_METHOD ResultRef< V > InsertKey (const K &key, Bool &created=BoolLValue())
 
MAXON_METHOD ResultRef< V > InsertKey (K &&key, Bool &created=BoolLValue())
 
template<typename VALUE >
MAXON_FUNCTION ResultRef< V > Insert (const K &key, VALUE &&value, Bool &created=BoolLValue())
 
template<typename VALUE >
MAXON_FUNCTION ResultRef< V > Insert (K &&key, VALUE &&value, Bool &created=BoolLValue())
 
MAXON_METHOD V * FindValue (const K &key)
 
MAXON_METHOD const V * FindValue (const K &key) const
 
MAXON_METHOD Result< BoolErase (const K &key)
 
MAXON_METHOD Iterator Erase (const Iterator &iterator)
 
MAXON_METHOD void Reset ()
 
MAXON_METHOD void Flush ()
 
MAXON_METHOD Result< void > CopyFrom (const MapInterface &other)
 
MAXON_METHOD Result< MapInterface * > Clone (Bool copyContent=true) const
 
MAXON_METHOD const DataTypeGetKeyDataType () const
 
MAXON_METHOD const DataTypeGetValueDataType () 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 KT , typename VT >
MAXON_FUNCTION Bool HasType () const
 
template<typename KT , typename VT >
MAXON_FUNCTION void AssertType () const
 
template<typename KT , typename VT >
MapInterface< KT, VT > & AssertCast ()
 
template<typename KT , typename VT >
const MapInterface< KT, VT > & AssertCast () const
 
 operator const MapInterface< K, const V > & () const
 
 operator const MapInterface< Generic, typename std::conditional< STD_IS_REPLACEMENT (same, const V, const Generic)
 
 operator MapInterface< Generic, typename std::conditional< STD_IS_REPLACEMENT (same, V, Generic)
 
Generic ::typeoperator const NonConstMap< K, V > & ()
 
 operator const NonConstMap< Generic, typename std::conditional< STD_IS_REPLACEMENT (same, V, Generic)
 
ConstIterator Begin () const
 
Iterator Begin ()
 
ConstIterator End () const
 
Iterator End ()
 
- Public Member Functions inherited from MapBase0< MapInterface< K, V >, K, V, EmptyClass, DefaultCompare >
MAXON_ATTRIBUTE_FORCE_INLINE MapBase0 (ARGS &&... args)
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool Contains (typename ByValueParam< K >::type key) const
 
MAXON_ATTRIBUTE_FORCE_INLINE SFINAEHelper< Bool, typename PAIR::KeyType >::type Contains (const PAIR &pair) const
 
ResultRef< V > Append (const K &key)
 
SFINAEHelper< ResultRef< V >, typename PAIR::KeyType >::type Append (const PAIR &pair)
 
Result< void > Add (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY)
 
Result< void > AppendAll (COLLECTION2 &&other, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY)
 
Result< void > AppendAllInverse (COLLECTION2 &&other)
 
Bool ContainsAllImpl (COLLECTION2 &&other, OverloadRank0) const
 
Result< void > SubtractImpl (COLLECTION2 &&other, OverloadRank0)
 
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
 

Public Attributes

 DeleteReturnType01
 
Generic ::typeconst
 
- Public Attributes inherited from MapInterface< K, V >
 DeleteReturnType01
 
const Generic ::typeconst
 
 DeleteReturnType02
 
 DeleteReturnType03
 

Protected Member Functions

 NonConstMap (const typename Super::MTable &vtable)
 
 ~NonConstMap ()
 

Private Member Functions

 MAXON_DISALLOW_COPY_AND_ASSIGN (NonConstMap)
 

Additional Inherited Members

- Static Public Member Functions inherited from MapBase0< MapInterface< K, V >, K, V, EmptyClass, DefaultCompare >
static const K & GetMapKey (const K &key)
 
static const K & GetMapKey (const PAIR &pair)
 
- Static Public Attributes inherited from MapBase0< MapInterface< K, V >, K, V, EmptyClass, DefaultCompare >
static const COLLECTION_KIND KIND
 

Member Typedef Documentation

◆ Super

using Super = MapInterface<K, V>

◆ ConstIterator

using ConstIterator = typename Super::Iterator

Constructor & Destructor Documentation

◆ NonConstMap()

NonConstMap ( const typename Super::MTable &  vtable)
explicitprotected

◆ ~NonConstMap()

~NonConstMap ( )
protected

Member Function Documentation

◆ ToMap() [1/2]

const NonConstMap& ToMap ( ) const

◆ ToMap() [2/2]

NonConstMap& ToMap ( )

◆ operator const NonConstMap< Generic, typename std::conditional< STD_IS_REPLACEMENT()

operator const NonConstMap< Generic, typename std::conditional< STD_IS_REPLACEMENT ( same  ,
,
Generic   
)

◆ InsertKey() [1/2]

ResultRef<V> InsertKey ( const K &  key,
Bool created = BoolLValue() 
) const

◆ InsertKey() [2/2]

ResultRef<V> InsertKey ( K &&  key,
Bool created = BoolLValue() 
) const

◆ Insert() [1/2]

ResultRef<V> Insert ( const K &  key,
VALUE &&  value,
Bool created = BoolLValue() 
) const

◆ Insert() [2/2]

ResultRef<V> Insert ( K &&  key,
VALUE &&  value,
Bool created = BoolLValue() 
) const

◆ FindValue()

V* FindValue ( const K &  key) const

◆ Erase() [1/2]

Result<Bool> Erase ( const K &  key) const

◆ Erase() [2/2]

ConstIterator Erase ( const ConstIterator iterator) const

◆ Reset()

void Reset ( ) const

◆ Flush()

void Flush ( ) const

◆ CopyFrom()

Result<void> CopyFrom ( const Super other) const

◆ Begin()

ConstIterator Begin ( ) const

◆ End()

ConstIterator End ( ) const

◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( NonConstMap< K, V >  )
private

Member Data Documentation

◆ DeleteReturnType01

DeleteReturnType01

◆ const

Generic ::type& const