#include <tinystr.h>
Inherited by TiXmlOutStream.
Public Types | |
| typedef size_t | size_type |
| The size type used. | |
Public Member Functions | |
| TiXmlString () | |
| TiXmlString empty constructor. | |
| TiXmlString (const TiXmlString ©) | |
| TiXmlString copy constructor. | |
| TIXML_EXPLICIT | TiXmlString (const char *copy) |
| TiXmlString constructor, based on a string. | |
| TIXML_EXPLICIT | TiXmlString (const char *str, size_type len) |
| TiXmlString constructor, based on a string. | |
| ~TiXmlString () | |
| TiXmlString destructor. | |
| TiXmlString & | operator= (const char *copy) |
| = operator | |
| TiXmlString & | operator= (const TiXmlString ©) |
| = operator | |
| TiXmlString & | operator+= (const char *suffix) |
| += operator. Maps to append | |
| TiXmlString & | operator+= (char single) |
| += operator. Maps to append | |
| TiXmlString & | operator+= (const TiXmlString &suffix) |
| += operator. Maps to append | |
| const char * | c_str () const |
| Convert a TiXmlString into a null-terminated char *. | |
| const char * | data () const |
| Convert a TiXmlString into a char * (need not be null terminated). | |
| size_type | length () const |
| Return the length of a TiXmlString. | |
| size_type | size () const |
| Alias for length(). | |
| bool | empty () const |
| Checks if a TiXmlString is empty. | |
| size_type | capacity () const |
| Return capacity of string. | |
| const char & | at (size_type index) const |
| single char extraction | |
| char & | operator[] (size_type index) const |
| [] operator | |
| size_type | find (char lookup) const |
| find a char in a string. Return TiXmlString::npos if not found | |
| size_type | find (char tofind, size_type offset) const |
| find a char in a string from an offset. Return TiXmlString::npos if not found | |
| void | reserve (size_type cap) |
Static Public Attributes | |
| static const size_type | npos = static_cast< TiXmlString::size_type >(-1) |
| Error value for find primitive. | |
TiXmlString is an emulation of a subset of the std::string template. Its purpose is to allow compiling TinyXML on compilers with no or poor STL support. Only the member functions relevant to the TinyXML project have been implemented. The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase a string and there's no more room, we allocate a buffer twice as big as we need.
| void TiXmlString::reserve | ( | size_type | cap | ) |
Function to reserve a big amount of data when we know we'll need it. Be aware that this function DOES NOT clear the content of the TiXmlString if any exists.
1.7.1