KeyValueMap Class Reference
[kab Index] [kab Hierarchy]
[Headers]
#include <keyvaluemap.h>
Public Members
- KeyValueMap ()
- KeyValueMap (const KeyValueMap&)
- virtual ~KeyValueMap ()
- bool invariant ()
- unsigned int size () const
- void clear ()
- bool fill (const string&, bool force=false, bool relax=false)
- bool save (const string&, bool force=false)
- bool save (ofstream& file, int count)
- bool get (const string&, string&) const
- bool insert (const string&, const string&, bool force=false)
- inline bool insert (const string& key, const char* value, bool force=false)
- bool insertLine (string, bool force=false,
bool relax=false,
bool encode=true)
- bool get (const string&, int&) const
- bool insert (const string&, const int&, bool force=false)
- bool get (const string&, double&) const
- bool insert (const string&, const double&, bool force=false)
- bool get (const string&, bool&) const
- bool insert (const string&, const bool&, bool force=false)
- bool get (const string&, list<string>&) const
- bool insert (const string&, const list<string>&, bool force=false)
- bool get (const string&, list<int>&) const
- bool insert (const string&, const list<int>&, bool force=false)
- bool get (const string&, list<double>&) const
- bool insert (const string&, const list<double>&, bool force=false)
- bool empty ()
- bool erase (const string& key)
Protected Members
- StringStringMap* data
- bool parseComplexString (const string& orig, string::size_type index,
string& result,
int& noOfChars) const
- string makeComplexString (const string& orig)
- bool insertRaw (const string& key, const string& value,
bool force=false)
- bool getRaw (const string& key, string& value) const
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 tasin@cd1 on Die Nov 30 17:32:39 CET 1999
|
Kdoc
|