MapImpl< MAP > Class Template Reference

#include <map.h>

Inheritance diagram for MapImpl< MAP >:

Public Types

using MapType = typename std::decay< MAP >::type
 
using KeyType = typename MapType::KeyType
 
using ValueType = typename ConstIf< typename MapType::ValueType, CONSTMAP >::type
 
using NonConstValueType = typename std::remove_const< ValueType >::type
 
using Super = typename std::conditional< CONSTMAP||!REFERENCE, MapInterface< KeyType, ValueType >, NonConstMap< KeyType, ValueType > >::type
 
using Interface = typename Super::Interface
 
using Iterator = typename Interface::Iterator
 
using ConstIterator = typename Interface::ConstIterator
 

Public Member Functions

 MAXON_IMPLEMENTATION_SIMPLE (MapImpl)
 
 MapImpl ()
 
 MapImpl (MAP &&map)
 
 MapImpl (MapImpl &&src)
 
Int GetCount () const
 
ResultRef< NonConstValueTypeInsertKey (const KeyType &key, Bool &created=BoolLValue())
 
ResultRef< NonConstValueTypeInsertKey (KeyType &&key, Bool &created=BoolLValue())
 
NonConstValueTypeFindValue (const KeyType &key)
 
const ValueTypeFindValue (const KeyType &key) const
 
Result< BoolErase (const KeyType &key)
 
Iterator Erase (const Iterator &iterator)
 
Result< void > CopyFrom (const Interface &other)
 
Result< Interface * > Clone (Bool copyContent) const
 
String ToString (const FormatStatement *formatStatement=nullptr) const
 
Int GetMemorySize () const
 
const DataTypeGetKeyDataType () const
 
const DataTypeGetValueDataType () const
 
void Reset ()
 
void Flush ()
 
void IteratorInit (Iterator *it, Bool end)
 
void IteratorInit (ConstIterator *it, Bool end) const
 
void IteratorInitMove (Iterator *dest, Iterator *src) const
 
void IteratorInitMove (ConstIterator *dest, ConstIterator *src) const
 
void IteratorFree (Iterator *it) const
 
void IteratorFree (ConstIterator *it) const
 
Bool IteratorIsEqual (const Iterator *a, const Iterator *b) const
 
Bool IteratorIsEqual (const ConstIterator *a, const ConstIterator *b) const
 
void IteratorInc (Iterator *it) const
 
void IteratorInc (ConstIterator *it) const
 
Pair< const KeyType &, ValueType & > IteratorGet (const Iterator *it) const
 
Pair< const KeyType &, const ValueType & > IteratorGet (const ConstIterator *it) const
 
std::add_lvalue_reference< MAP >::type GetMap ()
 
const MapTypeGetMap () const
 

Static Public Attributes

static const Bool CONSTMAP
 
static const Bool REFERENCE
 

Private Member Functions

 MAXON_DISALLOW_COPY_AND_ASSIGN (MapImpl)
 

Static Private Member Functions

static MapType::Iterator & GetIterator (Iterator *it)
 
static MapType::ConstIterator & GetIterator (ConstIterator *it)
 
static const MapType::Iterator & GetIterator (const Iterator *it)
 
static const MapType::ConstIterator & GetIterator (const ConstIterator *it)
 

Private Attributes

MAP _map
 

Member Typedef Documentation

◆ MapType

using MapType = typename std::decay<MAP>::type

◆ KeyType

using KeyType = typename MapType::KeyType

◆ ValueType

using ValueType = typename ConstIf<typename MapType::ValueType, CONSTMAP>::type

◆ NonConstValueType

using NonConstValueType = typename std::remove_const<ValueType>::type

◆ Super

using Super = typename std::conditional<CONSTMAP || !REFERENCE, MapInterface<KeyType, ValueType>, NonConstMap<KeyType, ValueType> >::type

◆ Interface

using Interface = typename Super::Interface

◆ Iterator

using Iterator = typename Interface::Iterator

◆ ConstIterator

