frepple::utils::XMLElement Class Reference
This class represents an XML element being read in from the input file. More...
#include <utils.h>

Public Member Functions | |
| void | addData (const char *pData, size_t len) |
| bool | getBool () const |
| const char * | getData () const |
| virtual Date | getDate () const |
| virtual double | getDouble () const |
| virtual int | getInt () const |
| virtual long | getLong () const |
| virtual string | getString () const |
| virtual TimePeriod | getTimeperiod () const |
| virtual unsigned long | getUnsignedLong () const |
| virtual | operator bool () const |
| void | reset () |
| void | setData (const char *pData) |
| XMLElement (const string &v) | |
| XMLElement () | |
| virtual | ~XMLElement () |
Detailed Description
This class represents an XML element being read in from the input file.
Definition at line 2700 of file utils.h.
Constructor & Destructor Documentation
| frepple::utils::XMLElement::XMLElement | ( | ) | [inline] |
| frepple::utils::XMLElement::XMLElement | ( | const string & | v | ) | [inline] |
| virtual frepple::utils::XMLElement::~XMLElement | ( | ) | [inline, virtual] |
Member Function Documentation
| void frepple::utils::XMLElement::addData | ( | const char * | pData, | |
| size_t | len | |||
| ) | [inline] |
| bool frepple::utils::XMLElement::getBool | ( | ) | const [virtual] |
Interprets the element as a boolean value.
Our implementation is a bit more generous and forgiving than the boolean datatype that is part of the XML schema v2 standard. The standard expects the following literals:
{true, false, 1, 0}
Our implementation uses only the first charater of the text, and is case insensitive. It thus matches a wider range of values:
{t.*, T.*, f.*, F.*, 1.*, 0.*}
Reimplemented from frepple::utils::DataElement.
Definition at line 651 of file xmlparser.cpp.
| const char* frepple::utils::XMLElement::getData | ( | ) | const [inline] |
| virtual Date frepple::utils::XMLElement::getDate | ( | ) | const [inline, virtual] |
Reimplemented from frepple::utils::DataElement.
| virtual double frepple::utils::XMLElement::getDouble | ( | ) | const [inline, virtual] |
Reimplemented from frepple::utils::DataElement.
| virtual int frepple::utils::XMLElement::getInt | ( | ) | const [inline, virtual] |
Reimplemented from frepple::utils::DataElement.
| virtual long frepple::utils::XMLElement::getLong | ( | ) | const [inline, virtual] |
Reimplemented from frepple::utils::DataElement.
| virtual string frepple::utils::XMLElement::getString | ( | ) | const [inline, virtual] |
Returns the string value of the XML data. The xerces library takes care of appropriately unescaping special character sequences.
Reimplemented from frepple::utils::DataElement.
| virtual TimePeriod frepple::utils::XMLElement::getTimeperiod | ( | ) | const [inline, virtual] |
Reimplemented from frepple::utils::DataElement.
| virtual unsigned long frepple::utils::XMLElement::getUnsignedLong | ( | ) | const [inline, virtual] |
Reimplemented from frepple::utils::DataElement.
| virtual frepple::utils::XMLElement::operator bool | ( | ) | const [inline, virtual] |
Reimplemented from frepple::utils::DataElement.
| void frepple::utils::XMLElement::reset | ( | ) | [inline] |
| void frepple::utils::XMLElement::setData | ( | const char * | pData | ) | [inline] |
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
