|
ACF $AcfVersion:0$
|
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 override |
| Get number of elements. | |
| virtual ValueType & | operator[] (const KeyType &key) override |
| Element access operator. | |
| virtual const ValueType & | operator[] (const KeyType &key) const override |
| Element access operator. | |
| virtual int | FindIndex (const KeyType &key) const override |
| Find index index of specified key. | |
| virtual const ValueType * | FindElement (const KeyType &key) const override |
| Find value element associated with specified key. | |
| virtual void | GetKeys (Keys &result, bool doAppend=false) const override |
| Get list of keys stored in this map. | |
| virtual const KeyType & | GetKeyAt (int index) const override |
| Get key value at specified index. | |
| virtual const ValueType & | GetValueAt (int index) const override |
| Get mapped value at specified index. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Additional Inherited Members | |
Public Types inherited from istd::TIMap< Key, Value > | |
| 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 25 of file TCascadedMap.h.
| istd::TCascadedMap< Key, Value >::TCascadedMap | ( | ) |
Default constructor.
Definition at line 135 of file TCascadedMap.h.
|
explicit |
Constructor with assigning of parent map.
Definition at line 142 of file TCascadedMap.h.
| istd::TCascadedMap< Key, Value >::TCascadedMap | ( | const TCascadedMap< Key, Value > & | map | ) |
Copy constructor.
Definition at line 149 of file TCascadedMap.h.
|
overridevirtual |
Find value element associated with specified key.
Implements istd::TIMap< Key, Value >.
Definition at line 348 of file TCascadedMap.h.
References NULL.
|
overridevirtual |
Find index index of specified key.
Implements istd::TIMap< Key, Value >.
Definition at line 329 of file TCascadedMap.h.
References istd::TCascadedMap< Key, Value >::FindIndex(), and NULL.
Referenced by istd::TCascadedMap< Key, Value >::FindIndex().
| 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 196 of file TCascadedMap.h.
References NULL.
| 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 184 of file TCascadedMap.h.
References NULL.
| int istd::TCascadedMap< Key, Value >::FindLocalIndex | ( | const KeyType & | key | ) | const |
Find index index of specified key using local context only.
Definition at line 172 of file TCascadedMap.h.
|
overridevirtual |
Get number of elements.
Implements istd::TIMap< Key, Value >.
Definition at line 293 of file TCascadedMap.h.
References NULL.
|
overridevirtual |
Get key value at specified index.
Implements istd::TIMap< Key, Value >.
Definition at line 371 of file TCascadedMap.h.
References NULL.
|
overridevirtual |
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 360 of file TCascadedMap.h.
References NULL.
| int istd::TCascadedMap< Key, Value >::GetLocalElementsCount | ( | ) | const |
Get number of elements in local context.
Definition at line 244 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 217 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 208 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 276 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 226 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 235 of file TCascadedMap.h.
| const TCascadedMap< Key, Value > * istd::TCascadedMap< Key, Value >::GetParent | ( | ) | const |
Get access to parent map instance.
Definition at line 158 of file TCascadedMap.h.
|
overridevirtual |
Get mapped value at specified index.
Implements istd::TIMap< Key, Value >.
Definition at line 385 of file TCascadedMap.h.
References NULL.
| bool istd::TCascadedMap< Key, Value >::InsertLocal | ( | const KeyType & | key, |
| const ValueType & | value | ||
| ) |
Insert element in local context.
Definition at line 251 of file TCascadedMap.h.
|
overridevirtual |
Element access operator.
If key object not exists, it will be automatically created.
Implements istd::TIMap< Key, Value >.
Definition at line 322 of file TCascadedMap.h.
|
overridevirtual |
Element access operator.
If key object not exists, it will be automatically created.
Implements istd::TIMap< Key, Value >.
Definition at line 305 of file TCascadedMap.h.
| void istd::TCascadedMap< Key, Value >::ResetLocal | ( | ) |
Removes all elements from local context.
Definition at line 268 of file TCascadedMap.h.
| void istd::TCascadedMap< Key, Value >::SetParent | ( | const TIMap< Key, Value > * | parentPtr | ) |
Set instance of parent map.
Definition at line 165 of file TCascadedMap.h.