#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 |
virtual void | StreamIn (std::istream *in, TIXML_STRING *tag) |
void | CopyTo (TiXmlUnknown *target) const |
virtual void | StreamIn (std::istream *in, TIXML_STRING *tag) |
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] |
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] |
virtual OBT::TiXmlUnknown::~TiXmlUnknown | ( | ) | [inline, virtual] |
OBT::TiXmlUnknown::TiXmlUnknown | ( | const TiXmlUnknown & | copy | ) | [inline] |
Definition at line 1358 of file tiny/OBTtinyxml.h.
01358 : TiXmlNode( TiXmlNode::UNKNOWN ) { copy.CopyTo( this ); }
void OBT::TiXmlUnknown::operator= | ( | const TiXmlUnknown & | copy | ) | [inline] |
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::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 }
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.
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 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.
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.
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().
void OBT::TiXmlUnknown::CopyTo | ( | TiXmlUnknown * | target | ) | const [protected] |
Definition at line 1480 of file OBTtinyxml.cpp.
References OBT::TiXmlNode::CopyTo().
Referenced by Clone(), operator=(), and TiXmlUnknown().
01481 { 01482 TiXmlNode::CopyTo( target ); 01483 }
void OBT::TiXmlUnknown::StreamIn | ( | std::istream * | in, | |
TIXML_STRING * | tag | |||
) | [protected, virtual] |
Implements OBT::TiXmlNode.
Definition at line 1252 of file OBTtinyxmlparser.cpp.
References OBT::TiXmlNode::GetDocument(), OBT::TiXmlDocument::SetError(), OBT::TIXML_ENCODING_UNKNOWN, and OBT::TiXmlBase::TIXML_ERROR_EMBEDDED_NULL.
01253 { 01254 while ( in->good() ) 01255 { 01256 int c = in->get(); 01257 if ( c <= 0 ) 01258 { 01259 TiXmlDocument* document = GetDocument(); 01260 if ( document ) 01261 document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); 01262 return; 01263 } 01264 (*tag) += (char) c; 01265 01266 if ( c == '>' ) 01267 { 01268 // All is well. 01269 return; 01270 } 01271 } 01272 }
void OBT::TiXmlUnknown::operator= | ( | const TiXmlUnknown & | copy | ) | [inline] |
virtual TiXmlNode* OBT::TiXmlUnknown::Clone | ( | ) | const [virtual] |
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.
virtual const char* OBT::TiXmlUnknown::Parse | ( | const char * | p, | |
TiXmlParsingData * | data, | |||
TiXmlEncoding | encoding | |||
) | [virtual] |
Implements OBT::TiXmlBase.
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 1369 of file tiny/OBTtinyxml.h.
virtual bool OBT::TiXmlUnknown::Accept | ( | TiXmlVisitor * | content | ) | const [virtual] |
void OBT::TiXmlUnknown::CopyTo | ( | TiXmlUnknown * | target | ) | const [protected] |
virtual void OBT::TiXmlUnknown::StreamIn | ( | std::istream * | in, | |
TIXML_STRING * | tag | |||
) | [protected, virtual] |
Implements OBT::TiXmlNode.