System documentation of the GNU Image-Finding Tool

Public Types | Public Member Functions
CAttributeList Class Reference

a simple class destined to contain attribute-value pairs in an easily accessible fashion More...

#include <CAttributeList.h>

Inheritance diagram for CAttributeList:
CMagic

List of all members.

Public Types

typedef map< string, pair
< char *, char * > > 
CBase

Public Member Functions

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.
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
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.

Detailed Description

a simple class destined to contain attribute-value pairs in an easily accessible fashion


Member Function Documentation

virtual pair<bool,string> CAttributeList::stringReadAttribute ( const string &  inAttribute) const [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


The documentation for this class was generated from the following file:

Need for discussion? Want to contribute? Contact
help-gift@gnu.org Generated using Doxygen