ACF $AcfVersion:0$
Public Types | Public Member Functions | List of all members
istd::TIMap< Key, Value > Class Template Referenceabstract

Generic interface for a key/value mapping. More...

#include <TIMap.h>

Inheritance diagram for istd::TIMap< Key, Value >:
istd::IPolymorphic istd::TCascadedMap< Key, Value >

Public Types

typedef Key KeyType
 
typedef Value ValueType
 
typedef QSet< KeyTypeKeys
 

Public Member Functions

virtual int GetElementsCount () const =0
 Get number of elements.
 
virtual ValueTypeoperator[] (const KeyType &key)=0
 Element access operator.
 
virtual const ValueTypeoperator[] (const KeyType &key) const =0
 Element access operator.
 
virtual int FindIndex (const KeyType &key) const =0
 Find index index of specified key.
 
virtual const ValueTypeFindElement (const KeyType &key) const =0
 Find value element associated with specified key.
 
virtual void GetKeys (Keys &result, bool doAppend=false) const =0
 Get list of keys stored in this map.
 
virtual const KeyTypeGetKeyAt (int index) const =0
 Get key value at specified index.
 
virtual const ValueTypeGetValueAt (int index) const =0
 Get mapped value at specified index.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Detailed Description

template<typename Key, typename Value>
class istd::TIMap< Key, Value >

Generic interface for a key/value mapping.

Definition at line 20 of file TIMap.h.

Member Typedef Documentation

◆ Keys

template<typename Key , typename Value >
typedef QSet<KeyType> istd::TIMap< Key, Value >::Keys

Definition at line 25 of file TIMap.h.

◆ KeyType

template<typename Key , typename Value >
typedef Key istd::TIMap< Key, Value >::KeyType

Definition at line 23 of file TIMap.h.

◆ ValueType

template<typename Key , typename Value >
typedef Value istd::TIMap< Key, Value >::ValueType

Definition at line 24 of file TIMap.h.

Member Function Documentation

◆ FindElement()

template<typename Key , typename Value >
virtual const ValueType * istd::TIMap< Key, Value >::FindElement ( const KeyType key) const
pure virtual

Find value element associated with specified key.

Returns
pointer to associated value, or NULL if key not exists.

Implemented in istd::TCascadedMap< Key, Value >.

◆ FindIndex()

template<typename Key , typename Value >
virtual int istd::TIMap< Key, Value >::FindIndex ( const KeyType key) const
pure virtual

Find index index of specified key.

Implemented in istd::TCascadedMap< Key, Value >.

◆ GetElementsCount()

template<typename Key , typename Value >
virtual int istd::TIMap< Key, Value >::GetElementsCount ( ) const
pure virtual

Get number of elements.

Implemented in istd::TCascadedMap< Key, Value >.

◆ GetKeyAt()

template<typename Key , typename Value >
virtual const KeyType & istd::TIMap< Key, Value >::GetKeyAt ( int  index) const
pure virtual

Get key value at specified index.

Implemented in istd::TCascadedMap< Key, Value >.

◆ GetKeys()

template<typename Key , typename Value >
virtual void istd::TIMap< Key, Value >::GetKeys ( Keys result,
bool  doAppend = false 
) const
pure virtual

Get list of keys stored in this map.

Parameters
doAppendif it is true, list of keys will be appended to existing key list.

Implemented in istd::TCascadedMap< Key, Value >.

◆ GetValueAt()

template<typename Key , typename Value >
virtual const ValueType & istd::TIMap< Key, Value >::GetValueAt ( int  index) const
pure virtual

Get mapped value at specified index.

Implemented in istd::TCascadedMap< Key, Value >.

◆ operator[]() [1/2]

template<typename Key , typename Value >
virtual const ValueType & istd::TIMap< Key, Value >::operator[] ( const KeyType key) const
pure virtual

Element access operator.

If key object not exists, it will be automatically created.

Implemented in istd::TCascadedMap< Key, Value >.

◆ operator[]() [2/2]

template<typename Key , typename Value >
virtual ValueType & istd::TIMap< Key, Value >::operator[] ( const KeyType key)
pure virtual

Element access operator.

If key object not exists, it will be automatically created.

Implemented in istd::TCascadedMap< Key, Value >.


The documentation for this class was generated from the following file: