Base storage class. More...
#include <storage.h>

Public Types | |
| typedef hash_map< string, s_int32 >::iterator | iterator |
| Storage iterator, similar to STL iterator. | |
Public Member Functions | |
| storage () | |
| Default constructor. | |
| ~storage () | |
| Destructor. | |
| void | set_val (string key, s_int32 value) |
| Sets key to value. | |
| s_int32 | get_val (string key) |
| Returns the value of a key. | |
| pair< string, s_int32 > | next () |
| Returns the next (key, value) pair of the storage. | |
| s_int32 & | operator[] (string key) |
| Returns the value of a key. | |
| iterator | begin () |
| Returns an iterator to the beginning of the storage. | |
| iterator | end () |
| Returns an iterator to the end of the storage. | |
| u_int32 | size () const |
| Returns the size (number of elements) of the storage. | |
Base storage class.
If you want to access attributes of an object of yours you have to derive that object's class from 'storage' and store the attributes in the hash_map.
Definition at line 47 of file storage.h.
| typedef hash_map<string, s_int32>::iterator storage::iterator |
| storage::~storage | ( | ) |
Destructor.
Definition at line 31 of file storage.cc.
| void storage::set_val | ( | string | key, | |
| s_int32 | value | |||
| ) |
| s_int32 storage::get_val | ( | string | key | ) |
Returns the value of a key.
| key | key to return. |
Definition at line 50 of file storage.cc.
| pair< string, s_int32 > storage::next | ( | ) |
Returns the next (key, value) pair of the storage.
Definition at line 69 of file storage.cc.
| s_int32 & storage::operator[] | ( | string | key | ) |
Returns the value of a key.
| key | key to return |
Definition at line 63 of file storage.cc.
| iterator storage::begin | ( | ) | [inline] |
| iterator storage::end | ( | ) | [inline] |
| u_int32 storage::size | ( | ) | const [inline] |
1.7.1