Orocos Real-Time Toolkit
2.9.0
|
The element is a container class. More...
#include <rtt/marsh/tinyxml.h>
Public Types | |
enum | NodeType { DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, DECLARATION, TYPECOUNT } |
The types of XML nodes supported by TinyXml. More... | |
enum | { TIXML_NO_ERROR = 0, TIXML_ERROR, TIXML_ERROR_OPENING_FILE, TIXML_ERROR_OUT_OF_MEMORY, TIXML_ERROR_PARSING_ELEMENT, TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, TIXML_ERROR_READING_ELEMENT_VALUE, TIXML_ERROR_READING_ATTRIBUTES, TIXML_ERROR_PARSING_EMPTY, TIXML_ERROR_READING_END_TAG, TIXML_ERROR_PARSING_UNKNOWN, TIXML_ERROR_PARSING_COMMENT, TIXML_ERROR_PARSING_DECLARATION, TIXML_ERROR_DOCUMENT_EMPTY, TIXML_ERROR_EMBEDDED_NULL, TIXML_ERROR_PARSING_CDATA, TIXML_ERROR_STRING_COUNT } |
Public Member Functions | |
TiXmlElement (const char *in_value) | |
Construct an element. More... | |
TiXmlElement (const TiXmlElement &) | |
void | operator= (const TiXmlElement &base) |
virtual | ~TiXmlElement () |
const char * | Attribute (const char *name) const |
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. More... | |
const char * | Attribute (const char *name, int *i) const |
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. More... | |
const char * | Attribute (const char *name, double *d) const |
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. More... | |
int | QueryIntAttribute (const char *name, int *_value) const |
QueryIntAttribute examines the attribute - it is an alternative to the Attribute() method with richer error checking. More... | |
int | QueryDoubleAttribute (const char *name, double *_value) const |
QueryDoubleAttribute examines the attribute - see QueryIntAttribute(). More... | |
int | QueryFloatAttribute (const char *name, float *_value) const |
QueryFloatAttribute examines the attribute - see QueryIntAttribute(). More... | |
void | SetAttribute (const char *name, const char *_value) |
Sets an attribute of name to a given value. More... | |
void | SetAttribute (const char *name, int value) |
Sets an attribute of name to a given value. More... | |
void | SetDoubleAttribute (const char *name, double value) |
Sets an attribute of name to a given value. More... | |
void | RemoveAttribute (const char *name) |
Deletes an attribute with the given name. More... | |
const TiXmlAttribute * | FirstAttribute () const |
Access the first attribute in this element. More... | |
TiXmlAttribute * | FirstAttribute () |
const TiXmlAttribute * | LastAttribute () const |
Access the last attribute in this element. More... | |
TiXmlAttribute * | LastAttribute () |
const char * | GetText () const |
Convenience function for easy access to the text inside an element. More... | |
virtual TiXmlNode * | Clone () const |
Creates a new Element and returns it - the returned element is a copy. More... | |
virtual void | Print (FILE *cfile, int depth) const |
All TinyXml classes can print themselves to a filestream. More... | |
virtual const char * | Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) |
virtual const TiXmlElement * | ToElement () const |
Cast to a more defined type. Will return null not of the requested type. More... | |
virtual TiXmlElement * | ToElement () |
Cast to a more defined type. Will return null not of the requested type. More... | |
const char * | Value () const |
The meaning of 'value' changes for the specific type of TiXmlNode. More... | |
void | SetValue (const char *_value) |
Changes the value of the node. More... | |
void | Clear () |
Delete all the children of this node. Does not affect 'this'. More... | |
TiXmlNode * | Parent () |
One step up the DOM. More... | |
const TiXmlNode * | Parent () const |
const TiXmlNode * | FirstChild () const |
The first child of this node. Will be null if there are no children. More... | |
TiXmlNode * | FirstChild () |
const TiXmlNode * | FirstChild (const char *value) const |
The first child of this node with the matching 'value'. Will be null if none found. More... | |
TiXmlNode * | FirstChild (const char *value) |
The first child of this node with the matching 'value'. Will be null if none found. More... | |
const TiXmlNode * | LastChild () const |
TiXmlNode * | LastChild () |
The last child of this node. Will be null if there are no children. More... | |
const TiXmlNode * | LastChild (const char *value) const |
TiXmlNode * | LastChild (const char *value) |
The last child of this node matching 'value'. Will be null if there are no children. More... | |
const TiXmlNode * | IterateChildren (const TiXmlNode *previous) const |
An alternate way to walk the children of a node. More... | |
TiXmlNode * | IterateChildren (TiXmlNode *previous) |
const TiXmlNode * | IterateChildren (const char *value, const TiXmlNode *previous) const |
This flavor of IterateChildren searches for children with a particular 'value'. More... | |
TiXmlNode * | IterateChildren (const char *value, TiXmlNode *previous) |
TiXmlNode * | InsertEndChild (const TiXmlNode &addThis) |
Add a new node related to this. More... | |
TiXmlNode * | LinkEndChild (TiXmlNode *addThis) |
Add a new node related to this. More... | |
TiXmlNode * | InsertBeforeChild (TiXmlNode *beforeThis, const TiXmlNode &addThis) |
Add a new node related to this. More... | |
TiXmlNode * | InsertAfterChild (TiXmlNode *afterThis, const TiXmlNode &addThis) |
Add a new node related to this. More... | |
TiXmlNode * | ReplaceChild (TiXmlNode *replaceThis, const TiXmlNode &withThis) |
Replace a child of this node. More... | |
bool | RemoveChild (TiXmlNode *removeThis) |
Delete a child of this node. More... | |
const TiXmlNode * | PreviousSibling () const |
Navigate to a sibling node. More... | |
TiXmlNode * | PreviousSibling () |
const TiXmlNode * | PreviousSibling (const char *) const |
Navigate to a sibling node. More... | |
TiXmlNode * | PreviousSibling (const char *) |
const TiXmlNode * | NextSibling () const |
Navigate to a sibling node. More... | |
TiXmlNode * | NextSibling () |
const TiXmlNode * | NextSibling (const char *) const |
Navigate to a sibling node with the given 'value'. More... | |
TiXmlNode * | NextSibling (const char *) |
const TiXmlElement * | NextSiblingElement () const |
Convenience function to get through elements. More... | |
TiXmlElement * | NextSiblingElement () |
const TiXmlElement * | NextSiblingElement (const char *) const |
Convenience function to get through elements. More... | |
TiXmlElement * | NextSiblingElement (const char *) |
const TiXmlElement * | FirstChildElement () const |
Convenience function to get through elements. More... | |
TiXmlElement * | FirstChildElement () |
const TiXmlElement * | FirstChildElement (const char *value) const |
Convenience function to get through elements. More... | |
TiXmlElement * | FirstChildElement (const char *value) |
int | Type () const |
Query the type (as an enumerated value, above) of this node. More... | |
const TiXmlDocument * | GetDocument () const |
Return a pointer to the Document this node lives in. More... | |
TiXmlDocument * | GetDocument () |
bool | NoChildren () const |
Returns true if this node has no children. More... | |
virtual const TiXmlDocument * | ToDocument () const |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual TiXmlDocument * | ToDocument () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual const TiXmlComment * | ToComment () const |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual TiXmlComment * | ToComment () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual const TiXmlUnknown * | ToUnknown () const |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual TiXmlUnknown * | ToUnknown () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual const TiXmlText * | ToText () const |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual TiXmlText * | ToText () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual const TiXmlDeclaration * | ToDeclaration () const |
Cast to a more defined type. Will return null if not of the requested type. More... | |
virtual TiXmlDeclaration * | ToDeclaration () |
Cast to a more defined type. Will return null if not of the requested type. More... | |
int | Row () const |
Return the position, in the original source file, of this node or attribute. More... | |
int | Column () const |
See Row() More... | |
void | SetUserData (void *user) |
void * | GetUserData () |
Static Public Member Functions | |
static void | SetCondenseWhiteSpace (bool condense) |
The world does not agree on whether white space should be kept or not. More... | |
static bool | IsWhiteSpaceCondensed () |
Return the current white space setting. More... | |
Static Public Attributes | |
static const int | utf8ByteTable [256] |
Protected Member Functions | |
void | CopyTo (TiXmlElement *target) const |
void | ClearThis () |
virtual void | StreamOut (TIXML_OSTREAM *out) const |
const char * | ReadValue (const char *in, TiXmlParsingData *prevData, TiXmlEncoding encoding) |
void | CopyTo (TiXmlNode *target) const |
TiXmlNode * | Identify (const char *start, TiXmlEncoding encoding) |
Static Protected Member Functions | |
static const char * | SkipWhiteSpace (const char *, TiXmlEncoding encoding) |
static bool | IsWhiteSpace (char c) |
static bool | IsWhiteSpace (int c) |
static const char * | ReadName (const char *p, TIXML_STRING *name, TiXmlEncoding encoding) |
static const char * | ReadText (const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding) |
static const char * | GetEntity (const char *in, char *value, int *length, TiXmlEncoding encoding) |
static const char * | GetChar (const char *p, char *_value, int *length, TiXmlEncoding encoding) |
static void | PutString (const TIXML_STRING &str, TIXML_OSTREAM *out) |
static void | PutString (const TIXML_STRING &str, TIXML_STRING *out) |
static bool | StringEqual (const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding) |
static int | IsAlpha (unsigned char anyByte, TiXmlEncoding encoding) |
static int | IsAlphaNum (unsigned char anyByte, TiXmlEncoding encoding) |
static int | ToLower (int v, TiXmlEncoding encoding) |
static void | ConvertUTF32ToUTF8 (unsigned long input, char *output, int *length) |
Protected Attributes | |
TiXmlNode * | parent |
NodeType | type |
TiXmlNode * | firstChild |
TiXmlNode * | lastChild |
TIXML_STRING | value |
TiXmlNode * | prev |
TiXmlNode * | next |
TiXmlCursor | location |
void * | userData |
Field containing a generic user pointer. More... | |
Static Protected Attributes | |
static const char * | errorString [TIXML_ERROR_STRING_COUNT] |
The element is a container class.
It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes.
|
inherited |
|
inherited |
RTT::marsh::TiXmlElement::TiXmlElement | ( | const char * | in_value | ) |
Construct an element.
Definition at line 655 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::ELEMENT, RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::lastChild, RTT::marsh::TiXmlNode::TiXmlNode(), and RTT::marsh::TiXmlNode::value.
Referenced by Clone().
RTT::marsh::TiXmlElement::TiXmlElement | ( | const TiXmlElement & | copy | ) |
Definition at line 673 of file tinyxml.cpp.
References CopyTo(), RTT::marsh::TiXmlNode::firstChild, and RTT::marsh::TiXmlNode::lastChild.
|
virtual |
Definition at line 688 of file tinyxml.cpp.
References ClearThis().
const char * RTT::marsh::TiXmlElement::Attribute | ( | const char * | name | ) | const |
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists.
Definition at line 706 of file tinyxml.cpp.
References RTT::marsh::TiXmlAttributeSet::Find(), TIXML_STRING, and RTT::marsh::TiXmlAttribute::Value().
Referenced by Attribute().
const char * RTT::marsh::TiXmlElement::Attribute | ( | const char * | name, |
int * | i | ||
) | const |
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists.
If the attribute exists and can be converted to an integer, the integer value will be put in the return 'i', if 'i' is non-null.
Definition at line 718 of file tinyxml.cpp.
References Attribute().
const char * RTT::marsh::TiXmlElement::Attribute | ( | const char * | name, |
double * | d | ||
) | const |
Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists.
If the attribute exists and can be converted to an double, the double value will be put in the return 'd', if 'd' is non-null.
Definition at line 732 of file tinyxml.cpp.
References Attribute().
|
inherited |
Delete all the children of this node. Does not affect 'this'.
Definition at line 216 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::lastChild, and RTT::marsh::TiXmlNode::next.
Referenced by ClearThis(), RTT::marsh::TiXmlDocument::LoadFile(), RTT::marsh::TiXmlComment::operator=(), RTT::marsh::TiXmlDeclaration::operator=(), and RTT::marsh::TiXmlDocument::operator=().
|
protected |
Definition at line 694 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::Clear(), RTT::marsh::TiXmlAttributeSet::First(), and RTT::marsh::TiXmlAttributeSet::Remove().
Referenced by operator=(), and ~TiXmlElement().
|
virtual |
Creates a new Element and returns it - the returned element is a copy.
Implements RTT::marsh::TiXmlNode.
Definition at line 956 of file tinyxml.cpp.
References CopyTo(), TiXmlElement(), and RTT::marsh::TiXmlNode::Value().
|
inlineinherited |
|
staticprotectedinherited |
Definition at line 127 of file tinyxmlparser.cpp.
Referenced by RTT::marsh::TiXmlBase::GetEntity().
|
protectedinherited |
Definition at line 209 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::SetValue(), RTT::marsh::TiXmlBase::userData, and RTT::marsh::TiXmlNode::value.
Referenced by CopyTo(), RTT::marsh::TiXmlComment::CopyTo(), RTT::marsh::TiXmlText::CopyTo(), RTT::marsh::TiXmlDeclaration::CopyTo(), RTT::marsh::TiXmlUnknown::CopyTo(), and RTT::marsh::TiXmlDocument::SaveFile().
|
protected |
Definition at line 933 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::Clone(), RTT::marsh::TiXmlNode::CopyTo(), RTT::marsh::TiXmlAttributeSet::First(), RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::LinkEndChild(), RTT::marsh::TiXmlAttribute::Name(), RTT::marsh::TiXmlAttribute::Next(), RTT::marsh::TiXmlNode::NextSibling(), SetAttribute(), and RTT::marsh::TiXmlAttribute::Value().
Referenced by Clone(), operator=(), and TiXmlElement().
|
inline |
Access the first attribute in this element.
Definition at line 971 of file tinyxml.h.
Referenced by RTT::marsh::Tiny2CPFHandler::populateBag().
|
inline |
|
inlineinherited |
The first child of this node. Will be null if there are no children.
Definition at line 525 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlHandle::Child(), RTT::marsh::TiXmlHandle::FirstChild(), RTT::marsh::TiXmlNode::FirstChildElement(), GetText(), RTT::marsh::TiXmlNode::IterateChildren(), RTT::marsh::Tiny2CPFHandler::populateBag(), RTT::marsh::TiXmlDocument::Print(), and RTT::marsh::TiXmlDocument::StreamOut().
|
inlineinherited |
|
inherited |
The first child of this node with the matching 'value'. Will be null if none found.
Definition at line 365 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::next, and RTT::marsh::TiXmlNode::Value().
|
inherited |
The first child of this node with the matching 'value'. Will be null if none found.
Definition at line 377 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::next, and RTT::marsh::TiXmlNode::Value().
|
inherited |
Convenience function to get through elements.
Definition at line 518 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::ToElement().
Referenced by RTT::marsh::TiXmlHandle::ChildElement(), and RTT::marsh::TiXmlHandle::FirstChildElement().
|
inherited |
Definition at line 532 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::ToElement().
|
inherited |
Convenience function to get through elements.
Definition at line 546 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::ToElement().
|
inherited |
Definition at line 560 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::ToElement().
|
inlinestaticprotectedinherited |
Definition at line 323 of file tinyxml.h.
References RTT::marsh::TIXML_ENCODING_UTF8, TIXML_OSTREAM, and TIXML_STRING.
Referenced by RTT::marsh::TiXmlBase::ReadText().
|
inherited |
Return a pointer to the Document this node lives in.
Returns null if not in a document.
Definition at line 631 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::parent, and RTT::marsh::TiXmlNode::ToDocument().
Referenced by RTT::marsh::TiXmlNode::LinkEndChild(), and SetAttribute().
|
inherited |
Definition at line 643 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::parent, and RTT::marsh::TiXmlNode::ToDocument().
|
staticprotectedinherited |
Definition at line 467 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::ConvertUTF32ToUTF8(), RTT::marsh::TIXML_ENCODING_UTF8, and TIXML_STRING.
const char * RTT::marsh::TiXmlElement::GetText | ( | ) | const |
Convenience function for easy access to the text inside an element.
Although easy and concise, GetText() is limited compared to getting the TiXmlText child and accessing it directly.
If the first child of 'this' is a TiXmlText, the GetText() returns the character string of the Text node, else null is returned.
This is a convenient method for getting the text of simple contained text:
<foo>This is text</foo> const char* str = fooElement->GetText();
'str' will be a pointer to "This is text".
Note that this function can be misleading. If the element foo was created from this XML:
<foo><b>This is text</b></foo>
then the value of str would be null. The first child node isn't a text node, it is another element. From this XML:
<foo>This is <b>text</b></foo>
GetText() will return "This is ".
WARNING: GetText() accesses a child node - don't become confused with the similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are safe type casts on the referenced node.
Definition at line 967 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::ToText(), and RTT::marsh::TiXmlNode::Value().
|
inlineinherited |
|
protectedinherited |
Definition at line 843 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::IsAlpha(), RTT::marsh::TiXmlBase::IsWhiteSpace(), RTT::marsh::TiXmlNode::parent, RTT::marsh::TiXmlText::SetCDATA(), RTT::marsh::TiXmlDocument::SetError(), RTT::marsh::TiXmlBase::SkipWhiteSpace(), RTT::marsh::TiXmlBase::StringEqual(), RTT::marsh::TIXML_DEFAULT_ENCODING, RTT::marsh::TIXML_ENCODING_UNKNOWN, RTT::marsh::TiXmlBase::TIXML_ERROR_EMBEDDED_NULL, RTT::marsh::TiXmlBase::TIXML_ERROR_OUT_OF_MEMORY, TIXML_STRING, and RTT::marsh::TiXmlBase::TiXmlElement.
|
inherited |
Add a new node related to this.
Adds a child after the specified child. Returns a pointer to the new object or NULL if an error occured.
Definition at line 289 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::Clone(), RTT::marsh::TiXmlNode::lastChild, RTT::marsh::TiXmlNode::next, RTT::marsh::TiXmlNode::parent, and RTT::marsh::TiXmlNode::prev.
|
inherited |
Add a new node related to this.
Adds a child before the specified child. Returns a pointer to the new object or NULL if an error occured.
Definition at line 263 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::Clone(), RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::next, RTT::marsh::TiXmlNode::parent, and RTT::marsh::TiXmlNode::prev.
Add a new node related to this.
Adds a child past the LastChild. Returns a pointer to the new object or NULL if an error occured.
Definition at line 253 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::Clone(), and RTT::marsh::TiXmlNode::LinkEndChild().
|
staticprotectedinherited |
Definition at line 168 of file tinyxmlparser.cpp.
Referenced by RTT::marsh::TiXmlNode::Identify(), and RTT::marsh::TiXmlBase::ReadName().
|
staticprotectedinherited |
Definition at line 189 of file tinyxmlparser.cpp.
Referenced by RTT::marsh::TiXmlBase::ReadName().
|
inlinestaticprotectedinherited |
Definition at line 284 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlText::Blank(), RTT::marsh::TiXmlNode::Identify(), RTT::marsh::TiXmlAttribute::Parse(), RTT::marsh::TiXmlDeclaration::Parse(), RTT::marsh::TiXmlBase::ReadText(), and RTT::marsh::TiXmlBase::SkipWhiteSpace().
|
inlinestaticprotectedinherited |
Definition at line 288 of file tinyxml.h.
References TIXML_OSTREAM, and TIXML_STRING.
|
inlinestaticinherited |
Return the current white space setting.
Definition at line 215 of file tinyxml.h.
Referenced by ReadValue().
|
inherited |
An alternate way to walk the children of a node.
One way to iterate over nodes is:
for( child = parent->FirstChild(); child; child = child->NextSibling() )
IterateChildren does the same thing with the syntax:
child = 0; while( child = parent->IterateChildren( child ) )
IterateChildren takes the previous child as input and finds the next one. If the previous child is null, it returns the first. IterateChildren will return null when done.
Definition at line 411 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::parent.
Definition at line 424 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::parent.
|
inherited |
This flavor of IterateChildren searches for children with a particular 'value'.
Definition at line 437 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::parent.
|
inherited |
Definition at line 450 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::parent.
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Definition at line 389 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::lastChild, RTT::marsh::TiXmlNode::prev, and RTT::marsh::TiXmlNode::Value().
|
inherited |
The last child of this node matching 'value'. Will be null if there are no children.
Definition at line 400 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::lastChild, RTT::marsh::TiXmlNode::prev, and RTT::marsh::TiXmlNode::Value().
Add a new node related to this.
Adds a child past the LastChild.
NOTE: the node to be added is passed by pointer, and will be henceforth owned (and deleted) by tinyXml. This method is efficient and avoids an extra copy, but should be used with care as it uses a different memory model than the other insert functions.
Definition at line 233 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::GetDocument(), RTT::marsh::TiXmlNode::lastChild, RTT::marsh::TiXmlNode::next, RTT::marsh::TiXmlNode::parent, and RTT::marsh::TiXmlNode::prev.
Referenced by CopyTo(), RTT::marsh::TiXmlNode::InsertEndChild(), and RTT::marsh::TiXmlDocument::SaveFile().
|
inlineinherited |
Navigate to a sibling node.
Definition at line 621 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlHandle::Child(), CopyTo(), RTT::marsh::TiXmlNode::FirstChildElement(), RTT::marsh::TiXmlNode::IterateChildren(), RTT::marsh::TiXmlNode::NextSiblingElement(), RTT::marsh::Tiny2CPFHandler::populateBag(), Print(), RTT::marsh::TiXmlDocument::Print(), RTT::marsh::TiXmlDocument::SaveFile(), StreamOut(), and RTT::marsh::TiXmlDocument::StreamOut().
|
inlineinherited |
|
inherited |
Navigate to a sibling node with the given 'value'.
Definition at line 463 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::next, and RTT::marsh::TiXmlNode::Value().
|
inherited |
Definition at line 474 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::next, and RTT::marsh::TiXmlNode::Value().
|
inherited |
Convenience function to get through elements.
Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element.
Definition at line 574 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::ToElement().
Referenced by RTT::marsh::TiXmlHandle::ChildElement().
|
inherited |
Definition at line 588 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::ToElement().
|
inherited |
Convenience function to get through elements.
Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element.
Definition at line 602 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::ToElement().
|
inherited |
Definition at line 616 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::NextSibling(), and RTT::marsh::TiXmlNode::ToElement().
|
inlineinherited |
void RTT::marsh::TiXmlElement::operator= | ( | const TiXmlElement & | base | ) |
Definition at line 681 of file tinyxml.cpp.
References ClearThis(), and CopyTo().
|
inlineinherited |
|
inlineinherited |
|
virtual |
Implements RTT::marsh::TiXmlBase.
Definition at line 1062 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlParsingData::Cursor(), RTT::marsh::TiXmlBase::location, RTT::marsh::TiXmlAttribute::NameTStr(), RTT::marsh::TiXmlAttribute::Parse(), RTT::marsh::TiXmlBase::ReadName(), RTT::marsh::TiXmlAttribute::SetDocument(), RTT::marsh::TiXmlDocument::SetError(), RTT::marsh::TiXmlAttribute::SetValue(), RTT::marsh::TiXmlBase::SkipWhiteSpace(), RTT::marsh::TiXmlParsingData::Stamp(), RTT::marsh::TiXmlBase::StringEqual(), RTT::marsh::TiXmlBase::TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, RTT::marsh::TiXmlBase::TIXML_ERROR_OUT_OF_MEMORY, RTT::marsh::TiXmlBase::TIXML_ERROR_PARSING_ELEMENT, RTT::marsh::TiXmlBase::TIXML_ERROR_PARSING_EMPTY, RTT::marsh::TiXmlBase::TIXML_ERROR_READING_ATTRIBUTES, RTT::marsh::TiXmlBase::TIXML_ERROR_READING_END_TAG, TIXML_STRING, and RTT::marsh::TiXmlAttribute::Value().
|
inlineinherited |
|
inlineinherited |
|
inherited |
Navigate to a sibling node.
Definition at line 485 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::prev, and RTT::marsh::TiXmlNode::Value().
|
inherited |
Definition at line 496 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::prev, and RTT::marsh::TiXmlNode::Value().
|
virtual |
All TinyXml classes can print themselves to a filestream.
This is a formatted print, and will insert tabs and newlines.
(For an unformatted stream, use the << operator.)
Implements RTT::marsh::TiXmlBase.
Definition at line 851 of file tinyxml.cpp.
References RTT::marsh::TiXmlAttributeSet::First(), RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::lastChild, RTT::marsh::TiXmlAttribute::Next(), RTT::marsh::TiXmlNode::NextSibling(), RTT::marsh::TiXmlBase::Print(), RTT::marsh::TiXmlNode::ToText(), and RTT::marsh::TiXmlNode::value.
|
staticprotectedinherited |
Definition at line 75 of file tinyxml.cpp.
References TIXML_STRING.
Referenced by RTT::marsh::TiXmlAttribute::Print(), RTT::marsh::TiXmlText::Print(), RTT::marsh::TiXmlAttribute::StreamOut(), RTT::marsh::TiXmlText::StreamOut(), and RTT::marsh::TiXmlDeclaration::StreamOut().
|
staticprotectedinherited |
Definition at line 82 of file tinyxml.cpp.
int RTT::marsh::TiXmlElement::QueryDoubleAttribute | ( | const char * | name, |
double * | _value | ||
) | const |
QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
Definition at line 757 of file tinyxml.cpp.
References RTT::marsh::TiXmlAttributeSet::Find(), RTT::marsh::TiXmlAttribute::QueryDoubleValue(), RTT::marsh::TIXML_NO_ATTRIBUTE, and TIXML_STRING.
|
inline |
QueryFloatAttribute examines the attribute - see QueryIntAttribute().
Definition at line 927 of file tinyxml.h.
References RTT::marsh::TIXML_SUCCESS.
int RTT::marsh::TiXmlElement::QueryIntAttribute | ( | const char * | name, |
int * | _value | ||
) | const |
QueryIntAttribute examines the attribute - it is an alternative to the Attribute() method with richer error checking.
If the attribute is an integer, it is stored in 'value' and the call returns TIXML_SUCCESS. If it is not an integer, it returns TIXML_WRONG_TYPE. If the attribute does not exist, then TIXML_NO_ATTRIBUTE is returned.
Definition at line 746 of file tinyxml.cpp.
References RTT::marsh::TiXmlAttributeSet::Find(), RTT::marsh::TiXmlAttribute::QueryIntValue(), RTT::marsh::TIXML_NO_ATTRIBUTE, and TIXML_STRING.
|
staticprotectedinherited |
Definition at line 437 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::IsAlpha(), and RTT::marsh::TiXmlBase::IsAlphaNum().
Referenced by RTT::marsh::TiXmlAttribute::Parse(), and Parse().
|
staticprotectedinherited |
Definition at line 601 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::GetChar(), RTT::marsh::TiXmlBase::IsWhiteSpace(), RTT::marsh::TiXmlBase::SkipWhiteSpace(), RTT::marsh::TiXmlBase::StringEqual(), RTT::marsh::TIXML_DEFAULT_ENCODING, RTT::marsh::TIXML_ENCODING_UNKNOWN, RTT::marsh::TiXmlBase::TIXML_ERROR, RTT::marsh::TiXmlBase::TIXML_ERROR_EMBEDDED_NULL, RTT::marsh::TiXmlBase::TIXML_ERROR_PARSING_EMPTY, TIXML_STRING, and RTT::marsh::TiXmlNode::ToElement().
Referenced by RTT::marsh::TiXmlAttribute::Parse(), RTT::marsh::TiXmlComment::Parse(), and RTT::marsh::TiXmlText::Parse().
|
protected |
Definition at line 1182 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlText::Blank(), RTT::marsh::TiXmlBase::IsWhiteSpaceCondensed(), RTT::marsh::TiXmlBase::Parse(), RTT::marsh::TiXmlText::Parse(), RTT::marsh::TiXmlDocument::SetError(), RTT::marsh::TiXmlBase::SkipWhiteSpace(), RTT::marsh::TiXmlBase::StringEqual(), RTT::marsh::TIXML_ENCODING_UNKNOWN, RTT::marsh::TiXmlBase::TIXML_ERROR_EMBEDDED_NULL, RTT::marsh::TiXmlBase::TIXML_ERROR_OUT_OF_MEMORY, RTT::marsh::TiXmlBase::TIXML_ERROR_READING_ELEMENT_VALUE, and TIXML_STRING.
void RTT::marsh::TiXmlElement::RemoveAttribute | ( | const char * | name | ) |
Deletes an attribute with the given name.
Definition at line 507 of file tinyxml.cpp.
References TIXML_STRING.
|
inherited |
Delete a child of this node.
Definition at line 343 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::lastChild, RTT::marsh::TiXmlNode::next, RTT::marsh::TiXmlNode::parent, and RTT::marsh::TiXmlNode::prev.
|
inherited |
Replace a child of this node.
Returns a pointer to the new object or NULL if an error occured.
Definition at line 315 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::Clone(), RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlNode::lastChild, RTT::marsh::TiXmlNode::next, RTT::marsh::TiXmlNode::parent, and RTT::marsh::TiXmlNode::prev.
|
inlineinherited |
Return the position, in the original source file, of this node or attribute.
The row and column are 1-based. (That is the first row and first column is 1,1). If the returns values are 0 or less, then the parser does not have a row and column value.
Generally, the row and column value will be set when the TiXmlDocument::Load(), TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set when the DOM was created from operator>>.
The values reflect the initial load. Once the DOM is modified programmatically (by adding or changing nodes and attributes) the new values will NOT update to reflect changes in the document.
There is a minor performance cost to computing the row and column. Computation can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value.
Definition at line 235 of file tinyxml.h.
Referenced by RTT::marsh::Tiny2CPFHandler::populateBag().
void RTT::marsh::TiXmlElement::SetAttribute | ( | const char * | name, |
const char * | _value | ||
) |
Sets an attribute of name to a given value.
The attribute will be created if it does not exist, or changed if it does.
Definition at line 802 of file tinyxml.cpp.
References RTT::marsh::TiXmlAttributeSet::Add(), RTT::marsh::TiXmlAttributeSet::Find(), RTT::marsh::TiXmlNode::GetDocument(), RTT::marsh::TiXmlDocument::SetError(), RTT::marsh::TiXmlAttribute::SetValue(), RTT::marsh::TIXML_ENCODING_UNKNOWN, RTT::marsh::TiXmlBase::TIXML_ERROR_OUT_OF_MEMORY, and TIXML_STRING.
Referenced by CopyTo(), SetAttribute(), and SetDoubleAttribute().
void RTT::marsh::TiXmlElement::SetAttribute | ( | const char * | name, |
int | value | ||
) |
Sets an attribute of name to a given value.
The attribute will be created if it does not exist, or changed if it does.
Definition at line 768 of file tinyxml.cpp.
References SetAttribute().
|
inlinestaticinherited |
The world does not agree on whether white space should be kept or not.
In order to make everyone happy, these global, static functions are provided to set whether or not TinyXml will condense all white space into a single space or not. The default is to condense. Note changing this values is not thread safe.
void RTT::marsh::TiXmlElement::SetDoubleAttribute | ( | const char * | name, |
double | value | ||
) |
Sets an attribute of name to a given value.
The attribute will be created if it does not exist, or changed if it does.
Definition at line 790 of file tinyxml.cpp.
References SetAttribute().
|
inlineinherited |
|
inlineinherited |
Changes the value of the node.
Defined as:
Document: filename of the xml file Element: name of the element Comment: the comment text Unknown: the tag contents Text: the text string
Definition at line 511 of file tinyxml.h.
References RTT::marsh::TiXmlCursor::Clear().
Referenced by RTT::marsh::TiXmlNode::CopyTo(), RTT::marsh::TiXmlAttribute::SetDoubleValue(), and RTT::marsh::TiXmlAttribute::SetIntValue().
|
staticprotectedinherited |
Definition at line 353 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::IsWhiteSpace(), RTT::marsh::TIXML_ENCODING_UTF8, TIXML_STRING, and RTT::marsh::TIXML_UTF_LEAD_2.
Referenced by RTT::marsh::TiXmlNode::Identify(), RTT::marsh::TiXmlAttribute::Parse(), Parse(), RTT::marsh::TiXmlComment::Parse(), RTT::marsh::TiXmlDeclaration::Parse(), RTT::marsh::TiXmlUnknown::Parse(), RTT::marsh::TiXmlDocument::Parse(), RTT::marsh::TiXmlBase::ReadText(), and ReadValue().
|
protectedvirtual |
Implements RTT::marsh::TiXmlBase.
Definition at line 902 of file tinyxml.cpp.
References RTT::marsh::TiXmlAttributeSet::First(), RTT::marsh::TiXmlNode::firstChild, RTT::marsh::TiXmlAttribute::Next(), RTT::marsh::TiXmlNode::NextSibling(), RTT::marsh::TiXmlBase::StreamOut(), RTT::marsh::TiXmlAttribute::StreamOut(), and RTT::marsh::TiXmlNode::value.
|
staticprotectedinherited |
Definition at line 561 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::ToLower().
Referenced by RTT::marsh::TiXmlNode::Identify(), Parse(), RTT::marsh::TiXmlComment::Parse(), RTT::marsh::TiXmlText::Parse(), RTT::marsh::TiXmlDeclaration::Parse(), RTT::marsh::TiXmlDocument::Parse(), RTT::marsh::TiXmlBase::ReadText(), and ReadValue().
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlComment.
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlComment.
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlDeclaration.
Definition at line 680 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlDocument::Parse().
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlDeclaration.
Definition at line 687 of file tinyxml.h.
References TIXML_STRING.
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlDocument.
Definition at line 675 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::GetDocument().
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlDocument.
|
inlinevirtual |
Cast to a more defined type. Will return null not of the requested type.
Reimplemented from RTT::marsh::TiXmlNode.
|
inlinevirtual |
Cast to a more defined type. Will return null not of the requested type.
Reimplemented from RTT::marsh::TiXmlNode.
Definition at line 1021 of file tinyxml.h.
References TIXML_OSTREAM, and TIXML_STRING.
|
inlinestaticprotectedinherited |
Definition at line 384 of file tinyxml.h.
References RTT::marsh::TIXML_ENCODING_UTF8.
Referenced by RTT::marsh::TiXmlBase::StringEqual().
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlText.
Definition at line 679 of file tinyxml.h.
Referenced by GetText(), RTT::marsh::Tiny2CPFHandler::populateBag(), and Print().
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlText.
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlUnknown.
|
inlinevirtualinherited |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in RTT::marsh::TiXmlUnknown.
|
inlineinherited |
Query the type (as an enumerated value, above) of this node.
The possible types are: DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, and DECLARATION.
Definition at line 664 of file tinyxml.h.
Referenced by RTT::marsh::Tiny2CPFHandler::populateBag().
|
inlineinherited |
The meaning of 'value' changes for the specific type of TiXmlNode.
Document: filename of the xml file Element: name of the element Comment: the comment text Unknown: the tag contents Text: the text string
The subclasses will wrap this function.
Definition at line 492 of file tinyxml.h.
Referenced by Clone(), RTT::marsh::TiXmlNode::FirstChild(), GetText(), RTT::marsh::TiXmlNode::LastChild(), RTT::marsh::TiXmlNode::NextSibling(), RTT::marsh::Tiny2CPFHandler::populateBag(), and RTT::marsh::TiXmlNode::PreviousSibling().
|
staticprotectedinherited |
Definition at line 373 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlDocument::SetError().
|
protectedinherited |
Definition at line 712 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::Clear(), CopyTo(), RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::InsertBeforeChild(), RTT::marsh::TiXmlNode::LinkEndChild(), Print(), RTT::marsh::TiXmlNode::RemoveChild(), RTT::marsh::TiXmlNode::ReplaceChild(), RTT::marsh::TiXmlDocument::SaveFile(), StreamOut(), TiXmlElement(), RTT::marsh::TiXmlNode::TiXmlNode(), and RTT::marsh::TiXmlNode::~TiXmlNode().
|
protectedinherited |
Definition at line 713 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::Clear(), RTT::marsh::TiXmlNode::InsertAfterChild(), RTT::marsh::TiXmlNode::LastChild(), RTT::marsh::TiXmlNode::LinkEndChild(), Print(), RTT::marsh::TiXmlNode::RemoveChild(), RTT::marsh::TiXmlNode::ReplaceChild(), TiXmlElement(), and RTT::marsh::TiXmlNode::TiXmlNode().
|
protectedinherited |
Definition at line 375 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlDocument::LoadFile(), RTT::marsh::TiXmlAttribute::Parse(), Parse(), RTT::marsh::TiXmlComment::Parse(), RTT::marsh::TiXmlText::Parse(), RTT::marsh::TiXmlDeclaration::Parse(), RTT::marsh::TiXmlUnknown::Parse(), and RTT::marsh::TiXmlDocument::Parse().
|
protectedinherited |
Definition at line 718 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::Clear(), RTT::marsh::TiXmlNode::FirstChild(), RTT::marsh::TiXmlNode::InsertAfterChild(), RTT::marsh::TiXmlNode::InsertBeforeChild(), RTT::marsh::TiXmlNode::LinkEndChild(), RTT::marsh::TiXmlAttribute::Next(), RTT::marsh::TiXmlNode::NextSibling(), RTT::marsh::TiXmlNode::RemoveChild(), RTT::marsh::TiXmlNode::ReplaceChild(), RTT::marsh::TiXmlNode::TiXmlNode(), and RTT::marsh::TiXmlNode::~TiXmlNode().
|
protectedinherited |
Definition at line 709 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::GetDocument(), RTT::marsh::TiXmlNode::Identify(), RTT::marsh::TiXmlNode::InsertAfterChild(), RTT::marsh::TiXmlNode::InsertBeforeChild(), RTT::marsh::TiXmlNode::IterateChildren(), RTT::marsh::TiXmlNode::LinkEndChild(), RTT::marsh::TiXmlNode::RemoveChild(), RTT::marsh::TiXmlNode::ReplaceChild(), and RTT::marsh::TiXmlNode::TiXmlNode().
|
protectedinherited |
Definition at line 717 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::InsertAfterChild(), RTT::marsh::TiXmlNode::InsertBeforeChild(), RTT::marsh::TiXmlNode::LastChild(), RTT::marsh::TiXmlNode::LinkEndChild(), RTT::marsh::TiXmlAttribute::Previous(), RTT::marsh::TiXmlNode::PreviousSibling(), RTT::marsh::TiXmlNode::RemoveChild(), RTT::marsh::TiXmlNode::ReplaceChild(), and RTT::marsh::TiXmlNode::TiXmlNode().
|
protectedinherited |
Definition at line 710 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::TiXmlNode().
|
protectedinherited |
Field containing a generic user pointer.
Definition at line 378 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::CopyTo().
|
staticinherited |
|
protectedinherited |
Definition at line 715 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::CopyTo(), RTT::marsh::TiXmlAttribute::DoubleValue(), RTT::marsh::TiXmlAttribute::IntValue(), RTT::marsh::TiXmlDocument::LoadFile(), RTT::marsh::TiXmlAttribute::Next(), RTT::marsh::TiXmlAttribute::Previous(), RTT::marsh::TiXmlAttribute::Print(), Print(), RTT::marsh::TiXmlComment::Print(), RTT::marsh::TiXmlText::Print(), RTT::marsh::TiXmlUnknown::Print(), RTT::marsh::TiXmlAttribute::QueryDoubleValue(), RTT::marsh::TiXmlAttribute::QueryIntValue(), RTT::marsh::TiXmlDocument::SaveFile(), RTT::marsh::TiXmlAttribute::StreamOut(), StreamOut(), RTT::marsh::TiXmlComment::StreamOut(), RTT::marsh::TiXmlText::StreamOut(), RTT::marsh::TiXmlUnknown::StreamOut(), RTT::marsh::TiXmlDocument::TiXmlDocument(), and TiXmlElement().