Any tag that tinyXml doesn't recognize is saved as an unknown. More...
#include <OBTtinyxml.h>
Public Member Functions | |
TiXmlUnknown () | |
virtual | ~TiXmlUnknown () |
TiXmlUnknown (const TiXmlUnknown ©) | |
void | operator= (const TiXmlUnknown ©) |
virtual TiXmlNode * | Clone () 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 TiXmlUnknown * | ToUnknown () const |
Cast to a more defined type. Will return null not of the requested type. | |
virtual TiXmlUnknown * | ToUnknown () |
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 ©) | |
void | operator= (const TiXmlUnknown ©) |
virtual TiXmlNode * | Clone () 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 TiXmlUnknown * | ToUnknown () const |
Cast to a more defined type. Will return null not of the requested type. | |
virtual TiXmlUnknown * | ToUnknown () |
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 |
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.
OBT::TiXmlUnknown::TiXmlUnknown | ( | ) | [inline] |
Definition at line 1356 of file OBTtinyxml.h.
Referenced by Clone().
01356 : TiXmlNode( TiXmlNode::UNKNOWN ) {}
virtual OBT::TiXmlUnknown::~TiXmlUnknown | ( | ) | [inline, virtual] |
Definition at line 1357 of file OBTtinyxml.h.
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.
01355 : TiXmlNode( TiXmlNode::UNKNOWN ) {}
virtual OBT::TiXmlUnknown::~TiXmlUnknown | ( | ) | [inline, virtual] |
Definition at line 1356 of file tiny/OBTtinyxml.h.
OBT::TiXmlUnknown::TiXmlUnknown | ( | const TiXmlUnknown & | copy | ) | [inline] |
Definition at line 1358 of file tiny/OBTtinyxml.h.
01358 : TiXmlNode( TiXmlNode::UNKNOWN ) { copy.CopyTo( this ); }
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().
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.
void OBT::TiXmlUnknown::operator= | ( | const TiXmlUnknown & | copy | ) | [inline] |
Reimplemented from OBT::TiXmlNode.
Definition at line 1360 of file OBTtinyxml.h.
References CopyTo().
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.