31 #include "libMRML/include/uses-declarations.h"
35 #include "libMRML/include/CMagic.h"
36 #include "libMRML/include/CAttributeList.h"
38 #include "libMRML/include/CMutex.h"
39 #include "libMRML/include/CNoDelete.h"
97 void addAttribute(
const string& inAttribute,
long inValue);
99 void addAttribute(
const string& inAttribute,
double inValue);
101 void addAttribute(
const string& inAttribute,
const string& inValue);
137 void toXML(
string& outString,
const int=0)
const;
169 virtual void addChild(
const string&,
170 const char*
const*
const inAttributeList=0);
187 const char*
const*
const inAttributeList=0);
197 const list< pair<string,string> >& inList);
string getText() const
get the text of this
bool isSubtreeFinished() const
A subtree is finished if the current child is identical with itself.
void addAttribute(const string &inAttribute, long inValue)
adding an attribute for integers using the function for strings
pair< bool, long > longReadAttribute(const string &inAttribute) const
reading an attribute for integers using stringReadAttribute
int getNumberOfAttributes() const
get the number of attributes in this
This class is designed for visiting XML document trees.
Definition: CXMLElementVisitor.h:35
list< CXMLElement * >::const_iterator child_list_begin() const
For interoperating with the STL.
This class captures the structure of an XML element.
Definition: CXMLElement.h:51
const int mTypeOfNode
The kind of this node: Stroustrup would kill me for that, but I think doing some inheritance here is ...
Definition: CXMLElement.h:81
CXMLElement * mFather
the father of this
Definition: CXMLElement.h:57
CAttributeList mAttributes
the content: attributes
Definition: CXMLElement.h:64
The use of this class is to control where an element is destroyed.
Definition: CNoDelete.h:40
CXMLElement * mCurrentChild
The child-grandchild-etc.
Definition: CXMLElement.h:59
void moveUp()
make the father of the current node the new current node.
int getTypeOfNode() const
get the name of this
virtual void addChild(CXMLElement *inChild)
Like above.
a simple class destined to contain attribute-value pairs in an easily accessible fashion ...
Definition: CAttributeList.h:36
void traverse(CXMLElementVisitor &inoutVisitor) const
Visit the subtree using a visitor.
CXMLElement * getFather() const
read the father of this
virtual ~CXMLElement()
delete this by first deleting the children
string mName
the name of this element
Definition: CXMLElement.h:66
CXMLElement * clone(bool inDeep=true) const
clone this element with all its content
virtual pair< bool, string > stringReadAttribute(const string &inAttribute) const
reading an attribute for strings
list< pair< string, string > > * createNamedValueList() const
For doing flat configuration, we need to find out all attributes which are visible in this algorithm...
void check() const
checks consistency of attributes
void setFather(CXMLElement *)
change the father of this
CXMLElement(const string &, const char *const *const inAttributeList=0)
Constructing this from a list which is built from what we get from expat.
pair< bool, double > doubleReadAttribute(const string &inAttribute) const
reading an attribute for doubles using stringReadAttribute
string mText
The text/CData contained in this element FIXME: look at zero characters.
Definition: CXMLElement.h:74
pair< bool, bool > boolReadAttribute(const string &inAttribute) const
reading an attribute for booleans using stringReadAttribute it supports several pairs: yes/no true/fa...
lCChildren mChildren
a list containing the children of this element
Definition: CXMLElement.h:62
void toXML(string &outString, const int=0) const
Convert this into an XML string.
string getName() const
get the name of this
static int const cTextNode
This constant is destined to be a value of mTypeOfNode.
Definition: CXMLElement.h:86
static int const cElementNode
This constant is destined to be a value of mTypeOfNode.
Definition: CXMLElement.h:90
list< CXMLElement * >::const_iterator child_list_end() const
For interoperating with the STL.
list< CXMLElement * > lCChildren
a typedef for simple convenience
Definition: CXMLElement.h:54
This is a simple class for debugging.
Definition: CMagic.h:12