#include <tinyxml.h>


Data Structures | |
| struct | Entity |
Public Member Functions | |
| TiXmlBase () | |
| virtual | ~TiXmlBase () |
| virtual void | Print (FILE *cfile, int depth) const =0 |
| All TinyXml classes can print themselves to a filestream. | |
Static Public Member Functions | |
| static void | SetCondenseWhiteSpace (bool condense) |
| The world does not agree on whether white space should be kept or not. | |
| static bool | IsWhiteSpaceCondensed () |
| Return the current white space setting. | |
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 } |
Protected Member Functions | |
| virtual void | StreamOut (TIXML_OSTREAM *) const =0 |
| virtual const char * | Parse (const char *p)=0 |
Static Protected Member Functions | |
| static const char * | SkipWhiteSpace (const char *) |
| static bool | IsWhiteSpace (int c) |
| static bool | StreamWhiteSpace (TIXML_ISTREAM *in, TIXML_STRING *tag) |
| static bool | StreamTo (TIXML_ISTREAM *in, int character, TIXML_STRING *tag) |
| static const char * | ReadName (const char *p, TIXML_STRING *name) |
| static const char * | ReadText (const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase) |
| static const char * | GetEntity (const char *in, char *value) |
| static const char * | GetChar (const char *p, char *value) |
| 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) |
Static Protected Attributes | |
| static const char * | errorString [TIXML_ERROR_STRING_COUNT] |
Private Types | |
| enum | { NUM_ENTITY = 5, MAX_ENTITY_LENGTH = 6 } |
Static Private Attributes | |
| static Entity | entity [NUM_ENTITY] |
| static bool | condenseWhiteSpace = true |
Friends | |
| class | TiXmlNode |
| class | TiXmlElement |
| class | TiXmlDocument |
It does little except to establish that TinyXml classes can be printed and provide some utility functions.
In XML, the document and elements can contain other elements and other types of nodes.
A Document can contain: Element (container or leaf) Comment (leaf) Unknown (leaf) Declaration( leaf ) An Element can contain: Element (container or leaf) Text (leaf) Attributes (not on tree) Comment (leaf) Unknown (leaf) A Decleration contains: Attributes (not on tree)
Definition at line 131 of file tinyxml.h.
anonymous enum [protected] |
anonymous enum [private] |
| static const char* TiXmlBase::GetChar | ( | const char * | p, | |
| char * | value | |||
| ) | [inline, static, protected] |
| const char * TiXmlBase::GetEntity | ( | const char * | in, | |
| char * | value | |||
| ) | [static, protected] |
Definition at line 141 of file tinyxmlparser.cpp.
References TiXmlBase::Entity::chr, entity, NUM_ENTITY, and TIXML_STRING.
Referenced by GetChar().
Definition at line 162 of file tinyxml.h.
Referenced by TiXmlElement::StreamIn(), and StreamWhiteSpace().
| static bool TiXmlBase::IsWhiteSpaceCondensed | ( | ) | [inline, static] |
Return the current white space setting.
Definition at line 157 of file tinyxml.h.
References condenseWhiteSpace.
| virtual const char* TiXmlBase::Parse | ( | const char * | p | ) | [protected, pure virtual] |
Implemented in TiXmlAttribute, TiXmlElement, TiXmlComment, TiXmlText, TiXmlDeclaration, TiXmlUnknown, and TiXmlDocument.
Referenced by operator>>(), TiXmlDocument::Parse(), and TiXmlElement::ReadValue().
| virtual void TiXmlBase::Print | ( | FILE * | cfile, | |
| int | depth | |||
| ) | const [pure 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.)
Implemented in TiXmlAttribute, TiXmlElement, TiXmlComment, TiXmlText, TiXmlDeclaration, TiXmlUnknown, and TiXmlDocument.
Referenced by TiXmlDocument::Print(), and TiXmlElement::Print().
| void TiXmlBase::PutString | ( | const TIXML_STRING & | str, | |
| TIXML_STRING * | out | |||
| ) | [static, protected] |
| void TiXmlBase::PutString | ( | const TIXML_STRING & | str, | |
| TIXML_OSTREAM * | out | |||
| ) | [static, protected] |
Definition at line 56 of file tinyxml.cpp.
References TIXML_STRING.
Referenced by TiXmlText::Print(), TiXmlAttribute::Print(), TiXmlDeclaration::StreamOut(), TiXmlText::StreamOut(), TiXmlComment::StreamOut(), and TiXmlAttribute::StreamOut().
| const char * TiXmlBase::ReadName | ( | const char * | p, | |
| TIXML_STRING * | name | |||
| ) | [static, protected] |
Definition at line 115 of file tinyxmlparser.cpp.
Referenced by TiXmlAttribute::Parse(), and TiXmlElement::Parse().
| const char * TiXmlBase::ReadText | ( | const char * | in, | |
| TIXML_STRING * | text, | |||
| bool | ignoreWhiteSpace, | |||
| const char * | endTag, | |||
| bool | ignoreCase | |||
| ) | [static, protected] |
Definition at line 225 of file tinyxmlparser.cpp.
References condenseWhiteSpace, GetChar(), SkipWhiteSpace(), and StringEqual().
Referenced by TiXmlText::Parse(), TiXmlAttribute::Parse(), and TiXmlComment::Parse().
| static void TiXmlBase::SetCondenseWhiteSpace | ( | bool | condense | ) | [inline, static] |
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 these values is not thread safe.
Definition at line 154 of file tinyxml.h.
References condenseWhiteSpace.
| const char * TiXmlBase::SkipWhiteSpace | ( | const char * | p | ) | [static, protected] |
Definition at line 69 of file tinyxmlparser.cpp.
Referenced by TiXmlNode::Identify(), TiXmlDeclaration::Parse(), TiXmlAttribute::Parse(), TiXmlComment::Parse(), TiXmlUnknown::Parse(), TiXmlElement::Parse(), TiXmlDocument::Parse(), ReadText(), and TiXmlElement::ReadValue().
| virtual void TiXmlBase::StreamOut | ( | TIXML_OSTREAM * | ) | const [protected, pure virtual] |
Implemented in TiXmlAttribute, TiXmlElement, TiXmlComment, TiXmlText, TiXmlDeclaration, TiXmlUnknown, and TiXmlDocument.
Referenced by operator<<(), TiXmlDocument::StreamOut(), and TiXmlElement::StreamOut().
| bool TiXmlBase::StreamWhiteSpace | ( | TIXML_ISTREAM * | in, | |
| TIXML_STRING * | tag | |||
| ) | [static, protected] |
Definition at line 87 of file tinyxmlparser.cpp.
References IsWhiteSpace().
Referenced by TiXmlElement::StreamIn().
| bool TiXmlBase::StringEqual | ( | const char * | p, | |
| const char * | endTag, | |||
| bool | ignoreCase | |||
| ) | [static, protected] |
Definition at line 180 of file tinyxmlparser.cpp.
Referenced by TiXmlNode::Identify(), TiXmlDeclaration::Parse(), TiXmlComment::Parse(), TiXmlElement::Parse(), ReadText(), and TiXmlElement::ReadValue().
friend class TiXmlDocument [friend] |
friend class TiXmlElement [friend] |
bool TiXmlBase::condenseWhiteSpace = true [static, private] |
Definition at line 252 of file tinyxml.h.
Referenced by IsWhiteSpaceCondensed(), ReadText(), and SetCondenseWhiteSpace().
TiXmlBase::Entity TiXmlBase::entity [static, private] |
Initial value:
{
{ "&", 5, '&' },
{ "<", 4, '<' },
{ ">", 4, '>' },
{ """, 6, '\"' },
{ "'", 6, '\'' }
}
Definition at line 251 of file tinyxml.h.
Referenced by GetEntity(), and PutString().
const char * TiXmlBase::errorString [static, protected] |
Initial value:
{
"No error",
"Error",
"Failed to open file",
"Memory allocation failed.",
"Error parsing Element.",
"Failed to read Element name",
"Error reading Element value.",
"Error reading Attributes.",
"Error: empty tag.",
"Error reading end tag.",
"Error parsing Unknown.",
"Error parsing Comment.",
"Error parsing Declaration.",
"Error document empty."
}
1.5.7.1