OBT::TiXmlUnknown Class Reference

Any tag that tinyXml doesn't recognize is saved as an unknown. More...

#include <OBTtinyxml.h>

Inheritance diagram for OBT::TiXmlUnknown:
[legend]
Collaboration diagram for OBT::TiXmlUnknown:
[legend]

List of all members.

Public Member Functions

 TiXmlUnknown ()
virtual ~TiXmlUnknown ()
 TiXmlUnknown (const TiXmlUnknown &copy)
void operator= (const TiXmlUnknown &copy)
virtual TiXmlNodeClone () const
 Creates a copy of this Unknown and returns it.
virtual void Print (FILE *cfile, int depth) const
 All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.
virtual const char * Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
virtual const TiXmlUnknownToUnknown () const
 Cast to a more defined type. Will return null not of the requested type.
virtual TiXmlUnknownToUnknown ()
 Cast to a more defined type. Will return null not of the requested type.
virtual bool Accept (TiXmlVisitor *content) const
 Walk the XML tree visiting this node and all of its children.
 TiXmlUnknown ()
virtual ~TiXmlUnknown ()
 TiXmlUnknown (const TiXmlUnknown &copy)
void operator= (const TiXmlUnknown &copy)
virtual TiXmlNodeClone () const
 Creates a copy of this Unknown and returns it.
virtual void Print (FILE *cfile, int depth) const
 All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.
virtual const char * Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)
virtual const TiXmlUnknownToUnknown () const
 Cast to a more defined type. Will return null not of the requested type.
virtual TiXmlUnknownToUnknown ()
 Cast to a more defined type. Will return null not of the requested type.
virtual bool Accept (TiXmlVisitor *content) const
 Walk the XML tree visiting this node and all of its children.

Protected Member Functions

void CopyTo (TiXmlUnknown *target) const
void CopyTo (TiXmlUnknown *target) const

Detailed Description

Any tag that tinyXml doesn't recognize is saved as an unknown.

It is a tag of text, but should not be modified. It will be written back to the XML, unchanged, when the file is saved.

DTD tags get thrown into TiXmlUnknowns.

Definition at line 1353 of file OBTtinyxml.h.


Constructor & Destructor Documentation

OBT::TiXmlUnknown::TiXmlUnknown (  )  [inline]

Definition at line 1356 of file OBTtinyxml.h.

Referenced by Clone().

virtual OBT::TiXmlUnknown::~TiXmlUnknown (  )  [inline, virtual]

Definition at line 1357 of file OBTtinyxml.h.

01357 {}

OBT::TiXmlUnknown::TiXmlUnknown ( const TiXmlUnknown copy  )  [inline]

Definition at line 1359 of file OBTtinyxml.h.

References CopyTo().

01359 : TiXmlNode( TiXmlNode::UNKNOWN )               { copy.CopyTo( this ); }

OBT::TiXmlUnknown::TiXmlUnknown (  )  [inline]

Definition at line 1355 of file tiny/OBTtinyxml.h.

virtual OBT::TiXmlUnknown::~TiXmlUnknown (  )  [inline, virtual]

Definition at line 1356 of file tiny/OBTtinyxml.h.

01356 {}

OBT::TiXmlUnknown::TiXmlUnknown ( const TiXmlUnknown copy  )  [inline]

Definition at line 1358 of file tiny/OBTtinyxml.h.

01358 : TiXmlNode( TiXmlNode::UNKNOWN )               { copy.CopyTo( this ); }


Member Function Documentation

virtual bool OBT::TiXmlUnknown::Accept ( TiXmlVisitor content  )  const [virtual]

Walk the XML tree visiting this node and all of its children.

Implements OBT::TiXmlNode.

bool OBT::TiXmlUnknown::Accept ( TiXmlVisitor content  )  const [virtual]

Walk the XML tree visiting this node and all of its children.

Implements OBT::TiXmlNode.

Definition at line 1486 of file OBTtinyxml.cpp.

References OBT::TiXmlVisitor::Visit().

01487 {
01488         return visitor->Visit( *this );
01489 }

virtual TiXmlNode* OBT::TiXmlUnknown::Clone (  )  const [virtual]

Creates a copy of this Unknown and returns it.

Implements OBT::TiXmlNode.

TiXmlNode * OBT::TiXmlUnknown::Clone (  )  const [virtual]

Creates a copy of this Unknown and returns it.

Implements OBT::TiXmlNode.

Definition at line 1492 of file OBTtinyxml.cpp.

References CopyTo(), and TiXmlUnknown().

01493 {
01494         TiXmlUnknown* clone = new TiXmlUnknown();
01495 
01496         if ( !clone )
01497                 return 0;
01498 
01499         CopyTo( clone );
01500         return clone;
01501 }

