KMap Class Template Reference

#include <kmap.h>

List of all members.


Detailed Description

template<typename KEY_TYPE, typename VALUE_TYPE, typename KEY_COMPARE_FUNCTOR = KFbxLessCompare<KEY_TYPE>, typename ALLOCATOR = KBaseAllocator>
class KMap< KEY_TYPE, VALUE_TYPE, KEY_COMPARE_FUNCTOR, ALLOCATOR >

Definition at line 1497 of file kmap.h.


Public Types

typedef VALUE_TYPE  ValueType
typedef KEY_TYPE  KeyType
typedef StorageType::RecordType  RecordType
typedef StorageType::IteratorType  Iterator
typedef
StorageType::ConstIteratorType 
ConstIterator

Public Member Functions

  KMap ()
  KMap (KMap const &pMap)
  ~KMap ()
void  Reserve (unsigned int pRecordCount)
int  GetSize () const
KPair< RecordType *, bool >  Insert (KeyType const &pKey, ValueType const &pValue)
int  Remove (KeyType const &pKey)
void  Clear ()
bool  Empty () const
Iterator  Begin ()
Iterator  End ()
ConstIterator  Begin () const
ConstIterator  End () const
RecordType const *  Find (KeyType const &pKey) const
RecordType Find (KeyType const &pKey)
RecordType const *  UpperBound (KeyType const &pKey) const
RecordType UpperBound (KeyType const &pKey)
ValueType operator[] (KeyType const &pKey)
RecordType const *  Minimum () const
RecordType Minimum ()
RecordType const *  Maximum () const
RecordType Maximum ()

Protected Types

typedef KRedBlackTree
< KKeyValuePair,
KEY_COMPARE_FUNCTOR, ALLOCATOR > 
StorageType

Protected Attributes

StorageType  mTree

Classes

class   KKeyValuePair

Member Typedef Documentation

typedef KRedBlackTree<KKeyValuePair, KEY_COMPARE_FUNCTOR, ALLOCATOR> StorageType [protected]

Definition at line 1519 of file kmap.h.

Definition at line 1524 of file kmap.h.

typedef KEY_TYPE KeyType

Definition at line 1525 of file kmap.h.

typedef StorageType::RecordType RecordType

Definition at line 1526 of file kmap.h.

typedef StorageType::IteratorType Iterator

Definition at line 1527 of file kmap.h.

typedef StorageType::ConstIteratorType ConstIterator

Definition at line 1528 of file kmap.h.


Constructor & Destructor Documentation

KMap (  )  [inline]

Definition at line 1530 of file kmap.h.

KMap ( KMap< KEY_TYPE, VALUE_TYPE, KEY_COMPARE_FUNCTOR, ALLOCATOR > const &  pMap  )  [inline]

Definition at line 1531 of file kmap.h.

~KMap (  )  [inline]

Definition at line 1532 of file kmap.h.


Member Function Documentation

void Reserve ( unsigned int  pRecordCount  )  [inline]

Definition at line 1534 of file kmap.h.

int GetSize (  )  const [inline]

Definition at line 1539 of file kmap.h.

KPair<RecordType*, bool> Insert ( KeyType const &  pKey,
ValueType const &  pValue  
) [inline]

Definition at line 1544 of file kmap.h.

Referenced by KMap< K, T, Compare >::operator[]().

int Remove ( KeyType const &  pKey  )  [inline]

Definition at line 1549 of file kmap.h.

void Clear (  )  [inline]

Definition at line 1554 of file kmap.h.

Referenced by KMap< K, T, Compare >::~KMap().

bool Empty (  )  const [inline]

Definition at line 1559 of file kmap.h.

Iterator Begin (  )  [inline]

Definition at line 1564 of file kmap.h.

Iterator End (  )  [inline]

Definition at line 1569 of file kmap.h.

ConstIterator Begin (  )  const [inline]

Definition at line 1574 of file kmap.h.

ConstIterator End (  )  const [inline]

Definition at line 1579 of file kmap.h.

RecordType const* Find ( KeyType const &  pKey  )  const [inline]

Definition at line 1584 of file kmap.h.

Referenced by KMap< K, T, Compare >::operator[]().

RecordType* Find ( KeyType const &  pKey  )  [inline]

Definition at line 1589 of file kmap.h.

RecordType const* UpperBound ( KeyType const &  pKey  )  const [inline]

Definition at line 1594 of file kmap.h.

RecordType* UpperBound ( KeyType const &  pKey  )  [inline]

Definition at line 1599 of file kmap.h.

ValueType& operator[] ( KeyType const &  pKey  )  [inline]

Definition at line 1604 of file kmap.h.

RecordType const* Minimum (  )  const [inline]

Definition at line 1616 of file kmap.h.

Referenced by KMap< K, T, Compare >::Begin().

RecordType* Minimum (  )  [inline]

Definition at line 1621 of file kmap.h.

RecordType const* Maximum (  )  const [inline]

Definition at line 1626 of file kmap.h.

RecordType* Maximum (  )  [inline]

Definition at line 1631 of file kmap.h.


Member Data Documentation

StorageType mTree [protected]