![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Helper class used to manage list of many connected in cascade maps. More...
#include <TCascadedMap.h>
Public Member Functions | |
TCascadedMap () | |
Default constructor. | |
TCascadedMap (const TCascadedMap< Key, Value > *parentPtr) | |
Constructor with assigning of parent map. | |
TCascadedMap (const TCascadedMap &map) | |
Copy constructor. | |
const TCascadedMap< Key, Value > * | GetParent () const |
Get access to parent map instance. | |
void | SetParent (const TIMap< Key, Value > *parentPtr) |
Set instance of parent map. | |
int | FindLocalIndex (const KeyType &key) const |
Find index index of specified key using local context only. | |
const ValueType * | FindLocalElement (const KeyType &key) const |
Find value element associated with specified key using local context only. | |
ValueType * | FindLocalElement (const KeyType &key) |
Find value element associated with specified key using local context only. | |
const KeyType & | GetLocalKeyAt (int index) const |
Get key value from local context at specified index. | |
KeyType & | GetLocalKeyAt (int index) |
Get key value from local context at specified index. | |
const ValueType & | GetLocalValueAt (int index) const |
Get mapped value from local context at specified index. | |
ValueType & | GetLocalValueAt (int index) |
Get mapped value from local context at specified index. | |
int | GetLocalElementsCount () const |
Get number of elements in local context. | |
bool | InsertLocal (const KeyType &key, const ValueType &value) |
Insert element in local context. | |
void | ResetLocal () |
Removes all elements from local context. | |
void | GetLocalKeys (Keys &result, bool doAppend=false) const |
Get list of local keys stored in this map. | |
virtual int | GetElementsCount () const |
Get number of elements. | |
virtual ValueType & | operator[] (const KeyType &key) |
Element access operator. | |
virtual const ValueType & | operator[] (const KeyType &key) const |
Element access operator. | |
virtual int | FindIndex (const KeyType &key) const |
Find index index of specified key. | |
virtual const ValueType * | FindElement (const KeyType &key) const |
Find value element associated with specified key. | |
virtual void | GetKeys (Keys &result, bool doAppend=false) const |
Get list of keys stored in this map. | |
virtual const KeyType & | GetKeyAt (int index) const |
Get key value at specified index. | |
virtual const ValueType & | GetValueAt (int index) const |
Get mapped value at specified index. | |
![]() |
Additional Inherited Members | |
![]() | |
typedef Key | KeyType |
typedef Value | ValueType |
typedef QSet< KeyType > | Keys |
Helper class used to manage list of many connected in cascade maps.
Please note, that elements are accessed using its index. At this moment no element removing is supported. Local elements have begining indices.
Definition at line 29 of file TCascadedMap.h.
istd::TCascadedMap< Key, Value >::TCascadedMap | ( | ) |
Default constructor.
Definition at line 139 of file TCascadedMap.h.
|
explicit |
Constructor with assigning of parent map.
Definition at line 146 of file TCascadedMap.h.
istd::TCascadedMap< Key, Value >::TCascadedMap | ( | const TCascadedMap< Key, Value > & | map | ) |
Copy constructor.
Definition at line 153 of file TCascadedMap.h.
|
virtual |
Find value element associated with specified key.
Implements istd::TIMap< Key, Value >.
Definition at line 352 of file TCascadedMap.h.
|
virtual |
Find index index of specified key.
Implements istd::TIMap< Key, Value >.
Definition at line 333 of file TCascadedMap.h.
TCascadedMap< Key, Value >::ValueType * istd::TCascadedMap< Key, Value >::FindLocalElement | ( | const KeyType & | key | ) |
Find value element associated with specified key using local context only.
Definition at line 200 of file TCascadedMap.h.
const TCascadedMap< Key, Value >::ValueType * istd::TCascadedMap< Key, Value >::FindLocalElement | ( | const KeyType & | key | ) | const |
Find value element associated with specified key using local context only.
Definition at line 188 of file TCascadedMap.h.
int istd::TCascadedMap< Key, Value >::FindLocalIndex | ( | const KeyType & | key | ) | const |
Find index index of specified key using local context only.
Definition at line 176 of file TCascadedMap.h.
|
virtual |
Get number of elements.
Implements istd::TIMap< Key, Value >.
Definition at line 297 of file TCascadedMap.h.
|
virtual |
Get key value at specified index.
Implements istd::TIMap< Key, Value >.
Definition at line 375 of file TCascadedMap.h.
|
virtual |
Get list of keys stored in this map.
doAppend | if it is true, list of keys will be appended to existing key list. |
Implements istd::TIMap< Key, Value >.
Definition at line 364 of file TCascadedMap.h.
int istd::TCascadedMap< Key, Value >::GetLocalElementsCount | ( | ) | const |
Get number of elements in local context.
Definition at line 248 of file TCascadedMap.h.
TCascadedMap< Key, Value >::KeyType & istd::TCascadedMap< Key, Value >::GetLocalKeyAt | ( | int | index | ) |
Get key value from local context at specified index.
Definition at line 221 of file TCascadedMap.h.
const TCascadedMap< Key, Value >::KeyType & istd::TCascadedMap< Key, Value >::GetLocalKeyAt | ( | int | index | ) | const |
Get key value from local context at specified index.
Definition at line 212 of file TCascadedMap.h.
void istd::TCascadedMap< Key, Value >::GetLocalKeys | ( | Keys & | result, |
bool | doAppend = false ) const |
Get list of local keys stored in this map.
doAppend | if it is true, list of keys will be appended to existing key list. |
Definition at line 280 of file TCascadedMap.h.
TCascadedMap< Key, Value >::ValueType & istd::TCascadedMap< Key, Value >::GetLocalValueAt | ( | int | index | ) |
Get mapped value from local context at specified index.
Definition at line 230 of file TCascadedMap.h.
const TCascadedMap< Key, Value >::ValueType & istd::TCascadedMap< Key, Value >::GetLocalValueAt | ( | int | index | ) | const |
Get mapped value from local context at specified index.
Definition at line 239 of file TCascadedMap.h.
const TCascadedMap< Key, Value > * istd::TCascadedMap< Key, Value >::GetParent | ( | ) | const |
Get access to parent map instance.
Definition at line 162 of file TCascadedMap.h.
|
virtual |
Get mapped value at specified index.
Implements istd::TIMap< Key, Value >.
Definition at line 389 of file TCascadedMap.h.
bool istd::TCascadedMap< Key, Value >::InsertLocal | ( | const KeyType & | key, |
const ValueType & | value ) |
Insert element in local context.
Definition at line 255 of file TCascadedMap.h.
|
virtual |
Element access operator.
If key object not exists, it will be automatically created.
Implements istd::TIMap< Key, Value >.
Definition at line 309 of file TCascadedMap.h.
|
virtual |
Element access operator.
If key object not exists, it will be automatically created.
Implements istd::TIMap< Key, Value >.
Definition at line 326 of file TCascadedMap.h.
void istd::TCascadedMap< Key, Value >::ResetLocal | ( | ) |
Removes all elements from local context.
Definition at line 272 of file TCascadedMap.h.
void istd::TCascadedMap< Key, Value >::SetParent | ( | const TIMap< Key, Value > * | parentPtr | ) |
Set instance of parent map.
Definition at line 169 of file TCascadedMap.h.
© Witold Gantzke and Kirill Lepskiy