#include <tinyxml.h>
Inheritance diagram for TiXmlUnknown:

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 |
| 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 |
Protected Member Functions | |
| void | CopyTo (TiXmlUnknown *target) const |
| virtual void | StreamIn (std::istream *in, TIXML_STRING *tag) |
DTD tags get thrown into TiXmlUnknowns.
Definition at line 1325 of file tinyxml.h.
|
|
Definition at line 1328 of file tinyxml.h. Referenced by Clone(). 01328 : TiXmlNode( TiXmlNode::UNKNOWN ) {}
|
|
|
Definition at line 1329 of file tinyxml.h. 01329 {}
|
|
|
Definition at line 1331 of file tinyxml.h. References CopyTo().
|
|
|
Walk the XML tree visiting this node and all of its children. Implements TiXmlNode. Definition at line 1466 of file tinyxml.cpp. References TiXmlVisitor::Visit(). 01467 {
01468 return visitor->Visit( *this );
01469 }
|
|
|
Creates a copy of this Unknown and returns it.
Implements TiXmlNode. Definition at line 1472 of file tinyxml.cpp. References CopyTo(), and TiXmlUnknown(). 01473 {
01474 TiXmlUnknown* clone = new TiXmlUnknown();
01475
01476 if ( !clone )
01477 return 0;
01478
01479 CopyTo( clone );
01480 return clone;
01481 }
|
|
|
Definition at line 1460 of file tinyxml.cpp. References TiXmlNode::CopyTo(). Referenced by Clone(), operator=(), and TiXmlUnknown(). 01461 {
01462 TiXmlNode::CopyTo( target );
01463 }
|
|
|
Definition at line 1332 of file tinyxml.h. References CopyTo(). 01332 { copy.CopyTo( this ); }
|
|
||||||||||||||||
|
Implements TiXmlBase. Definition at line 1270 of file tinyxmlparser.cpp. References TiXmlParsingData::Cursor(), TiXmlNode::GetDocument(), TiXmlDocument::SetError(), TiXmlBase::SkipWhiteSpace(), and TiXmlParsingData::Stamp(). 01271 {
01272 TiXmlDocument* document = GetDocument();
01273 p = SkipWhiteSpace( p, encoding );
01274
01275 if ( data )
01276 {
01277 data->Stamp( p, encoding );
01278 location = data->Cursor();
01279 }
01280 if ( !p || !*p || *p != '<' )
01281 {
01282 if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding );
01283 return 0;
01284 }
01285 ++p;
01286 value = "";
01287
01288 while ( p && *p && *p != '>' )
01289 {
01290 value += *p;
01291 ++p;
01292 }
01293
01294 if ( !p )
01295 {
01296 if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
01297 }
01298 if ( *p == '>' )
01299 return p+1;
01300 return p;
01301 }
|
|
||||||||||||
|
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 TiXmlBase. Definition at line 1452 of file tinyxml.cpp. 01453 {
01454 for ( int i=0; i<depth; i++ )
01455 fprintf( cfile, " " );
01456 fprintf( cfile, "<%s>", value.c_str() );
01457 }
|
|
||||||||||||
|
Implements TiXmlNode. Definition at line 1246 of file tinyxmlparser.cpp. References TiXmlNode::GetDocument(), TiXmlDocument::SetError(), and TIXML_ENCODING_UNKNOWN. 01247 {
01248 while ( in->good() )
01249 {
01250 int c = in->get();
01251 if ( c <= 0 )
01252 {
01253 TiXmlDocument* document = GetDocument();
01254 if ( document )
01255 document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
01256 return;
01257 }
01258 (*tag) += (char) c;
01259
01260 if ( c == '>' )
01261 {
01262 // All is well.
01263 return;
01264 }
01265 }
01266 }
|
|
|
Cast to a more defined type. Will return null not of the requested type.
Reimplemented from TiXmlNode. |
|
|
Cast to a more defined type. Will return null not of the requested type.
Reimplemented from TiXmlNode. |
1.3.9.1