using ConstIterator = typename Interface::ConstIterator

Constructor & Destructor Documentation

◆ MapImpl() [1/3]

MapImpl ( )

◆ MapImpl() [2/3]

MapImpl ( MAP &&  map)
explicit

◆ MapImpl() [3/3]

MapImpl ( MapImpl< MAP > &&  src)

Member Function Documentation

◆ MAXON_IMPLEMENTATION_SIMPLE()

MAXON_IMPLEMENTATION_SIMPLE ( MapImpl< MAP >  )

◆ GetCount()

Int GetCount ( ) const

◆ InsertKey() [1/2]

ResultRef<NonConstValueType> InsertKey ( const KeyType key,
Bool created = BoolLValue() 
)

◆ InsertKey() [2/2]

ResultRef<NonConstValueType> InsertKey ( KeyType &&  key,
Bool created = BoolLValue() 
)

◆ FindValue() [1/2]

NonConstValueType* FindValue ( const KeyType key)

◆ FindValue() [2/2]

const ValueType* FindValue ( const KeyType key) const

◆ Erase() [1/2]

Result<Bool> Erase ( const KeyType key)

◆ Erase() [2/2]

Iterator Erase ( const Iterator iterator)

◆ CopyFrom()

Result<void> CopyFrom ( const Interface other)

◆ Clone()

Result<Interface*> Clone ( Bool  copyContent) const

◆ ToString()

String ToString ( const FormatStatement formatStatement = nullptr) const

◆ GetMemorySize()

Int GetMemorySize ( ) const

◆ GetKeyDataType()

const DataType& GetKeyDataType ( ) const

◆ GetValueDataType()

const DataType& GetValueDataType ( ) const

◆ Reset()

void Reset ( )

◆ Flush()

void Flush ( )

◆ IteratorInit() [1/2]

void IteratorInit ( Iterator it,
Bool  end 
)

◆ IteratorInit() [2/2]

void IteratorInit ( ConstIterator it,
Bool  end 
) const

◆ IteratorInitMove() [1/2]

void IteratorInitMove ( Iterator dest,
Iterator src 
) const

◆ IteratorInitMove() [2/2]

void IteratorInitMove ( ConstIterator dest,
ConstIterator src 
) const

◆ IteratorFree() [1/2]

void IteratorFree ( Iterator it) const

◆ IteratorFree() [2/2]

void IteratorFree ( ConstIterator it) const

◆ IteratorIsEqual() [1/2]

Bool IteratorIsEqual ( const Iterator a,
const Iterator b 
) const

◆ IteratorIsEqual() [2/2]

Bool IteratorIsEqual ( const ConstIterator a,
const ConstIterator b 
) const

◆ IteratorInc() [1/2]

void IteratorInc ( Iterator it) const

◆ IteratorInc() [2/2]

void IteratorInc ( ConstIterator it) const

◆ IteratorGet() [1/2]

Pair<const KeyType&, ValueType&> IteratorGet ( const Iterator it) const

◆ IteratorGet() [2/2]

Pair<const KeyType&, const ValueType&> IteratorGet ( const ConstIterator it) const

◆ GetMap() [1/2]

std::add_lvalue_reference<MAP>::type GetMap ( )

◆ GetMap() [2/2]

const MapType& GetMap ( ) const

◆ GetIterator() [1/4]

static MapType::Iterator& GetIterator ( Iterator it)
staticprivate

◆ GetIterator() [2/4]

static MapType::ConstIterator& GetIterator ( ConstIterator it)
staticprivate

◆ GetIterator() [3/4]

static const MapType::Iterator& GetIterator ( const Iterator it)
staticprivate

◆ GetIterator() [4/4]

static const MapType::ConstIterator& GetIterator ( const ConstIterator it)
staticprivate

◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( MapImpl< MAP >  )
private

Member Data Documentation

◆ CONSTMAP

const Bool CONSTMAP
static

◆ REFERENCE

const Bool REFERENCE
static

◆ _map

MAP _map
private