#include <utils.h>
Inheritance diagram for CB2::MapList< Tkey, Tvalue >:
Public Types | |
typedef size_t | size_type |
Size type. | |
typedef Map< Tkey, Tvalue > | item_type |
List item type. | |
typedef item_type * | ref_type |
Item reference type. | |
typedef Iterator< MapList< Tkey, Tvalue >, ref_type, Tvalue > | iterator |
Iterator. | |
typedef RevIterator< MapList< Tkey, Tvalue >, ref_type, Tvalue > | rev_iterator |
Reverse iterator. | |
Public Member Functions | |
MapList () | |
Constructor. | |
~MapList () | |
Destructor. | |
const MapList< Tkey, Tvalue > & | operator<< (const Map< Tkey, Tvalue > &map) |
Add new pair. | |
void | Add (const Tkey &key, const Tvalue &value) |
Add new pair. | |
void | Add (const Tkey &key) |
Add new pair with NULL value. | |
const Tvalue & | operator[] (const Tkey &key) const |
Access item by key. | |
bool | IsNULL (const Tkey &key) const |
Check whether item is NULL. | |
Public Attributes | |
int | tag |
Tag for user-specific data. | |
Private Attributes | |
List< item_type > | data |
List of pairs. |
List of key=value pairs of a given type. Unlike the simple List< Map> type, this template allows access by key.
|
List item type.
|
|
|
|
Item reference type.
|
|
Reverse iterator.
|
|
Size type.
|
|
Constructor. Create empty list. |
|
Destructor. Destroy the list. |
|
Add new pair with NULL value. Add new pair as key and NULL value.
|
|
Add new pair. Add new pair as key and value.
|
|
Check whether item is NULL. Check whether an item is NULL. If no value for given key is found, ExceptionNotFound is thrown.
|
|
Add new pair. Add new pair of key=value to the list. The pair is stored as local copy.
|
|
Access item by key. Get value by key. If no value for given key is found, ExceptionNotFound is thown. Also if the value is found, but NULL, ExceptionAssert is thrown (see Map< Tkey, Tvalue>::GetValue().
|
|
List of pairs.
|
|
Tag for user-specific data.
|