void OBT::TiXmlUnknown::CopyTo ( TiXmlUnknown target  )  const [protected]

Reimplemented from OBT::TiXmlNode.

void OBT::TiXmlUnknown::CopyTo ( TiXmlUnknown target  )  const [protected]

Reimplemented from OBT::TiXmlNode.

Definition at line 1480 of file OBTtinyxml.cpp.

Referenced by Clone(), operator=(), and TiXmlUnknown().

01481 {
01482         TiXmlNode::CopyTo( target );
01483 }

void OBT::TiXmlUnknown::operator= ( const TiXmlUnknown copy  )  [inline]

Reimplemented from OBT::TiXmlNode.

Definition at line 1359 of file tiny/OBTtinyxml.h.

01359 { copy.CopyTo( this ); }

void OBT::TiXmlUnknown::operator= ( const TiXmlUnknown copy  )  [inline]

Reimplemented from OBT::TiXmlNode.

Definition at line 1360 of file OBTtinyxml.h.

References CopyTo().

01360 { copy.CopyTo( this ); }

virtual const char* OBT::TiXmlUnknown::Parse ( const char *  p,
TiXmlParsingData data,
TiXmlEncoding  encoding 
) [virtual]

Implements OBT::TiXmlBase.

const char * OBT::TiXmlUnknown::Parse ( const char *  p,
TiXmlParsingData data,
TiXmlEncoding  encoding 
) [virtual]

Implements OBT::TiXmlBase.

Definition at line 1276 of file OBTtinyxmlparser.cpp.

References OBT::TiXmlParsingData::Cursor(), OBT::TiXmlNode::GetDocument(), OBT::TiXmlBase::location, OBT::TiXmlDocument::SetError(), OBT::TiXmlBase::SkipWhiteSpace(), OBT::TiXmlParsingData::Stamp(), OBT::TiXmlBase::TIXML_ERROR_PARSING_UNKNOWN, and OBT::TiXmlNode::value.

Referenced by OBT::main().

01277 {
01278         TiXmlDocument* document = GetDocument();
01279         p = SkipWhiteSpace( p, encoding );
01280 
01281         if ( data )
01282         {
01283                 data->Stamp( p, encoding );
01284                 location = data->Cursor();
01285         }
01286         if ( !p || !*p || *p != '<' )
01287         {
01288                 if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding );
01289                 return 0;
01290         }
01291         ++p;
01292     value = "";
01293 
01294         while ( p && *p && *p != '>' )
01295         {
01296                 value += *p;
01297                 ++p;
01298         }
01299 
01300         if ( !p )
01301         {
01302                 if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
01303         }
01304         if ( *p == '>' )
01305                 return p+1;
01306         return p;
01307 }

virtual void OBT::TiXmlUnknown::Print ( FILE *  cfile,
int  depth 
) const [virtual]

All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.

) Either or both cfile and str can be null.

This is a formatted print, and will insert tabs and newlines.

(For an unformatted stream, use the << operator.)

Implements OBT::TiXmlBase.

void OBT::TiXmlUnknown::Print ( FILE *  cfile,
int  depth 
) const [virtual]

All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.

) Either or both cfile and str can be null.

This is a formatted print, and will insert tabs and newlines.

(For an unformatted stream, use the << operator.)

Implements OBT::TiXmlBase.

Definition at line 1472 of file OBTtinyxml.cpp.

References OBT::TiXmlNode::value.

01473 {
01474         for ( int i=0; i<depth; i++ )
01475                 fprintf( cfile, "    " );
01476         fprintf( cfile, "<%s>", value.c_str() );
01477 }

virtual TiXmlUnknown* OBT::TiXmlUnknown::ToUnknown (  )  [inline, virtual]

Cast to a more defined type. Will return null not of the requested type.

Reimplemented from OBT::TiXmlNode.

Definition at line 1369 of file tiny/OBTtinyxml.h.

virtual const TiXmlUnknown* OBT::TiXmlUnknown::ToUnknown (  )  const [inline, virtual]

Cast to a more defined type. Will return null not of the requested type.

Reimplemented from OBT::TiXmlNode.

Definition at line 1368 of file tiny/OBTtinyxml.h.

virtual TiXmlUnknown* OBT::TiXmlUnknown::ToUnknown (  )  [inline, virtual]

Cast to a more defined type. Will return null not of the requested type.

Reimplemented from OBT::TiXmlNode.

Definition at line 1370 of file OBTtinyxml.h.

virtual const TiXmlUnknown* OBT::TiXmlUnknown::ToUnknown (  )  const [inline, virtual]

Cast to a more defined type. Will return null not of the requested type.

Reimplemented from OBT::TiXmlNode.

Definition at line 1369 of file OBTtinyxml.h.


Generated on 1 Jan 2010 for OBT by  doxygen 1.6.1