base class for all dicts
More...
#include <zbl.hpp>
List of all members.
Classes |
| class | creator |
| | Class to create and populate a dict instance. More...
|
| class | found |
| | Class holding result of a find() in a dict. More...
|
| class | iterator |
| | Dictionary iterator class. More...
|
Public Member Functions |
| void | insert (const K &k, const V &v) |
| | Insert a key-value pair in the dictionary.
|
| bool | has (const K &k) const |
| | Check if key is in the dictionary.
|
| found | find (const K &k) const |
| | Find key in the dictionary.
|
| const QMap< K, V > & | get () const |
| | Returns the stored value.
|
| V & | at (const K &key) |
| | Return reference to value of key.
|
| V & | operator[] (const K &key) |
| | Return reference to value of key.
|
Private Types |
typedef containerbase< QMap< K,
V > > | baseT |
| | The base class type.
|
Detailed Description
template<typename derT, typename K, typename V>
class z::dictbase< derT, K, V >
base class for all dicts
Member Function Documentation
| V& at |
( |
const K & |
key | ) |
[inline] |
Return reference to value of key.
- Parameters:
-
- Returns:
- Reference to value at specified key
- Todo:
- Find out why _list.value() returns a const value.
| found find |
( |
const K & |
k | ) |
const [inline] |
Find key in the dictionary.
- Parameters:
-
- Returns:
- found instance containing result of search
| const QMap<K,V>& get |
( |
| ) |
const [inline] |
Returns the stored value.
- Returns:
- The value
| bool has |
( |
const K & |
k | ) |
const [inline] |
Check if key is in the dictionary.
- Parameters:
-
- Returns:
- True if key is found
| void insert |
( |
const K & |
k, |
|
|
const V & |
v |
|
) |
| [inline] |
Insert a key-value pair in the dictionary.
- Parameters:
-
| k | Key to add |
| v | Value to add |
| V& operator[] |
( |
const K & |
key | ) |
[inline] |
Return reference to value of key.
- Parameters:
-
- Returns:
- Reference to value at specified key
The documentation for this class was generated from the following file:
- /home/renji/Data/projects/zenlang/sources/zbl/zbl.hpp