Logo Search packages:      
Sourcecode: lame version File versions  Download package

Public Member Functions | Static Public Member Functions | Protected Types | Static Protected Member Functions | Static Protected Attributes | Private Attributes | Friends

TiXmlAttribute Class Reference

#include <tinyxml.h>

Inheritance diagram for TiXmlAttribute:
Inheritance graph
[legend]
Collaboration diagram for TiXmlAttribute:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const double DoubleValue () const
 Return the value of this attribute, converted to a double.
const int IntValue () const
 Return the value of this attribute, converted to an integer.
const std::string & Name () const
 Return the name of this attribute.
TiXmlAttributeNext () const
 Get the next sibling attribute in the DOM. Returns null at end.
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)
TiXmlAttributePrevious () const
 Get the previous sibling attribute in the DOM. Returns null at beginning.
virtual void Print (FILE *cfile, int depth) const
void SetDocument (TiXmlDocument *doc)
void SetDoubleValue (double value)
 Set the value from a double.
void SetIntValue (int value)
 Set the value from an integer.
void SetName (const std::string &_name)
 Set the name of this attribute.
void SetValue (const std::string &_value)
 Set the value.
virtual void StreamOut (std::ostream *out) const
 TiXmlAttribute (const std::string &_name, const std::string &_value)
 Construct an attribute with a name and value.
 TiXmlAttribute ()
 Construct an empty attribute.
const std::string & Value () const
 Return the value of this attribute.

Static Public Member Functions

static bool IsWhiteSpaceCondensed ()
 Return the current white space setting.
static void SetCondenseWhiteSpace (bool condense)

Protected Types

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_STRING_COUNT
}

Static Protected Member Functions

static const char * GetChar (const char *p, char *value)
static const char * GetEntity (const char *in, char *value)
static bool IsWhiteSpace (int c)
static void PutString (const std::string &str, std::ostream *stream)
static const char * ReadName (const char *, std::string *name)
static const char * ReadText (const char *in, std::string *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase)
static const char * SkipWhiteSpace (const char *)
static bool StreamTo (std::istream *in, int character, std::string *tag)
static bool StreamWhiteSpace (std::istream *in, std::string *tag)
static bool StringEqual (const char *p, const char *endTag, bool ignoreCase)

Static Protected Attributes

static const char * errorString [TIXML_ERROR_STRING_COUNT]

Private Attributes

TiXmlDocumentdocument
std::string name
TiXmlAttributenext
TiXmlAttributeprev
std::string value

Friends

class TiXmlAttributeSet

Detailed Description

An attribute is a name-value pair. Elements have an arbitrary number of attributes, each with a unique name.

Note:
The attributes are not TiXmlNodes, since they are not part of the tinyXML document object model. There are other suggested ways to look at this problem.
Attributes have a parent

Definition at line 431 of file tinyxml.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index