[Compbench-devel] CompBenchmarks++/System XML.h,1.1,1.2
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-01-17 20:12:35
|
Update of /cvsroot/compbench/CompBenchmarks++/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7425 Modified Files: XML.h Log Message: Updated doxygen documentation. Index: XML.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/System/XML.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XML.h 17 Jan 2007 19:08:35 -0000 1.1 --- XML.h 17 Jan 2007 20:12:30 -0000 1.2 *************** *** 22,33 **** --- 22,46 ---- std::string value; /*!< Attribute value */ public: + /** Constructor + * Initialise a new attribute. + * \param _name Attribute's name + * \param _value Attribute's value (optional) */ CBMXMLAttribute(std::string _name, std::string _value = ""); + /** Get attribute's name + \return a std::string */ virtual std::string Name(void); + + /** Get attribute's value + \return a std::string */ virtual std::string Value(void); + /** Set attribute's value + \param _value new value (std::string) + */ virtual void setValue(std::string _value); + /** Destructor */ virtual ~CBMXMLAttribute(); }; *************** *** 48,74 **** --- 61,139 ---- public: + /** Constructor + * Initialise a new node. + * \param _name Node's name + * \param _value Node's value (optional) */ CBMXMLNode(std::string _name, std::string _value = ""); + /** Get node's name + \return a std::string */ virtual std::string Name(void); + + /** Get node's value + \return a std::string */ virtual std::string Value(void); + + /** Set node's value + \param _value new value (std::string) + */ virtual void setValue(std::string _value); + /** Get childs' number + * \return number of nodes held by current node + * \sa getChild() */ virtual int childNumber(void); + + /** Get a child node according to its index + * \return A node + * \sa childNumber() */ virtual CBMXMLNode *getChild(int _index); + /** Get attributes' number + * \return number of attributes on current node + * \sa getAttribute() */ virtual int attributeNumber(void); + + /** Get an attribute according to its index + * \return An attribute + * \sa attributeNumber() */ virtual CBMXMLAttribute *getAttribute(int _index); + /** Add a node into current node + * \param _child node to add + * \return node added (_child) + * \sa addNode() */ virtual CBMXMLNode *add(CBMXMLNode *_child); + /** Add a node into current node + * \param _name name of the node + * \param _value value of the node (optional) + * \return node added (_child) + * \sa add() */ virtual CBMXMLNode *addNode(std::string _name, std::string _value = ""); + /** Add an attribute on current node + * \param _attribute to add + * \return attribute added (_attribute) + * \sa addAttribute() */ virtual CBMXMLAttribute *add(CBMXMLAttribute *_attribute); + + + /** Add an attribute on current node + * \param _name name of the attribute + * \param _value value of the attribute (optional) + * \return attribute added (_attribute) + * \sa add() */ virtual CBMXMLAttribute *addAttribute(std::string _name, std::string _value = ""); + /** Get textual (XML) representation of the node + * Build a string corresponding to the XML elements of current node and + * childs (includes attributes and value). + * \param _indent Optional indentation level; internal use only. + * \return string (XML formatted) */ virtual std::string str(int _indent = 0); |