|
NSCL DDAS
1.0
Support for XIA DDAS at the NSCL
|
: Provide common utilities for working with Tinyxml2 More...
#include <tinyxml2.h>Go to the source code of this file.
Functions | |
| template<class T > | |
| void | readValue (T &result, tinyxml2::XMLElement &container) |
| void | getAttribute (uint32_t &result, tinyxml2::XMLElement &container, const char *att) |
| void | getAttribute (double &result, tinyxml2::XMLElement &container, const char *att) |
| void | getAttribute (bool &result, tinyxml2::XMLElement &container, const char *att) |
| tinyxml2::XMLElement * | haveChild (tinyxml2::XMLElement &parent, const char *element) |
| void | checkXmlError (tinyxml2::XMLError err, tinyxml2::XMLDocument &doc) |
: Provide common utilities for working with Tinyxml2
| void checkXmlError | ( | tinyxml2::XMLError | err, |
| tinyxml2::XMLDocument & | doc | ||
| ) |
checkXmlError IF the XML status passed in is not normal, throw an std::invalid_argument with as detailed a message as possible.
| err | - XMLError which, hopefully is success. |
| doc | - Reference to the document. |
| void getAttribute | ( | uint32_t & | result, |
| tinyxml2::XMLElement & | container, | ||
| const char * | att | ||
| ) |
Various overloads for getAttribute that call the appropriate QueryxxxAttribute.
| result | – where to put the reulst, this type varies. |
| container | - the container to query. |
| att | - attribute name (e.g. "value"). |
| tinyxml2::XMLElement* haveChild | ( | tinyxml2::XMLElement & | parent, |
| const char * | element | ||
| ) |
haveChild Checks for and returns a required child element
| parent | - the parent that's required to have the child. |
| element | - the name of the element. |
| std::invalid_argument | if the elmeent does not exist. |
| void readValue | ( | T & | result, |
| tinyxml2::XMLElement & | container | ||
| ) |
readValue Gets the contents of a "value" attribute in an element/tag.
| dest | - templated type reference to where this is stored. |
| container | - Element that contains the "value" attribute. |
1.8.8