TiXmlBase Class Reference

TiXmlBase is a base class for every class in TinyXml. More...

#include <tinyxml.h>

Inheritance diagram for TiXmlBase:

Inheritance graph
[legend]
Collaboration diagram for TiXmlBase:

Collaboration graph
[legend]
List of all members.

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

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

 NUM_ENTITY = 5
 MAX_ENTITY_LENGTH = 6
enum  { NUM_ENTITY = 5, MAX_ENTITY_LENGTH = 6 }

Static Private Attributes

static Entity entity [NUM_ENTITY]
static bool condenseWhiteSpace

Friends

class TiXmlNode
class TiXmlElement
class TiXmlDocument

Classes

struct  Entity
class  StringToBuffer

Detailed Description

TiXmlBase is a base class for every class in TinyXml.

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)
	


Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
TIXML_NO_ERROR 
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 

anonymous enum [private]

Enumerator:
NUM_ENTITY 
MAX_ENTITY_LENGTH 


Constructor & Destructor Documentation

TiXmlBase::TiXmlBase (  )  [inline]

virtual TiXmlBase::~TiXmlBase (  )  [inline, virtual]


Member Function Documentation

static const char* TiXmlBase::GetChar ( const char *  p,
char *  value 
) [inline, static, protected]

static const char* TiXmlBase::GetEntity ( const char *  in,
char *  value 
) [static, protected]

static bool TiXmlBase::IsWhiteSpace ( int  c  )  [inline, static, protected]

static bool TiXmlBase::IsWhiteSpaceCondensed (  )  [inline, static]

Return the current white space setting.

virtual const char* TiXmlBase::Parse ( const char *  p  )  [protected, pure virtual]

Implemented in TiXmlAttribute, TiXmlElement, TiXmlComment, TiXmlText, TiXmlDeclaration, TiXmlUnknown, and TiXmlDocument.

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.

static void TiXmlBase::PutString ( const TIXML_STRING &  str,
TIXML_STRING *  out 
) [static, protected]

static void TiXmlBase::PutString ( const TIXML_STRING &  str,
TIXML_OSTREAM *  out 
) [static, protected]

static const char* TiXmlBase::ReadName ( const char *  p,
TIXML_STRING *  name 
) [static, protected]

static const char* TiXmlBase::ReadText ( const char *  in,
TIXML_STRING *  text,
bool  ignoreWhiteSpace,
const char *  endTag,
bool  ignoreCase 
) [static, protected]

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.

static const char* TiXmlBase::SkipWhiteSpace ( const char *   )  [static, protected]

virtual void TiXmlBase::StreamOut ( TIXML_OSTREAM *   )  const [protected, pure virtual]

Implemented in TiXmlAttribute, TiXmlElement, TiXmlComment, TiXmlText, TiXmlDeclaration, TiXmlUnknown, and TiXmlDocument.

static bool TiXmlBase::StreamTo ( TIXML_ISTREAM *  in,
int  character,
TIXML_STRING *  tag 
) [static, protected]

static bool TiXmlBase::StreamWhiteSpace ( TIXML_ISTREAM *  in,
TIXML_STRING *  tag 
) [static, protected]

static bool TiXmlBase::StringEqual ( const char *  p,
const char *  endTag,
bool  ignoreCase 
) [static, protected]


Friends And Related Function Documentation

friend class TiXmlDocument [friend]

Reimplemented in TiXmlNode.

friend class TiXmlElement [friend]

Reimplemented in TiXmlNode, and TiXmlText.

friend class TiXmlNode [friend]


Member Data Documentation

bool TiXmlBase::condenseWhiteSpace [static, private]

Entity TiXmlBase::entity[NUM_ENTITY] [static, private]

const char* TiXmlBase::errorString[TIXML_ERROR_STRING_COUNT] [static, protected]


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:26 2007 for MetalWarriors by  doxygen 1.4.7