a simple class destined to contain attribute-value pairs in an easily accessible fashion More...
#include <CAttributeList.h>
Public Types | |
| typedef map< string, pair< char *, char * > > | CBase |
Public Member Functions | |
| void | check () const |
| list< string > | getKeys () const |
| Get the keys of all attributes in this list. | |
| CAttributeList (const char *const *const inAttributeList) | |
| from expat | |
| CAttributeList (const list< pair< string, string > > &inAttributes) | |
| from other c++ | |
| CAttributeList (const CAttributeList &inList) | |
| copy constructor | |
| const_iterator | find (string inString) const |
| finding in this | |
| void | add (const string &inFirst, const string &inSecond) |
| adding an attribute | |
| void | add (const string &inAttribute, long inValue) |
| adding an attribute for integers using the function for strings | |
| void | add (const string &inAttribute, double inValue) |
| adding an attribute for doubles using using the function for strings | |
| pair< bool, bool > | boolReadAttribute (const string &inAttribute) const |
| reading an attribute for booleans using stringReadAttribute it supports several pairs: yes/no true/false y/n | |
| pair< bool, long > | longReadAttribute (const string &inAttribute) const |
| reading an attribute for integers using stringReadAttribute | |
| pair< bool, double > | doubleReadAttribute (const string &inAttribute) const |
| reading an attribute for doubles using stringReadAttribute | |
| virtual pair< bool, string > | stringReadAttribute (const string &inAttribute) const |
| reading an attribute for strings More... | |
| void | toXML (string &outString) const |
| Outputting a string to XML. | |
| ~CAttributeList () | |
| the destructor in the case of char* as content it deletes the arrays of char. | |
Public Member Functions inherited from CMagic | |
| void | check () const |
| This function checks the magic number of this and asserts to zero, if something is wrong, if things are ok, this function keeps quiet. | |
| void | checkNPrint () const |
| as check(), but it also prints a small message to cout, saying that the check worked. | |
| CMagic () | |
| sets the magic number to 42 | |
| ~CMagic () | |
| sets the magic number to another value (36) | |
a simple class destined to contain attribute-value pairs in an easily accessible fashion
|
virtual |
reading an attribute for strings
All the attribute functions implement a primitive version of inheritance: We look also at the parents of this, if we do not find a given attribute in this.
this is virtual in order to plug in other methods of inheritance