#include <utils.h>
Inheritance diagram for CB2::PMapList< Tkey, Tvalue >:
Public Types | |
typedef PMapList< Tkey, Tvalue > | this_type |
Template type alias. | |
typedef PMap< Tkey, Tvalue > | item_type |
Item type. | |
typedef List< item_type > | storage_type |
Storage type. | |
typedef storage_type::size_type | size_type |
Size type. | |
typedef storage_type::ref_type | ref_type |
Item reference type. | |
typedef Iterator< this_type, ref_type, item_type > | iterator |
Iterator. | |
typedef RevIterator< this_type, ref_type, item_type > | rev_iterator |
Reverse iterator. | |
Public Member Functions | |
PMapList () | |
Constructor. | |
~PMapList () | |
Destructor. | |
const this_type & | operator<< (const item_type &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. | |
size_type | Len () const |
Return number of items. | |
bool | Empty () const |
Check list for empty. | |
ref_type | RefBegin () const |
Get starting reference. | |
ref_type | RefEnd () const |
Get final reference. | |
ref_type | RevRefBegin () const |
Get starting reverse reference. | |
ref_type | RevRefEnd () const |
Get final reverse reference. | |
ref_type | RefNext (const ref_type &prev) const |
Get succeding reference. | |
ref_type | RefPrev (const ref_type &prev) const |
Get predecessing reference. | |
const item_type & | Deref (const ref_type &ref) const |
Dereference. | |
const item_type & | RevDeref (const ref_type &ref) const |
Reverse dereference. | |
iterator | Begin () const |
Get starting iterator. | |
iterator | End () const |
Get final iterator. | |
rev_iterator | RevBegin () const |
Get starting reverse iterator. | |
rev_iterator | RevEnd () const |
Get final reverse iterator. | |
Public Attributes | |
int | tag |
Tag for user-specific data. | |
Private Attributes | |
storage_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.
|
Item type.
|
|
|
|
Item reference type.
|
|
Reverse iterator.
|
|
Size type.
|
|
Storage type.
|
|
Template type alias.
|
|
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.
|
|
Get starting iterator.
|
|
Dereference. Get the item value referenced by 'ref'. If the reference is out of range, ExceptionMemory is thrown.
|
|
Check list for empty.
|
|
Get final iterator.
|
|
Check whether item is NULL. Check whether an item is NULL. If no value for given key is found, ExceptionNotFound is thrown.
|
|
Return number of items.
|
|
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().
|
|
Get starting reference. Get the reference to the first item in the list as a pointer to the first item (or NULL on empty list).
|
|
Get final reference. Get the final reference as a NULL pointer.
|
|
Get succeding reference. Get the reference to an item succeding the item referenced by 'prev'.
|
|
Get predecessing reference. Get the reference to an item predecessing the item referenced by 'prev'.
|
|
Get starting reverse iterator.
|
|
Reverse dereference. Get the item value referenced by 'ref'. If the reference is out of range, ExceptionMemory is thrown.
|
|
Get final reverse iterator.
|
|
Get starting reverse reference. Get the reverse reference to the last item in the list as a pointer to the last item (or NULL on empty list).
|
|
Get final reverse reference. Get the final reverse reference as a NULL pointer.
|
|
List of pairs.
|
|
Tag for user-specific data.
|