From 98ecf620f7de377dc8ae9ad7fbd1e3b24477e138 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:11:56 +0200 Subject: 3.17 --- shared/tinyxml/docs/tinyxml_8h_source.html | 917 +++++++++++++++-------------- 1 file changed, 459 insertions(+), 458 deletions(-) (limited to 'shared/tinyxml/docs/tinyxml_8h_source.html') diff --git a/shared/tinyxml/docs/tinyxml_8h_source.html b/shared/tinyxml/docs/tinyxml_8h_source.html index e991e035..566e3960 100644 --- a/shared/tinyxml/docs/tinyxml_8h_source.html +++ b/shared/tinyxml/docs/tinyxml_8h_source.html @@ -24,7 +24,7 @@

tinyxml.h

00001 /*
 00002 www.sourceforge.net/projects/tinyxml
-00003 Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
+00003 Original code by Lee Thomason (www.grinninglizard.com)
 00004 
 00005 This software is provided 'as-is', without any express or implied
 00006 warranty. In no event will the authors be held liable for any
@@ -115,7 +115,7 @@
 00091 
 00092 const int TIXML_MAJOR_VERSION = 2;
 00093 const int TIXML_MINOR_VERSION = 6;
-00094 const int TIXML_PATCH_VERSION = 1;
+00094 const int TIXML_PATCH_VERSION = 2;
 00095 
 00096 /*  Internal structure for tracking location of items 
 00097     in the XML file.
@@ -144,7 +144,7 @@
 00144     virtual bool Visit( const TiXmlDeclaration& /*declaration*/ )   { return true; }
 00146     virtual bool Visit( const TiXmlText& /*text*/ )                 { return true; }
 00148     virtual bool Visit( const TiXmlComment& /*comment*/ )           { return true; }
-00150     virtual bool Visit( const TiXmlUnknown& /*unknown*/ )           { return true; }
+00150     virtual bool Visit( const TiXmlUnknown& /*unknown*/ )           { return true; }
 00151 };
 00152 
 00153 // Only used by Attribute::Query functions
@@ -715,7 +715,7 @@
 00950 
 00951     TiXmlElement( const TiXmlElement& );
 00952 
-00953     void operator=( const TiXmlElement& base );
+00953     TiXmlElement& operator=( const TiXmlElement& base );
 00954 
 00955     virtual ~TiXmlElement();
 00956 
@@ -726,477 +726,478 @@
 00976     const char* Attribute( const char* name, double* d ) const;
 00977 
 00985     int QueryIntAttribute( const char* name, int* _value ) const;
-00987     int QueryDoubleAttribute( const char* name, double* _value ) const;
-00989     int QueryFloatAttribute( const char* name, float* _value ) const {
-00990         double d;
-00991         int result = QueryDoubleAttribute( name, &d );
-00992         if ( result == TIXML_SUCCESS ) {
-00993             *_value = (float)d;
-00994         }
-00995         return result;
-00996     }
-00997 
-00998     #ifdef TIXML_USE_STL
-01000     int QueryStringAttribute( const char* name, std::string* _value ) const {
-01001         const char* cstr = Attribute( name );
-01002         if ( cstr ) {
-01003             *_value = std::string( cstr );
-01004             return TIXML_SUCCESS;
-01005         }
-01006         return TIXML_NO_ATTRIBUTE;
-01007     }
-01008 
-01017     template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const
-01018     {
-01019         const TiXmlAttribute* node = attributeSet.Find( name );
-01020         if ( !node )
-01021             return TIXML_NO_ATTRIBUTE;
-01022 
-01023         std::stringstream sstream( node->ValueStr() );
-01024         sstream >> *outValue;
-01025         if ( !sstream.fail() )
-01026             return TIXML_SUCCESS;
-01027         return TIXML_WRONG_TYPE;
-01028     }
+00987     int QueryUnsignedAttribute( const char* name, unsigned* _value ) const;
+00992     int QueryBoolAttribute( const char* name, bool* _value ) const;
+00994     int QueryDoubleAttribute( const char* name, double* _value ) const;
+00996     int QueryFloatAttribute( const char* name, float* _value ) const {
+00997         double d;
+00998         int result = QueryDoubleAttribute( name, &d );
+00999         if ( result == TIXML_SUCCESS ) {
+01000             *_value = (float)d;
+01001         }
+01002         return result;
+01003     }
+01004 
+01005     #ifdef TIXML_USE_STL
+01007     int QueryStringAttribute( const char* name, std::string* _value ) const {
+01008         const char* cstr = Attribute( name );
+01009         if ( cstr ) {
+01010             *_value = std::string( cstr );
+01011             return TIXML_SUCCESS;
+01012         }
+01013         return TIXML_NO_ATTRIBUTE;
+01014     }
+01015 
+01024     template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const
+01025     {
+01026         const TiXmlAttribute* node = attributeSet.Find( name );
+01027         if ( !node )
+01028             return TIXML_NO_ATTRIBUTE;
 01029 
-01030     int QueryValueAttribute( const std::string& name, std::string* outValue ) const
-01031     {
-01032         const TiXmlAttribute* node = attributeSet.Find( name );
-01033         if ( !node )
-01034             return TIXML_NO_ATTRIBUTE;
-01035         *outValue = node->ValueStr();
-01036         return TIXML_SUCCESS;
-01037     }
-01038     #endif
-01039 
-01043     void SetAttribute( const char* name, const char * _value );
-01044 
-01045     #ifdef TIXML_USE_STL
-01046     const std::string* Attribute( const std::string& name ) const;
-01047     const std::string* Attribute( const std::string& name, int* i ) const;
-01048     const std::string* Attribute( const std::string& name, double* d ) const;
-01049     int QueryIntAttribute( const std::string& name, int* _value ) const;
-01050     int QueryDoubleAttribute( const std::string& name, double* _value ) const;
+01030         std::stringstream sstream( node->ValueStr() );
+01031         sstream >> *outValue;
+01032         if ( !sstream.fail() )
+01033             return TIXML_SUCCESS;
+01034         return TIXML_WRONG_TYPE;
+01035     }
+01036 
+01037     int QueryValueAttribute( const std::string& name, std::string* outValue ) const
+01038     {
+01039         const TiXmlAttribute* node = attributeSet.Find( name );
+01040         if ( !node )
+01041             return TIXML_NO_ATTRIBUTE;
+01042         *outValue = node->ValueStr();
+01043         return TIXML_SUCCESS;
+01044     }
+01045     #endif
+01046 
+01050     void SetAttribute( const char* name, const char * _value );
 01051 
-01053     void SetAttribute( const std::string& name, const std::string& _value );
-01055     void SetAttribute( const std::string& name, int _value );
-01057     void SetDoubleAttribute( const std::string& name, double value );
-01058     #endif
-01059 
-01063     void SetAttribute( const char * name, int value );
-01064 
-01068     void SetDoubleAttribute( const char * name, double value );
-01069 
-01072     void RemoveAttribute( const char * name );
-01073     #ifdef TIXML_USE_STL
-01074     void RemoveAttribute( const std::string& name ) {   RemoveAttribute (name.c_str ());    }   
-01075     #endif
-01076 
-01077     const TiXmlAttribute* FirstAttribute() const    { return attributeSet.First(); }        
-01078     TiXmlAttribute* FirstAttribute()                { return attributeSet.First(); }
-01079     const TiXmlAttribute* LastAttribute()   const   { return attributeSet.Last(); }     
-01080     TiXmlAttribute* LastAttribute()                 { return attributeSet.Last(); }
-01081 
-01114     const char* GetText() const;
-01115 
-01117     virtual TiXmlNode* Clone() const;
-01118     // Print the Element to a FILE stream.
-01119     virtual void Print( FILE* cfile, int depth ) const;
-01120 
-01121     /*  Attribtue parsing starts: next char past '<'
-01122                          returns: next char past '>'
-01123     */
-01124     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
-01125 
-01126     virtual const TiXmlElement*     ToElement()     const { return this; } 
-01127     virtual TiXmlElement*           ToElement()           { return this; } 
-01128 
-01131     virtual bool Accept( TiXmlVisitor* visitor ) const;
+01052     #ifdef TIXML_USE_STL
+01053     const std::string* Attribute( const std::string& name ) const;
+01054     const std::string* Attribute( const std::string& name, int* i ) const;
+01055     const std::string* Attribute( const std::string& name, double* d ) const;
+01056     int QueryIntAttribute( const std::string& name, int* _value ) const;
+01057     int QueryDoubleAttribute( const std::string& name, double* _value ) const;
+01058 
+01060     void SetAttribute( const std::string& name, const std::string& _value );
+01062     void SetAttribute( const std::string& name, int _value );
+01064     void SetDoubleAttribute( const std::string& name, double value );
+01065     #endif
+01066 
+01070     void SetAttribute( const char * name, int value );
+01071 
+01075     void SetDoubleAttribute( const char * name, double value );
+01076 
+01079     void RemoveAttribute( const char * name );
+01080     #ifdef TIXML_USE_STL
+01081     void RemoveAttribute( const std::string& name ) {   RemoveAttribute (name.c_str ());    }   
+01082     #endif
+01083 
+01084     const TiXmlAttribute* FirstAttribute() const    { return attributeSet.First(); }        
+01085     TiXmlAttribute* FirstAttribute()                { return attributeSet.First(); }
+01086     const TiXmlAttribute* LastAttribute()   const   { return attributeSet.Last(); }     
+01087     TiXmlAttribute* LastAttribute()                 { return attributeSet.Last(); }
+01088 
+01121     const char* GetText() const;
+01122 
+01124     virtual TiXmlNode* Clone() const;
+01125     // Print the Element to a FILE stream.
+01126     virtual void Print( FILE* cfile, int depth ) const;
+01127 
+01128     /*  Attribtue parsing starts: next char past '<'
+01129                          returns: next char past '>'
+01130     */
+01131     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
 01132 
-01133 protected:
-01134 
-01135     void CopyTo( TiXmlElement* target ) const;
-01136     void ClearThis();   // like clear, but initializes 'this' object as well
-01137 
-01138     // Used to be public [internal use]
-01139     #ifdef TIXML_USE_STL
-01140     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
-01141     #endif
-01142     /*  [internal use]
-01143         Reads the "value" of the element -- another element, or text.
-01144         This should terminate with the current end tag.
-01145     */
-01146     const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
-01147 
-01148 private:
-01149     TiXmlAttributeSet attributeSet;
-01150 };
-01151 
-01152 
-01155 class TiXmlComment : public TiXmlNode
-01156 {
-01157 public:
-01159     TiXmlComment() : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {}
-01161     TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {
-01162         SetValue( _value );
-01163     }
-01164     TiXmlComment( const TiXmlComment& );
-01165     void operator=( const TiXmlComment& base );
-01166 
-01167     virtual ~TiXmlComment() {}
-01168 
-01170     virtual TiXmlNode* Clone() const;
-01171     // Write this Comment to a FILE stream.
-01172     virtual void Print( FILE* cfile, int depth ) const;
+01133     virtual const TiXmlElement*     ToElement()     const { return this; } 
+01134     virtual TiXmlElement*           ToElement()           { return this; } 
+01135 
+01138     virtual bool Accept( TiXmlVisitor* visitor ) const;
+01139 
+01140 protected:
+01141 
+01142     void CopyTo( TiXmlElement* target ) const;
+01143     void ClearThis();   // like clear, but initializes 'this' object as well
+01144 
+01145     // Used to be public [internal use]
+01146     #ifdef TIXML_USE_STL
+01147     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+01148     #endif
+01149     /*  [internal use]
+01150         Reads the "value" of the element -- another element, or text.
+01151         This should terminate with the current end tag.
+01152     */
+01153     const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
+01154 
+01155 private:
+01156     TiXmlAttributeSet attributeSet;
+01157 };
+01158 
+01159 
+01162 class TiXmlComment : public TiXmlNode
+01163 {
+01164 public:
+01166     TiXmlComment() : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {}
+01168     TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {
+01169         SetValue( _value );
+01170     }
+01171     TiXmlComment( const TiXmlComment& );
+01172     TiXmlComment& operator=( const TiXmlComment& base );
 01173 
-01174     /*  Attribtue parsing starts: at the ! of the !--
-01175                          returns: next char past '>'
-01176     */
-01177     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
-01178 
-01179     virtual const TiXmlComment*  ToComment() const { return this; } 
-01180     virtual TiXmlComment*  ToComment() { return this; } 
-01181 
-01184     virtual bool Accept( TiXmlVisitor* visitor ) const;
+01174     virtual ~TiXmlComment() {}
+01175 
+01177     virtual TiXmlNode* Clone() const;
+01178     // Write this Comment to a FILE stream.
+01179     virtual void Print( FILE* cfile, int depth ) const;
+01180 
+01181     /*  Attribtue parsing starts: at the ! of the !--
+01182                          returns: next char past '>'
+01183     */
+01184     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
 01185 
-01186 protected:
-01187     void CopyTo( TiXmlComment* target ) const;
+01186     virtual const TiXmlComment*  ToComment() const  { return this; } 
+01187     virtual       TiXmlComment*  ToComment()        { return this; } 
 01188 
-01189     // used to be public
-01190     #ifdef TIXML_USE_STL
-01191     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
-01192     #endif
-01193 //  virtual void StreamOut( TIXML_OSTREAM * out ) const;
-01194 
-01195 private:
-01196 
-01197 };
-01198 
-01199 
-01205 class TiXmlText : public TiXmlNode
-01206 {
-01207     friend class TiXmlElement;
-01208 public:
-01213     TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
-01214     {
-01215         SetValue( initValue );
-01216         cdata = false;
-01217     }
-01218     virtual ~TiXmlText() {}
-01219 
-01220     #ifdef TIXML_USE_STL
-01222     TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
-01223     {
-01224         SetValue( initValue );
-01225         cdata = false;
-01226     }
-01227     #endif
-01228 
-01229     TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT )   { copy.CopyTo( this ); }
-01230     void operator=( const TiXmlText& base )                             { base.CopyTo( this ); }
-01231 
-01232     // Write this text object to a FILE stream.
-01233     virtual void Print( FILE* cfile, int depth ) const;
-01234 
-01236     bool CDATA() const              { return cdata; }
-01238     void SetCDATA( bool _cdata )    { cdata = _cdata; }
-01239 
-01240     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+01191     virtual bool Accept( TiXmlVisitor* visitor ) const;
+01192 
+01193 protected:
+01194     void CopyTo( TiXmlComment* target ) const;
+01195 
+01196     // used to be public
+01197     #ifdef TIXML_USE_STL
+01198     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+01199     #endif
+01200 //  virtual void StreamOut( TIXML_OSTREAM * out ) const;
+01201 
+01202 private:
+01203 
+01204 };
+01205 
+01206 
+01212 class TiXmlText : public TiXmlNode
+01213 {
+01214     friend class TiXmlElement;
+01215 public:
+01220     TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
+01221     {
+01222         SetValue( initValue );
+01223         cdata = false;
+01224     }
+01225     virtual ~TiXmlText() {}
+01226 
+01227     #ifdef TIXML_USE_STL
+01229     TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
+01230     {
+01231         SetValue( initValue );
+01232         cdata = false;
+01233     }
+01234     #endif
+01235 
+01236     TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT )   { copy.CopyTo( this ); }
+01237     TiXmlText& operator=( const TiXmlText& base )                               { base.CopyTo( this ); return *this; }
+01238 
+01239     // Write this text object to a FILE stream.
+01240     virtual void Print( FILE* cfile, int depth ) const;
 01241 
-01242     virtual const TiXmlText* ToText() const { return this; } 
-01243     virtual TiXmlText*       ToText()       { return this; } 
-01244 
-01247     virtual bool Accept( TiXmlVisitor* content ) const;
+01243     bool CDATA() const              { return cdata; }
+01245     void SetCDATA( bool _cdata )    { cdata = _cdata; }
+01246 
+01247     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
 01248 
-01249 protected :
-01251     virtual TiXmlNode* Clone() const;
-01252     void CopyTo( TiXmlText* target ) const;
-01253 
-01254     bool Blank() const; // returns true if all white space and new lines
-01255     // [internal use]
-01256     #ifdef TIXML_USE_STL
-01257     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
-01258     #endif
-01259 
-01260 private:
-01261     bool cdata;         // true if this should be input and output as a CDATA style text element
-01262 };
-01263 
-01264 
-01278 class TiXmlDeclaration : public TiXmlNode
-01279 {
-01280 public:
-01282     TiXmlDeclaration()   : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) {}
-01283 
-01284 #ifdef TIXML_USE_STL
-01286     TiXmlDeclaration(   const std::string& _version,
-01287                         const std::string& _encoding,
-01288                         const std::string& _standalone );
-01289 #endif
-01290 
-01292     TiXmlDeclaration(   const char* _version,
-01293                         const char* _encoding,
-01294                         const char* _standalone );
-01295 
-01296     TiXmlDeclaration( const TiXmlDeclaration& copy );
-01297     void operator=( const TiXmlDeclaration& copy );
-01298 
-01299     virtual ~TiXmlDeclaration() {}
-01300 
-01302     const char *Version() const         { return version.c_str (); }
-01304     const char *Encoding() const        { return encoding.c_str (); }
-01306     const char *Standalone() const      { return standalone.c_str (); }
+01249     virtual const TiXmlText* ToText() const { return this; } 
+01250     virtual TiXmlText*       ToText()       { return this; } 
+01251 
+01254     virtual bool Accept( TiXmlVisitor* content ) const;
+01255 
+01256 protected :
+01258     virtual TiXmlNode* Clone() const;
+01259     void CopyTo( TiXmlText* target ) const;
+01260 
+01261     bool Blank() const; // returns true if all white space and new lines
+01262     // [internal use]
+01263     #ifdef TIXML_USE_STL
+01264     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+01265     #endif
+01266 
+01267 private:
+01268     bool cdata;         // true if this should be input and output as a CDATA style text element
+01269 };
+01270 
+01271 
+01285 class TiXmlDeclaration : public TiXmlNode
+01286 {
+01287 public:
+01289     TiXmlDeclaration()   : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) {}
+01290 
+01291 #ifdef TIXML_USE_STL
+01293     TiXmlDeclaration(   const std::string& _version,
+01294                         const std::string& _encoding,
+01295                         const std::string& _standalone );
+01296 #endif
+01297 
+01299     TiXmlDeclaration(   const char* _version,
+01300                         const char* _encoding,
+01301                         const char* _standalone );
+01302 
+01303     TiXmlDeclaration( const TiXmlDeclaration& copy );
+01304     TiXmlDeclaration& operator=( const TiXmlDeclaration& copy );
+01305 
+01306     virtual ~TiXmlDeclaration() {}
 01307 
-01309     virtual TiXmlNode* Clone() const;
-01310     // Print this declaration to a FILE stream.
-01311     virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const;
-01312     virtual void Print( FILE* cfile, int depth ) const {
-01313         Print( cfile, depth, 0 );
-01314     }
-01315 
-01316     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
-01317 
-01318     virtual const TiXmlDeclaration* ToDeclaration() const { return this; } 
-01319     virtual TiXmlDeclaration*       ToDeclaration()       { return this; } 
-01320 
-01323     virtual bool Accept( TiXmlVisitor* visitor ) const;
+01309     const char *Version() const         { return version.c_str (); }
+01311     const char *Encoding() const        { return encoding.c_str (); }
+01313     const char *Standalone() const      { return standalone.c_str (); }
+01314 
+01316     virtual TiXmlNode* Clone() const;
+01317     // Print this declaration to a FILE stream.
+01318     virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const;
+01319     virtual void Print( FILE* cfile, int depth ) const {
+01320         Print( cfile, depth, 0 );
+01321     }
+01322 
+01323     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
 01324 
-01325 protected:
-01326     void CopyTo( TiXmlDeclaration* target ) const;
-01327     // used to be public
-01328     #ifdef TIXML_USE_STL
-01329     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
-01330     #endif
-01331 
-01332 private:
-01333 
-01334     TIXML_STRING version;
-01335     TIXML_STRING encoding;
-01336     TIXML_STRING standalone;
-01337 };
-01338 
-01339 
-01347 class TiXmlUnknown : public TiXmlNode
-01348 {
-01349 public:
-01350     TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN )    {}
-01351     virtual ~TiXmlUnknown() {}
-01352 
-01353     TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN )      { copy.CopyTo( this ); }
-01354     void operator=( const TiXmlUnknown& copy )                                      { copy.CopyTo( this ); }
-01355 
-01357     virtual TiXmlNode* Clone() const;
-01358     // Print this Unknown to a FILE stream.
-01359     virtual void Print( FILE* cfile, int depth ) const;
-01360 
-01361     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+01325     virtual const TiXmlDeclaration* ToDeclaration() const { return this; } 
+01326     virtual TiXmlDeclaration*       ToDeclaration()       { return this; } 
+01327 
+01330     virtual bool Accept( TiXmlVisitor* visitor ) const;
+01331 
+01332 protected:
+01333     void CopyTo( TiXmlDeclaration* target ) const;
+01334     // used to be public
+01335     #ifdef TIXML_USE_STL
+01336     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+01337     #endif
+01338 
+01339 private:
+01340 
+01341     TIXML_STRING version;
+01342     TIXML_STRING encoding;
+01343     TIXML_STRING standalone;
+01344 };
+01345 
+01346 
+01354 class TiXmlUnknown : public TiXmlNode
+01355 {
+01356 public:
+01357     TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN )    {}
+01358     virtual ~TiXmlUnknown() {}
+01359 
+01360     TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN )      { copy.CopyTo( this ); }
+01361     TiXmlUnknown& operator=( const TiXmlUnknown& copy )                                     { copy.CopyTo( this ); return *this; }
 01362 
-01363     virtual const TiXmlUnknown*     ToUnknown()     const { return this; } 
-01364     virtual TiXmlUnknown*           ToUnknown()     { return this; } 
-01365 
-01368     virtual bool Accept( TiXmlVisitor* content ) const;
+01364     virtual TiXmlNode* Clone() const;
+01365     // Print this Unknown to a FILE stream.
+01366     virtual void Print( FILE* cfile, int depth ) const;
+01367 
+01368     virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
 01369 
-01370 protected:
-01371     void CopyTo( TiXmlUnknown* target ) const;
+01370     virtual const TiXmlUnknown*     ToUnknown()     const   { return this; } 
+01371     virtual TiXmlUnknown*           ToUnknown()             { return this; } 
 01372 
-01373     #ifdef TIXML_USE_STL
-01374     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
-01375     #endif
-01376 
-01377 private:
-01378 
-01379 };
-01380 
-01381 
-01386 class TiXmlDocument : public TiXmlNode
-01387 {
-01388 public:
-01390     TiXmlDocument();
-01392     TiXmlDocument( const char * documentName );
-01393 
-01394     #ifdef TIXML_USE_STL
-01396     TiXmlDocument( const std::string& documentName );
-01397     #endif
-01398 
-01399     TiXmlDocument( const TiXmlDocument& copy );
-01400     void operator=( const TiXmlDocument& copy );
-01401 
-01402     virtual ~TiXmlDocument() {}
-01403 
-01408     bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
-01410     bool SaveFile() const;
-01412     bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
-01414     bool SaveFile( const char * filename ) const;
-01420     bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
-01422     bool SaveFile( FILE* ) const;
-01423 
-01424     #ifdef TIXML_USE_STL
-01425     bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )           
-01426     {
-01427         return LoadFile( filename.c_str(), encoding );
-01428     }
-01429     bool SaveFile( const std::string& filename ) const      
-01430     {
-01431         return SaveFile( filename.c_str() );
-01432     }
-01433     #endif
-01434 
-01439     virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
-01440 
-01445     const TiXmlElement* RootElement() const     { return FirstChildElement(); }
-01446     TiXmlElement* RootElement()                 { return FirstChildElement(); }
+01375     virtual bool Accept( TiXmlVisitor* content ) const;
+01376 
+01377 protected:
+01378     void CopyTo( TiXmlUnknown* target ) const;
+01379 
+01380     #ifdef TIXML_USE_STL
+01381     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+01382     #endif
+01383 
+01384 private:
+01385 
+01386 };
+01387 
+01388 
+01393 class TiXmlDocument : public TiXmlNode
+01394 {
+01395 public:
+01397     TiXmlDocument();
+01399     TiXmlDocument( const char * documentName );
+01400 
+01401     #ifdef TIXML_USE_STL
+01403     TiXmlDocument( const std::string& documentName );
+01404     #endif
+01405 
+01406     TiXmlDocument( const TiXmlDocument& copy );
+01407     TiXmlDocument& operator=( const TiXmlDocument& copy );
+01408 
+01409     virtual ~TiXmlDocument() {}
+01410 
+01415     bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+01417     bool SaveFile() const;
+01419     bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+01421     bool SaveFile( const char * filename ) const;
+01427     bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+01429     bool SaveFile( FILE* ) const;
+01430 
+01431     #ifdef TIXML_USE_STL
+01432     bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )           
+01433     {
+01434         return LoadFile( filename.c_str(), encoding );
+01435     }
+01436     bool SaveFile( const std::string& filename ) const      
+01437     {
+01438         return SaveFile( filename.c_str() );
+01439     }
+01440     #endif
+01441 
+01446     virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
 01447 
-01453     bool Error() const                      { return error; }
+01452     const TiXmlElement* RootElement() const     { return FirstChildElement(); }
+01453     TiXmlElement* RootElement()                 { return FirstChildElement(); }
 01454 
-01456     const char * ErrorDesc() const  { return errorDesc.c_str (); }
-01457 
-01461     int ErrorId()   const               { return errorId; }
-01462 
-01470     int ErrorRow() const    { return errorLocation.row+1; }
-01471     int ErrorCol() const    { return errorLocation.col+1; } 
-01472 
-01497     void SetTabSize( int _tabsize )     { tabsize = _tabsize; }
-01498 
-01499     int TabSize() const { return tabsize; }
-01500 
-01504     void ClearError()                       {   error = false; 
-01505                                                 errorId = 0; 
-01506                                                 errorDesc = ""; 
-01507                                                 errorLocation.row = errorLocation.col = 0; 
-01508                                                 //errorLocation.last = 0; 
-01509                                             }
-01510 
-01512     void Print() const                      { Print( stdout, 0 ); }
-01513 
-01514     /* Write the document to a string using formatted printing ("pretty print"). This
-01515         will allocate a character array (new char[]) and return it as a pointer. The
-01516         calling code pust call delete[] on the return char* to avoid a memory leak.
-01517     */
-01518     //char* PrintToMemory() const; 
-01519 
-01521     virtual void Print( FILE* cfile, int depth = 0 ) const;
-01522     // [internal use]
-01523     void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
-01524 
-01525     virtual const TiXmlDocument*    ToDocument()    const { return this; } 
-01526     virtual TiXmlDocument*          ToDocument()          { return this; } 
-01527 
-01530     virtual bool Accept( TiXmlVisitor* content ) const;
+01460     bool Error() const                      { return error; }
+01461 
+01463     const char * ErrorDesc() const  { return errorDesc.c_str (); }
+01464 
+01468     int ErrorId()   const               { return errorId; }
+01469 
+01477     int ErrorRow() const    { return errorLocation.row+1; }
+01478     int ErrorCol() const    { return errorLocation.col+1; } 
+01479 
+01504     void SetTabSize( int _tabsize )     { tabsize = _tabsize; }
+01505 
+01506     int TabSize() const { return tabsize; }
+01507 
+01511     void ClearError()                       {   error = false; 
+01512                                                 errorId = 0; 
+01513                                                 errorDesc = ""; 
+01514                                                 errorLocation.row = errorLocation.col = 0; 
+01515                                                 //errorLocation.last = 0; 
+01516                                             }
+01517 
+01519     void Print() const                      { Print( stdout, 0 ); }
+01520 
+01521     /* Write the document to a string using formatted printing ("pretty print"). This
+01522         will allocate a character array (new char[]) and return it as a pointer. The
+01523         calling code pust call delete[] on the return char* to avoid a memory leak.
+01524     */
+01525     //char* PrintToMemory() const; 
+01526 
+01528     virtual void Print( FILE* cfile, int depth = 0 ) const;
+01529     // [internal use]
+01530     void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
 01531 
-01532 protected :
-01533     // [internal use]
-01534     virtual TiXmlNode* Clone() const;
-01535     #ifdef TIXML_USE_STL
-01536     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
-01537     #endif
-01538 
-01539 private:
-01540     void CopyTo( TiXmlDocument* target ) const;
-01541 
-01542     bool error;
-01543     int  errorId;
-01544     TIXML_STRING errorDesc;
-01545     int tabsize;
-01546     TiXmlCursor errorLocation;
-01547     bool useMicrosoftBOM;       // the UTF-8 BOM were found when read. Note this, and try to write.
-01548 };
-01549 
-01550 
-01631 class TiXmlHandle
-01632 {
-01633 public:
-01635     TiXmlHandle( TiXmlNode* _node )                 { this->node = _node; }
-01637     TiXmlHandle( const TiXmlHandle& ref )           { this->node = ref.node; }
-01638     TiXmlHandle operator=( const TiXmlHandle& ref ) { this->node = ref.node; return *this; }
-01639 
-01641     TiXmlHandle FirstChild() const;
-01643     TiXmlHandle FirstChild( const char * value ) const;
-01645     TiXmlHandle FirstChildElement() const;
-01647     TiXmlHandle FirstChildElement( const char * value ) const;
-01648 
-01652     TiXmlHandle Child( const char* value, int index ) const;
-01656     TiXmlHandle Child( int index ) const;
-01661     TiXmlHandle ChildElement( const char* value, int index ) const;
-01666     TiXmlHandle ChildElement( int index ) const;
-01667 
-01668     #ifdef TIXML_USE_STL
-01669     TiXmlHandle FirstChild( const std::string& _value ) const               { return FirstChild( _value.c_str() ); }
-01670     TiXmlHandle FirstChildElement( const std::string& _value ) const        { return FirstChildElement( _value.c_str() ); }
-01671 
-01672     TiXmlHandle Child( const std::string& _value, int index ) const         { return Child( _value.c_str(), index ); }
-01673     TiXmlHandle ChildElement( const std::string& _value, int index ) const  { return ChildElement( _value.c_str(), index ); }
-01674     #endif
-01675 
-01678     TiXmlNode* ToNode() const           { return node; } 
-01681     TiXmlElement* ToElement() const     { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }
-01684     TiXmlText* ToText() const           { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); }
-01687     TiXmlUnknown* ToUnknown() const     { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }
-01688 
-01692     TiXmlNode* Node() const         { return ToNode(); } 
-01696     TiXmlElement* Element() const   { return ToElement(); }
-01700     TiXmlText* Text() const         { return ToText(); }
-01704     TiXmlUnknown* Unknown() const   { return ToUnknown(); }
-01705 
-01706 private:
-01707     TiXmlNode* node;
-01708 };
-01709 
-01710 
-01730 class TiXmlPrinter : public TiXmlVisitor
-01731 {
-01732 public:
-01733     TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ),
-01734                      buffer(), indent( "    " ), lineBreak( "\n" ) {}
-01735 
-01736     virtual bool VisitEnter( const TiXmlDocument& doc );
-01737     virtual bool VisitExit( const TiXmlDocument& doc );
-01738 
-01739     virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute );
-01740     virtual bool VisitExit( const TiXmlElement& element );
-01741 
-01742     virtual bool Visit( const TiXmlDeclaration& declaration );
-01743     virtual bool Visit( const TiXmlText& text );
-01744     virtual bool Visit( const TiXmlComment& comment );
-01745     virtual bool Visit( const TiXmlUnknown& unknown );
-01746 
-01750     void SetIndent( const char* _indent )           { indent = _indent ? _indent : "" ; }
-01752     const char* Indent()                            { return indent.c_str(); }
-01757     void SetLineBreak( const char* _lineBreak )     { lineBreak = _lineBreak ? _lineBreak : ""; }
-01759     const char* LineBreak()                         { return lineBreak.c_str(); }
-01760 
-01764     void SetStreamPrinting()                        { indent = "";
-01765                                                       lineBreak = "";
-01766                                                     }   
-01768     const char* CStr()                              { return buffer.c_str(); }
-01770     size_t Size()                                   { return buffer.size(); }
-01771 
-01772     #ifdef TIXML_USE_STL
-01774     const std::string& Str()                        { return buffer; }
-01775     #endif
-01776 
-01777 private:
-01778     void DoIndent() {
-01779         for( int i=0; i<depth; ++i )
-01780             buffer += indent;
-01781     }
-01782     void DoLineBreak() {
-01783         buffer += lineBreak;
-01784     }
-01785 
-01786     int depth;
-01787     bool simpleTextPrint;
-01788     TIXML_STRING buffer;
-01789     TIXML_STRING indent;
-01790     TIXML_STRING lineBreak;
-01791 };
+01532     virtual const TiXmlDocument*    ToDocument()    const { return this; } 
+01533     virtual TiXmlDocument*          ToDocument()          { return this; } 
+01534 
+01537     virtual bool Accept( TiXmlVisitor* content ) const;
+01538 
+01539 protected :
+01540     // [internal use]
+01541     virtual TiXmlNode* Clone() const;
+01542     #ifdef TIXML_USE_STL
+01543     virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+01544     #endif
+01545 
+01546 private:
+01547     void CopyTo( TiXmlDocument* target ) const;
+01548 
+01549     bool error;
+01550     int  errorId;
+01551     TIXML_STRING errorDesc;
+01552     int tabsize;
+01553     TiXmlCursor errorLocation;
+01554     bool useMicrosoftBOM;       // the UTF-8 BOM were found when read. Note this, and try to write.
+01555 };
+01556 
+01557 
+01638 class TiXmlHandle
+01639 {
+01640 public:
+01642     TiXmlHandle( TiXmlNode* _node )                 { this->node = _node; }
+01644     TiXmlHandle( const TiXmlHandle& ref )           { this->node = ref.node; }
+01645     TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; }
+01646 
+01648     TiXmlHandle FirstChild() const;
+01650     TiXmlHandle FirstChild( const char * value ) const;
+01652     TiXmlHandle FirstChildElement() const;
+01654     TiXmlHandle FirstChildElement( const char * value ) const;
+01655 
+01659     TiXmlHandle Child( const char* value, int index ) const;
+01663     TiXmlHandle Child( int index ) const;
+01668     TiXmlHandle ChildElement( const char* value, int index ) const;
+01673     TiXmlHandle ChildElement( int index ) const;
+01674 
+01675     #ifdef TIXML_USE_STL
+01676     TiXmlHandle FirstChild( const std::string& _value ) const               { return FirstChild( _value.c_str() ); }
+01677     TiXmlHandle FirstChildElement( const std::string& _value ) const        { return FirstChildElement( _value.c_str() ); }
+01678 
+01679     TiXmlHandle Child( const std::string& _value, int index ) const         { return Child( _value.c_str(), index ); }
+01680     TiXmlHandle ChildElement( const std::string& _value, int index ) const  { return ChildElement( _value.c_str(), index ); }
+01681     #endif
+01682 
+01685     TiXmlNode* ToNode() const           { return node; } 
+01688     TiXmlElement* ToElement() const     { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }
+01691     TiXmlText* ToText() const           { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); }
+01694     TiXmlUnknown* ToUnknown() const     { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }
+01695 
+01699     TiXmlNode* Node() const         { return ToNode(); } 
+01703     TiXmlElement* Element() const   { return ToElement(); }
+01707     TiXmlText* Text() const         { return ToText(); }
+01711     TiXmlUnknown* Unknown() const   { return ToUnknown(); }
+01712 
+01713 private:
+01714     TiXmlNode* node;
+01715 };
+01716 
+01717 
+01737 class TiXmlPrinter : public TiXmlVisitor
+01738 {
+01739 public:
+01740     TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ),
+01741                      buffer(), indent( "    " ), lineBreak( "\n" ) {}
+01742 
+01743     virtual bool VisitEnter( const TiXmlDocument& doc );
+01744     virtual bool VisitExit( const TiXmlDocument& doc );
+01745 
+01746     virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute );
+01747     virtual bool VisitExit( const TiXmlElement& element );
+01748 
+01749     virtual bool Visit( const TiXmlDeclaration& declaration );
+01750     virtual bool Visit( const TiXmlText& text );
+01751     virtual bool Visit( const TiXmlComment& comment );
+01752     virtual bool Visit( const TiXmlUnknown& unknown );
+01753 
+01757     void SetIndent( const char* _indent )           { indent = _indent ? _indent : "" ; }
+01759     const char* Indent()                            { return indent.c_str(); }
+01764     void SetLineBreak( const char* _lineBreak )     { lineBreak = _lineBreak ? _lineBreak : ""; }
+01766     const char* LineBreak()                         { return lineBreak.c_str(); }
+01767 
+01771     void SetStreamPrinting()                        { indent = "";
+01772                                                       lineBreak = "";
+01773                                                     }   
+01775     const char* CStr()                              { return buffer.c_str(); }
+01777     size_t Size()                                   { return buffer.size(); }
+01778 
+01779     #ifdef TIXML_USE_STL
+01781     const std::string& Str()                        { return buffer; }
+01782     #endif
+01783 
+01784 private:
+01785     void DoIndent() {
+01786         for( int i=0; i<depth; ++i )
+01787             buffer += indent;
+01788     }
+01789     void DoLineBreak() {
+01790         buffer += lineBreak;
+01791     }
 01792 
-01793 
-01794 #ifdef _MSC_VER
-01795 #pragma warning( pop )
-01796 #endif
-01797 
-01798 #endif
-01799 
+01793     int depth;
+01794     bool simpleTextPrint;
+01795     TIXML_STRING buffer;
+01796     TIXML_STRING indent;
+01797     TIXML_STRING lineBreak;
+01798 };
+01799 
+01800 
+01801 #ifdef _MSC_VER
+01802 #pragma warning( pop )
+01803 #endif
+01804 
+01805 #endif
 

Generated by  -- cgit