MapImpl< MAP > Class Template Reference Data Structures

#include <map.h>

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  接口 = typename Super::Interface
using  Iterator = typename Interface::Iterator
using  ConstIterator = typename Interface::ConstIterator

公共成员函数

  MAXON_IMPLEMENTATION_SIMPLE ( MapImpl , typename)
  MapImpl ()
  MapImpl (MAP &&map)
  MapImpl ( MapImpl && src )
Int   GetCount () const
ResultRef < NonConstValueType InsertKey (const KeyType &key, Bool &created= BoolLValue ())
ResultRef < NonConstValueType InsertKey ( KeyType &&key, Bool &created= BoolLValue ())
NonConstValueType FindValue (const KeyType &key)
const ValueType FindValue (const KeyType &key) const
Result < Bool Erase (const KeyType &key)
Iterator   Erase (const Iterator &iterator)
Result < void >  CopyFrom (const 接口 &other)
Result < 接口 * >  Clone ( Bool cloneElements) const
String   ToString (const FormatStatement *formatStatement=nullptr) const
Int   GetMemorySize () const
const DataType GetKeyDataType () const
const DataType GetValueDataType () const
void  重置 ()
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 MapType GetMap () const

静态公共属性

static const Bool   CONSTMAP
static const Bool   REFERENCE

私有成员函数

  MAXON_DISALLOW_COPY_AND_ASSIGN ( MapImpl )

Static Private Member Functions

template<typename T >
static void  Destruct (const T &object)
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

◆  接口

using 接口 = typename Super::Interface

◆  Iterator

using Iterator = typename Interface::Iterator

◆  ConstIterator

using ConstIterator = typename Interface::ConstIterator

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

◆  MapImpl() [1/3]

MapImpl ( )

◆  MapImpl() [2/3]

MapImpl ( MAP &&  map )
explicit

◆  MapImpl() [3/3]

MapImpl ( MapImpl < MAP > &&  src )

成员函数文档编制

◆  MAXON_IMPLEMENTATION_SIMPLE()

MAXON_IMPLEMENTATION_SIMPLE ( MapImpl < MAP >  ,
typename   
)

◆  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 接口 other )

◆  Clone()

Result < 接口 *> Clone ( Bool   cloneElements ) 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

◆  Destruct()

static void Destruct ( const T &  object )
static private

◆  GetIterator() [1/4]

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

◆  GetIterator() [2/4]

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

◆  GetIterator() [3/4]

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

◆  GetIterator() [4/4]

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

◆  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