#include <XmlElement.h>
Inheritance diagram for XmlElement:
A derived class must implement the pure virtual functions probably using an external XML package.
Definition at line 30 of file XmlElement.h.
Public Types | |
typedef std::list< XmlElement * > | NodeList_t |
The type of container used to store XmlElement nodes. | |
Public Member Functions | |
virtual void | appendChild (const XmlNode &child)=0 |
Appends a child element to the element. | |
virtual bool | attribute (const std::string &name, std::string &value) const =0 |
Sets value to the attribute name's value. | |
virtual bool | attribute (const std::string &name, double &value) const=0 |
Sets value to the attribute name's value. | |
virtual bool | attribute (const std::string &name, float &value) const=0 |
Sets value to the attribute name's value. | |
virtual bool | attribute (const std::string &name, unsigned int &value) const=0 |
Sets value to the attribute name's value. | |
virtual bool | attribute (const std::string &name, int &value) const=0 |
Sets value to the attribute name's value. | |
virtual bool | attribute (const std::string &name, bool &value) const=0 |
Sets value to the attribute name's value. | |
virtual void | fillNodeList (const std::string &tagName, std::list< XmlElement * > &nodeList) const=0 |
Fills the nodeList with elements with tag name tagName. | |
virtual int | getID () const=0 |
Returns the ID of the element, if it has one. | |
virtual XmlElement * | getNode (const std::string &tagName) const=0 |
Returns the single direct child element node with name tagName. | |
virtual const std::string & | getText () const=0 |
Gets the text node from the element. | |
virtual void | setAttribute (const std::string &name, const std::string &value)=0 |
Sets attribute named name to the string value value. | |
virtual void | setAttribute (const std::string &name, double value)=0 |
Sets attribute named name to the double value value. | |
virtual void | setAttribute (const std::string &name, float value)=0 |
Sets attribute named name to the float value value. | |
virtual void | setAttribute (const std::string &name, unsigned int value)=0 |
Sets attribute named name to the unsigned int value value. | |
virtual void | setAttribute (const std::string &name, int value)=0 |
Sets attribute named name to the int value value. | |
virtual void | setAttribute (const std::string &name, bool value)=0 |
Sets attribute named name to the int value value. | |
virtual std::string | tagName () const=0 |
Returns the tag name of the element. | |
virtual | ~XmlElement () |
The destructor. | |
Protected Member Functions | |
XmlElement () | |
The default constructor. | |
Private Member Functions | |
XmlElement (const XmlElement &) | |
A private copy constructor in order to avoid copying. |
typedef std::list< XmlElement * > NodeList_t |
XmlElement | ( | const XmlElement & | ) | [private] |
A private copy constructor in order to avoid copying.
XmlElement | ( | ) | [protected] |
~XmlElement | ( | ) | [virtual] |
virtual void appendChild | ( | const XmlNode & | child | ) | [pure virtual, inherited] |
Appends a child element to the element.
Implemented in QtXmlNode.
Referenced by XmlController::addDataSource(), XmlController::addViews(), PlotterBaseXML::createAxisModel(), ViewBaseXML::createChild(), PlotterBaseXML::createChildren(), NTupleProjectorXML::createChildren(), DataRepXML::createChildren(), BinsBaseXML::createChildren(), BinningProjectorXML::createChildren(), AxisModelXML::createChildren(), PlotterBaseXML::createCutChildren(), PointRepXML::createElement(), PlotterBaseXML::createFontElement(), PlotterBaseXML::createFontElements(), DataRepXML::createFunctionTargetChild(), and PlotterBaseXML::createTextChildren().
virtual bool attribute | ( | const std::string & | name, | |
std::string & | value | |||
) | const [pure virtual] |
Sets value to the attribute name's value.
If attribute of name name exists returns true
, otherwise does not change value and returns false
.
Implemented in QtXmlElement.
virtual bool attribute | ( | const std::string & | name, | |
double & | value | |||
) | const [pure virtual] |
Sets value to the attribute name's value.
If attribute of name name exists returns true
, otherwise does not change value and returns false
.
Implemented in QtXmlElement.
virtual bool attribute | ( | const std::string & | name, | |
float & | value | |||
) | const [pure virtual] |
Sets value to the attribute name's value.
If attribute of name name exists returns true
, otherwise does not change value and returns false
.
Implemented in QtXmlElement.
virtual bool attribute | ( | const std::string & | name, | |
unsigned int & | value | |||
) | const [pure virtual] |
Sets value to the attribute name's value.
If attribute of name name exists returns true
, otherwise does not change value and returns false
.
Implemented in QtXmlElement.
virtual bool attribute | ( | const std::string & | name, | |
int & | value | |||
) | const [pure virtual] |
Sets value to the attribute name's value.
If attribute of name name exists returns true
, otherwise does not change value and returns false
.
Implemented in QtXmlElement.
virtual bool attribute | ( | const std::string & | name, | |
bool & | value | |||
) | const [pure virtual] |
Sets value to the attribute name's value.
If attribute of name name exists returns true
, otherwise does not change value and returns false
.
Implemented in QtXmlElement.
Referenced by DataRepXML::createDataRep(), TransformXML::createObject(), PointRepXML::createObject(), DataRepXML::createObject(), ColorXML::createObject(), BinsBaseXML::createObject(), BinnerAxisXML::createObject(), PlotterBaseXML::createPlotter(), AxisModelXML::getAxis(), FunctionProjectorXML::getFunctionName(), NTupleXML::getName(), HiNTupleXML::getName(), NTupleProjectorXML::getNTupleReference(), ViewBaseXML::getObjects(), AxisModelXML::isLog(), TupleCutXML::setAttributes(), AxisModelXML::setAttributes(), and TupleCutXML::setAxisAttributes().
virtual void fillNodeList | ( | const std::string & | tagName, | |
std::list< XmlElement * > & | nodeList | |||
) | const [pure virtual] |
Fills the nodeList with elements with tag name tagName.
Implemented in QtXmlElement.
Referenced by BaseXML::fillNodeList(), PlotterBaseXML::getCutTargets(), and NTupleXML::getObject().
virtual int getID | ( | ) | const [pure virtual] |
Returns the ID of the element, if it has one.
Implemented in QtXmlElement.
Referenced by NTupleProjectorXML::createElement(), DataRepXML::createObject(), PlotterBaseXML::getObject(), PlotterBaseXML::handleFunction(), and PlotterBaseXML::handleTextPlotter().
virtual XmlElement* getNode | ( | const std::string & | tagName | ) | const [pure virtual] |
Returns the single direct child element node with name tagName.
If a child of that name doesn't exist returns a null pointer. if child exists but is not an element node, an assertion is made.
Implemented in QtXmlElement.
Referenced by DataRepXML::createObject(), BaseXML::getNode(), PlotterBaseXML::handleFunction(), and PlotterBaseXML::handleTextPlotter().
virtual const std::string& getText | ( | ) | const [pure virtual] |
virtual void setAttribute | ( | const std::string & | name, | |
const std::string & | value | |||
) | [pure virtual] |
virtual void setAttribute | ( | const std::string & | name, | |
double | value | |||
) | [pure virtual] |
virtual void setAttribute | ( | const std::string & | name, | |
float | value | |||
) | [pure virtual] |
virtual void setAttribute | ( | const std::string & | name, | |
unsigned int | value | |||
) | [pure virtual] |
virtual void setAttribute | ( | const std::string & | name, | |
int | value | |||
) | [pure virtual] |
virtual void setAttribute | ( | const std::string & | name, | |
bool | value | |||
) | [pure virtual] |
Sets attribute named name to the int value value.
Implemented in QtXmlElement.
Referenced by NTupleProjectorXML::createChildren(), BinsBaseXML::createChildren(), PlotterBaseXML::createCutChildren(), ViewBaseXML::createElement(), TransformXML::createElement(), PlotterBaseXML::createElement(), NTupleProjectorXML::createElement(), MapMatrixProjectorXML::createElement(), FunctionProjectorXML::createElement(), DataRepXML::createElement(), ColorXML::createElement(), BinsBaseXML::createElement(), DataRepXML::createFunctionTargetChild(), PlotterBaseXML::createTextChildren(), PointRepXML::setAttributes(), FontXML::setAttributes(), BinnerAxisXML::setAttributes(), AxisTickXML::setAttributes(), AxisModelXML::setAttributes(), and BaseXML::setId().
virtual std::string tagName | ( | ) | const [pure virtual] |
Returns the tag name of the element.
This function is not needed for XML processing. It is only here as an aid in debugging.
Implemented in QtXmlElement.