Orocos Real-Time Toolkit
2.9.0
|
An attribute is a name-value pair. More...
#include <rtt/marsh/tinyxml.h>
Public Member Functions | |
TiXmlAttribute () | |
Construct an empty attribute. More... | |
TiXmlAttribute (const char *_name, const char *_value) | |
Construct an attribute with a name and value. More... | |
const char * | Name () const |
Return the name of this attribute. More... | |
const char * | Value () const |
Return the value of this attribute. More... | |
int | IntValue () const |
Return the value of this attribute, converted to an integer. More... | |
double | DoubleValue () const |
Return the value of this attribute, converted to a double. More... | |
const TIXML_STRING & | NameTStr () const |
int | QueryIntValue (int *_value) const |
QueryIntValue examines the value string. More... | |
int | QueryDoubleValue (double *_value) const |
QueryDoubleValue examines the value string. See QueryIntValue(). More... | |
void | SetName (const char *_name) |
Set the name of this attribute. More... | |
void | SetValue (const char *_value) |
Set the value. More... | |
void | SetIntValue (int _value) |
Set the value from an integer. More... | |
void | SetDoubleValue (double _value) |
Set the value from a double. More... | |
const TiXmlAttribute * | Next () const |
Get the next sibling attribute in the DOM. Returns null at end. More... | |
TiXmlAttribute * | Next () |
const TiXmlAttribute * | Previous () const |
Get the previous sibling attribute in the DOM. Returns null at beginning. More... | |
TiXmlAttribute * | Previous () |
bool | operator== (const TiXmlAttribute &rhs) const |
bool | operator< (const TiXmlAttribute &rhs) const |
bool | operator> (const TiXmlAttribute &rhs) const |
virtual const char * | Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) |
virtual void | Print (FILE *cfile, int depth) const |
All TinyXml classes can print themselves to a filestream. More... | |
virtual void | StreamOut (TIXML_OSTREAM *out) const |
void | SetDocument (TiXmlDocument *doc) |
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] |
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 | |
TiXmlCursor | location |
void * | userData |
Field containing a generic user pointer. More... | |
Static Protected Attributes | |
static const char * | errorString [TIXML_ERROR_STRING_COUNT] |
Friends | |
class | TiXmlAttributeSet |
An attribute is a name-value pair.
Elements have an arbitrary number of attributes, each with a unique name.
|
inherited |
|
inline |
|
inline |
|
inlineinherited |
|
staticprotectedinherited |
Definition at line 127 of file tinyxmlparser.cpp.
Referenced by RTT::marsh::TiXmlBase::GetEntity().
double RTT::marsh::TiXmlAttribute::DoubleValue | ( | ) | const |
Return the value of this attribute, converted to a double.
Definition at line 1377 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::value.
|
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().
|
staticprotectedinherited |
Definition at line 467 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::ConvertUTF32ToUTF8(), RTT::marsh::TIXML_ENCODING_UTF8, and TIXML_STRING.
|
inlineinherited |
int RTT::marsh::TiXmlAttribute::IntValue | ( | ) | const |
Return the value of this attribute, converted to an integer.
Definition at line 1372 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::value.
|
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(), 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 RTT::marsh::TiXmlElement::ReadValue().
|
inline |
Return the name of this attribute.
Definition at line 765 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlAttributeSet::Add(), RTT::marsh::TiXmlElement::CopyTo(), and RTT::marsh::Tiny2CPFHandler::startElement().
|
inline |
Definition at line 771 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlElement::Parse().
const TiXmlAttribute * RTT::marsh::TiXmlAttribute::Next | ( | ) | const |
Get the next sibling attribute in the DOM. Returns null at end.
Definition at line 1268 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::next, and RTT::marsh::TiXmlNode::value.
Referenced by RTT::marsh::TiXmlElement::CopyTo(), RTT::marsh::TiXmlElement::Print(), RTT::marsh::Tiny2CPFHandler::startElement(), and RTT::marsh::TiXmlElement::StreamOut().
TiXmlAttribute * RTT::marsh::TiXmlAttribute::Next | ( | ) |
Definition at line 1277 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::next, and RTT::marsh::TiXmlNode::value.
|
inline |
|
inline |
|
inline |
Definition at line 808 of file tinyxml.h.
References TIXML_OSTREAM.
|
virtual |
Implements RTT::marsh::TiXmlBase.
Definition at line 1366 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlParsingData::Cursor(), RTT::marsh::TiXmlBase::IsWhiteSpace(), RTT::marsh::TiXmlBase::location, RTT::marsh::TiXmlBase::ReadName(), RTT::marsh::TiXmlBase::ReadText(), RTT::marsh::TiXmlDocument::SetError(), RTT::marsh::TiXmlBase::SkipWhiteSpace(), RTT::marsh::TiXmlParsingData::Stamp(), RTT::marsh::TIXML_ENCODING_UNKNOWN, RTT::marsh::TiXmlBase::TIXML_ERROR_EMBEDDED_NULL, RTT::marsh::TiXmlBase::TIXML_ERROR_READING_ATTRIBUTES, and TIXML_STRING.
Referenced by RTT::marsh::TiXmlElement::Parse(), and RTT::marsh::TiXmlDeclaration::Parse().
const TiXmlAttribute * RTT::marsh::TiXmlAttribute::Previous | ( | ) | const |
Get the previous sibling attribute in the DOM. Returns null at beginning.
Definition at line 1286 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::prev, and RTT::marsh::TiXmlNode::value.
TiXmlAttribute * RTT::marsh::TiXmlAttribute::Previous | ( | ) |
Definition at line 1295 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 1304 of file tinyxml.cpp.
References RTT::marsh::TiXmlBase::PutString(), TIXML_STRING, and RTT::marsh::TiXmlNode::value.
|
staticprotectedinherited |
Definition at line 75 of file tinyxml.cpp.
References TIXML_STRING.
Referenced by Print(), RTT::marsh::TiXmlText::Print(), StreamOut(), RTT::marsh::TiXmlText::StreamOut(), and RTT::marsh::TiXmlDeclaration::StreamOut().
|
staticprotectedinherited |
Definition at line 82 of file tinyxml.cpp.
int RTT::marsh::TiXmlAttribute::QueryDoubleValue | ( | double * | _value | ) | const |
QueryDoubleValue examines the value string. See QueryIntValue().
Definition at line 1343 of file tinyxml.cpp.
References RTT::marsh::TIXML_SUCCESS, RTT::marsh::TIXML_WRONG_TYPE, and RTT::marsh::TiXmlNode::value.
Referenced by RTT::marsh::TiXmlElement::QueryDoubleAttribute().
int RTT::marsh::TiXmlAttribute::QueryIntValue | ( | int * | _value | ) | const |
QueryIntValue examines the value string.
It is an alternative to the IntValue() method with richer error checking. If the value 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.
A specialized but useful call. Note that for success it returns 0, which is the opposite of almost all other TinyXml calls.
Definition at line 1336 of file tinyxml.cpp.
References RTT::marsh::TIXML_SUCCESS, RTT::marsh::TIXML_WRONG_TYPE, and RTT::marsh::TiXmlNode::value.
Referenced by RTT::marsh::TiXmlElement::QueryIntAttribute().
|
staticprotectedinherited |
Definition at line 437 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::IsAlpha(), and RTT::marsh::TiXmlBase::IsAlphaNum().
Referenced by Parse(), and RTT::marsh::TiXmlElement::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 Parse(), RTT::marsh::TiXmlComment::Parse(), and RTT::marsh::TiXmlText::Parse().
|
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().
|
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.
|
inline |
Definition at line 821 of file tinyxml.h.
References TIXML_STRING.
Referenced by RTT::marsh::TiXmlElement::Parse().
void RTT::marsh::TiXmlAttribute::SetDoubleValue | ( | double | _value | ) |
Set the value from a double.
Definition at line 1361 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::SetValue().
void RTT::marsh::TiXmlAttribute::SetIntValue | ( | int | _value | ) |
Set the value from an integer.
Definition at line 1350 of file tinyxml.cpp.
References RTT::marsh::TiXmlNode::SetValue().
|
inline |
|
inlineinherited |
|
inline |
Set the value.
Definition at line 787 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlElement::Parse(), and RTT::marsh::TiXmlElement::SetAttribute().
|
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(), Parse(), RTT::marsh::TiXmlElement::Parse(), RTT::marsh::TiXmlComment::Parse(), RTT::marsh::TiXmlDeclaration::Parse(), RTT::marsh::TiXmlUnknown::Parse(), RTT::marsh::TiXmlDocument::Parse(), RTT::marsh::TiXmlBase::ReadText(), and RTT::marsh::TiXmlElement::ReadValue().
|
virtual |
Implements RTT::marsh::TiXmlBase.
Definition at line 1318 of file tinyxml.cpp.
References RTT::marsh::TiXmlBase::PutString(), and RTT::marsh::TiXmlNode::value.
Referenced by RTT::marsh::TiXmlElement::StreamOut().
|
staticprotectedinherited |
Definition at line 561 of file tinyxmlparser.cpp.
References RTT::marsh::TiXmlBase::ToLower().
Referenced by RTT::marsh::TiXmlNode::Identify(), RTT::marsh::TiXmlElement::Parse(), RTT::marsh::TiXmlComment::Parse(), RTT::marsh::TiXmlText::Parse(), RTT::marsh::TiXmlDeclaration::Parse(), RTT::marsh::TiXmlDocument::Parse(), RTT::marsh::TiXmlBase::ReadText(), and RTT::marsh::TiXmlElement::ReadValue().
|
inlinestaticprotectedinherited |
Definition at line 384 of file tinyxml.h.
References RTT::marsh::TIXML_ENCODING_UTF8.
Referenced by RTT::marsh::TiXmlBase::StringEqual().
|
inline |
Return the value of this attribute.
Definition at line 766 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlElement::Attribute(), RTT::marsh::TiXmlElement::CopyTo(), RTT::marsh::TiXmlElement::Parse(), RTT::marsh::TiXmlDeclaration::Parse(), and RTT::marsh::Tiny2CPFHandler::startElement().
|
friend |
|
staticprotectedinherited |
Definition at line 373 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlDocument::SetError().
|
protectedinherited |
Definition at line 375 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlDocument::LoadFile(), Parse(), RTT::marsh::TiXmlElement::Parse(), RTT::marsh::TiXmlComment::Parse(), RTT::marsh::TiXmlText::Parse(), RTT::marsh::TiXmlDeclaration::Parse(), RTT::marsh::TiXmlUnknown::Parse(), and RTT::marsh::TiXmlDocument::Parse().
|
protectedinherited |
Field containing a generic user pointer.
Definition at line 378 of file tinyxml.h.
Referenced by RTT::marsh::TiXmlNode::CopyTo().
|
staticinherited |