|
| BoostDOMElem (const std::string &key, rw::core::Ptr< boost::property_tree::ptree > ptree, rw::core::Ptr< boost::property_tree::ptree > parent, rw::core::Ptr< boost::property_tree::ptree > root, BoostXMLParser *parser) |
| Construct new element. More...
|
|
bool | isName (const std::string &elemname) const |
| test if name of this elem equals elemname More...
|
|
void | setName (const std::string &val) |
| Set the name of this element. More...
|
|
const std::string & | getName () const |
| get name of this DOMElem More...
|
|
std::string | getValue () const |
| get string value of this DOMElem More...
|
|
int | getValueAsInt () const |
| get value as an integer, throws an exception if this is not an int value. More...
|
|
double | getValueAsDouble () const |
| get value as an double floating point, throws an exception if this is not an double value. More...
|
|
std::vector< std::string > | getValueAsStringList (char stringseperator=';') const |
| get value as a list of strings, throws an exception if this is not a list of strings. The default string seperator is semicolon (;). More...
|
|
std::vector< double > | getValueAsDoubleList () const |
| get value as a list of doubles, throws an exception if this is not a list of doubles. The default string seperator is space ( ). More...
|
|
std::vector< double > | getValueAsDoubleList (int size) const |
| get value as a list of N doubles, throws an exception if this is not a list of N doubles. The default string seperator is space ( ). More...
|
|
DOMElem::Ptr | getChild (const std::string &name, bool optional=false) |
| get a child with a specific name. If more children with the same name occur then it cannot be guaranteed which is returned. If optional is false then an exception will be thrown if the child cannot be found. If optional is true then NULL is returned if child is not found. More...
|
|
DOMElem::Ptr | getAttribute (const std::string &name, bool optional=false) |
| get a attribute with a specific name. If more attributes with the same name occur then it cannot be guaranteed which is returned. If optional is false then an exception will be thrown if the child cannot be found. If optional is true then NULL is returned if child is not found. More...
|
|
bool | hasChildren () const |
| test if this DOMElem has any children More...
|
|
bool | hasChild (const std::string &name) const |
| test if this DOMElem has a child by name name. More...
|
|
bool | hasAttribute (const std::string &name) const |
| test if this DOMElem has an attribute by name name. More...
|
|
rw::core::Ptr< DOMElem > | addChild (const std::string &name) |
| Add a child element. More...
|
|
rw::core::Ptr< DOMElem > | addAttribute (const std::string &name) |
| Add an attribute element. More...
|
|
void | setValue (const std::string &val) |
| Set the value of this element. More...
|
|
DOMElem::IteratorPair | getChildren () |
| Get iterator to child elements. More...
|
|
DOMElem::IteratorPair | getAttributes () |
| Get iterator to attributes. More...
|
|
DOMElem::Iterator | begin () |
| Get iterator to first child element. More...
|
|
DOMElem::Iterator | end () |
| Get iterator to last child element. More...
|
|
rw::core::Ptr< boost::property_tree::ptree > | getRoot () |
| Get the root Boost PropertyTree element. More...
|
|
virtual | ~DOMElem () |
| destructor
|
|
std::string | getAttributeValue (const std::string &name) |
| Get the value of attribute as a string. More...
|
|
std::string | getAttributeValue (const std::string &name, const std::string &default_value) |
| Get the value of attribute as a string. More...
|
|
int | getAttributeValueAsInt (const std::string &name) |
| Get the value of attribute as an integer. More...
|
|
int | getAttributeValueAsInt (const std::string &name, int default_value) |
| Get the value of attribute as an integer. More...
|
|
double | getAttributeValueAsDouble (const std::string &name) |
| Get the value of attribute as an double. More...
|
|
double | getAttributeValueAsDouble (const std::string &name, double default_value) |
| Get the value of attribute as an double. More...
|
|
bool | getValueAsBool () |
| Get the value as a boolean. More...
|
|
bool | getAttributeValueAsBool (const std::string &name) |
| Get the value of attribute as an boolean. More...
|
|
bool | getAttributeValueAsBool (const std::string &name, bool default_value) |
| Get the value of attribute as an boolean. More...
|
|
virtual rw::core::Ptr< DOMElem > | addChild () |
| Add a child with an empty name. More...
|
|
virtual void | setValue (bool val) |
| Set the value of this element. More...
|
|
virtual void | setValue (int val) |
| Set the value of this element. More...
|
|
virtual void | setValue (double val) |
| Set the value of this element. More...
|
|
virtual void | setValue (const char *val) |
| Set the value of this element. More...
|
|
virtual void | setValueString (std::string val) |
| Set the value of this element. More...
|
|
DOMElem based on Boost PropertyTree xml parser.