KeyValueMap Class Reference

[kab Index] [kab Hierarchy] [Headers]


#include <keyvaluemap.h>

Public Members

Protected Members


bool invariant() [public]

returns true if object is OK

unsigned int size() const [public]

returns the number of key-value-pairs in the map

void clear() [public]

deletes all entries

bool fill(const string&, bool force=false, bool relax=false) [public]

Fills the database from the file. If the parameter force is true, it overrides keys that are already declared in the database and are declared again in the file. params: ° filename ° wether to override existing keys or not ° wether values may be empty

bool save(const string&, bool force=false) [public]

Saves the database to a file. Only overrides existing files if force is true. params: filename and wether to override existing files or not

bool save(ofstream& file, int count) [public]

Saves contents to an already open stream,placing "count" spaces before each line. This method is called to save fierarchical databases.

bool empty() [public]

Returns true if there are no keys declared in this map.

bool erase(const string& key) [public]

Erases all key-value-pairs in the map, the map is empty after it.

bool parseComplexString(const string& orig, string::size_type index, string& result, int& noOfChars) const [protected]

returns true if a "complex string" was found

string makeComplexString(const string& orig) [protected]

codes a normal string into a complex string:

bool insertRaw(const string& key, const string& value, bool force=false) [protected]

Inserts a string (it must be an already coded one)without coding it.

bool getRaw(const string& key, string& value) const [protected]

Retrieves the undecoded value of the given key.


Documentation generated by root@darkstar.lst.de on Wed Sep 8 17:39:05 CEST 1999
Kdoc