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. More...
 
virtual ValueTypeoperator[] (const KeyType &key)=0
 Element access operator. More...
 
virtual const ValueTypeoperator[] (const KeyType &key) const =0
 Element access operator. More...
 
virtual int FindIndex (const KeyType &key) const =0
 Find index index of specified key. More...
 
virtual const ValueTypeFindElement (const KeyType &key) const =0
 Find value element associated with specified key. More...
 
virtual void GetKeys (Keys &result, bool doAppend=false) const =0
 Get list of keys stored in this map. More...
 
virtual const KeyTypeGetKeyAt (int index) const =0
 Get key value at specified index. More...
 
virtual const ValueTypeGetValueAt (int index) const =0
 Get mapped value at specified index. More...
 
- 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

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

Definition at line 25 of file TIMap.h.

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

Definition at line 23 of file TIMap.h.

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

Definition at line 24 of file TIMap.h.

Member Function Documentation

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 >.

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 >.

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 >.

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 >.

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 >.

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 >.

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 >.

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 >.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy