~ubuntu-branches/debian/sid/gource/sid

« back to all changes in this revision

Viewing changes to src/tinyxml/tinyxml.h

  • Committer: Package Import Robot
  • Author(s): Andrew Caudwell
  • Date: 2014-04-15 16:30:17 UTC
  • mfrom: (1.2.15)
  • Revision ID: package-import@ubuntu.com-20140415163017-ucdr2josj1spzrga
Tags: 0.41-1
* New upstream release
* Made VCS URIs canonical
* Changed watch file to look at Github for releases

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
www.sourceforge.net/projects/tinyxml
3
 
Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
 
3
Original code by Lee Thomason (www.grinninglizard.com)
4
4
 
5
5
This software is provided 'as-is', without any express or implied
6
6
warranty. In no event will the authors be held liable for any
91
91
 
92
92
const int TIXML_MAJOR_VERSION = 2;
93
93
const int TIXML_MINOR_VERSION = 6;
94
 
const int TIXML_PATCH_VERSION = 1;
 
94
const int TIXML_PATCH_VERSION = 2;
95
95
 
96
96
/*      Internal structure for tracking location of items 
97
97
        in the XML file.
146
146
        virtual bool Visit( const TiXmlText& /*text*/ )                                 { return true; }
147
147
        /// Visit a comment node
148
148
        virtual bool Visit( const TiXmlComment& /*comment*/ )                   { return true; }
149
 
        /// Visit an unknow node
 
149
        /// Visit an unknown node
150
150
        virtual bool Visit( const TiXmlUnknown& /*unknown*/ )                   { return true; }
151
151
};
152
152
 
678
678
        #endif
679
679
 
680
680
        /** Query the type (as an enumerated value, above) of this node.
681
 
                The possible types are: DOCUMENT, ELEMENT, COMMENT,
682
 
                                                                UNKNOWN, TEXT, and DECLARATION.
 
681
                The possible types are: TINYXML_DOCUMENT, TINYXML_ELEMENT, TINYXML_COMMENT,
 
682
                                                                TINYXML_UNKNOWN, TINYXML_TEXT, and TINYXML_DECLARATION.
683
683
        */
684
684
        int Type() const        { return type; }
685
685
 
950
950
 
951
951
        TiXmlElement( const TiXmlElement& );
952
952
 
953
 
        void operator=( const TiXmlElement& base );
 
953
        TiXmlElement& operator=( const TiXmlElement& base );
954
954
 
955
955
        virtual ~TiXmlElement();
956
956
 
983
983
                does not exist, then TIXML_NO_ATTRIBUTE is returned.
984
984
        */      
985
985
        int QueryIntAttribute( const char* name, int* _value ) const;
 
986
        /// QueryUnsignedAttribute examines the attribute - see QueryIntAttribute().
 
987
        int QueryUnsignedAttribute( const char* name, unsigned* _value ) const;
 
988
        /** QueryBoolAttribute examines the attribute - see QueryIntAttribute(). 
 
989
                Note that '1', 'true', or 'yes' are considered true, while '0', 'false'
 
990
                and 'no' are considered false.
 
991
        */
 
992
        int QueryBoolAttribute( const char* name, bool* _value ) const;
986
993
        /// QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
987
994
        int QueryDoubleAttribute( const char* name, double* _value ) const;
988
995
        /// QueryFloatAttribute examines the attribute - see QueryIntAttribute().
1162
1169
                SetValue( _value );
1163
1170
        }
1164
1171
        TiXmlComment( const TiXmlComment& );
1165
 
        void operator=( const TiXmlComment& base );
 
1172
        TiXmlComment& operator=( const TiXmlComment& base );
1166
1173
 
1167
1174
        virtual ~TiXmlComment() {}
1168
1175
 
1176
1183
        */
1177
1184
        virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1178
1185
 
1179
 
        virtual const TiXmlComment*  ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
1180
 
        virtual TiXmlComment*  ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
 
1186
        virtual const TiXmlComment*  ToComment() const  { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
 
1187
        virtual           TiXmlComment*  ToComment()            { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
1181
1188
 
1182
1189
        /** Walk the XML tree visiting this node and all of its children. 
1183
1190
        */
1227
1234
        #endif
1228
1235
 
1229
1236
        TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT )       { copy.CopyTo( this ); }
1230
 
        void operator=( const TiXmlText& base )                                                         { base.CopyTo( this ); }
 
1237
        TiXmlText& operator=( const TiXmlText& base )                                                           { base.CopyTo( this ); return *this; }
1231
1238
 
1232
1239
        // Write this text object to a FILE stream.
1233
1240
        virtual void Print( FILE* cfile, int depth ) const;
1294
1301
                                                const char* _standalone );
1295
1302
 
1296
1303
        TiXmlDeclaration( const TiXmlDeclaration& copy );
1297
 
        void operator=( const TiXmlDeclaration& copy );
 
1304
        TiXmlDeclaration& operator=( const TiXmlDeclaration& copy );
1298
1305
 
1299
1306
        virtual ~TiXmlDeclaration()     {}
1300
1307
 
1351
1358
        virtual ~TiXmlUnknown() {}
1352
1359
 
1353
1360
        TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN )              { copy.CopyTo( this ); }
1354
 
        void operator=( const TiXmlUnknown& copy )                                                                              { copy.CopyTo( this ); }
 
1361
        TiXmlUnknown& operator=( const TiXmlUnknown& copy )                                                                             { copy.CopyTo( this ); return *this; }
1355
1362
 
1356
1363
        /// Creates a copy of this Unknown and returns it.
1357
1364
        virtual TiXmlNode* Clone() const;
1360
1367
 
1361
1368
        virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
1362
1369
 
1363
 
        virtual const TiXmlUnknown*     ToUnknown()     const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
1364
 
        virtual TiXmlUnknown*           ToUnknown()         { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
 
1370
        virtual const TiXmlUnknown*     ToUnknown()     const   { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
 
1371
        virtual TiXmlUnknown*           ToUnknown()                             { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
1365
1372
 
1366
1373
        /** Walk the XML tree visiting this node and all of its children. 
1367
1374
        */
1397
1404
        #endif
1398
1405
 
1399
1406
        TiXmlDocument( const TiXmlDocument& copy );
1400
 
        void operator=( const TiXmlDocument& copy );
 
1407
        TiXmlDocument& operator=( const TiXmlDocument& copy );
1401
1408
 
1402
1409
        virtual ~TiXmlDocument() {}
1403
1410
 
1635
1642
        TiXmlHandle( TiXmlNode* _node )                                 { this->node = _node; }
1636
1643
        /// Copy constructor
1637
1644
        TiXmlHandle( const TiXmlHandle& ref )                   { this->node = ref.node; }
1638
 
        TiXmlHandle operator=( const TiXmlHandle& ref ) { this->node = ref.node; return *this; }
 
1645
        TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; }
1639
1646
 
1640
1647
        /// Return a handle to the first child node.
1641
1648
        TiXmlHandle FirstChild() const;
1796
1803
#endif
1797
1804
 
1798
1805
#endif
1799