39#ifndef TIXML_STRING_INCLUDED
40#define TIXML_STRING_INCLUDED
52#if defined(_MSC_VER) && (_MSC_VER >= 1200 )
54 #define TIXML_EXPLICIT explicit
55#elif defined(__GNUC__) && (__GNUC__ >= 3 )
57 #define TIXML_EXPLICIT explicit
59 #define TIXML_EXPLICIT
103 memcpy(
start(), str, len);
134 return append(&single, 1);
166 assert( index <
length() );
173 assert( index <
length() );
180 return find(lookup, 0);
188 for (
const char* p =
c_str() + offset; *p !=
'\0'; ++p)
244 const size_type intsNeeded = ( bytesNeeded +
sizeof(int) - 1 ) /
sizeof(
int );
245 rep_ =
reinterpret_cast<Rep*
>(
new int[ intsNeeded ] );
262 delete [] (
reinterpret_cast<int*
>(
rep_ ) );
TiXmlOutStream & operator<<(const TiXmlString &in)
Definition tinystr.h:306
size_type capacity() const
Definition tinystr.h:160
const char * data() const
Definition tinystr.h:148
size_type find(char lookup) const
Definition tinystr.h:178
size_type find(char tofind, size_type offset) const
Definition tinystr.h:184
bool empty() const
Definition tinystr.h:157
TiXmlString()
Definition tinystr.h:81
size_t size_type
Definition tinystr.h:74
size_type size() const
Definition tinystr.h:154
TIXML_EXPLICIT TiXmlString(const char *str, size_type len)
Definition tinystr.h:100
void set_size(size_type sz)
Definition tinystr.h:224
size_type length() const
Definition tinystr.h:151
void init(size_type sz)
Definition tinystr.h:223
const char & at(size_type index) const
Definition tinystr.h:164
TiXmlString & operator+=(const char *suffix)
Definition tinystr.h:126
~TiXmlString()
Definition tinystr.h:107
char * start() const
Definition tinystr.h:225
const char * c_str() const
Definition tinystr.h:145
void reserve(size_type cap)
Definition tinystr.cc:40
static const size_type npos
Definition tinystr.h:77
void swap(TiXmlString &other)
Definition tinystr.h:214
TIXML_EXPLICIT TiXmlString(const char *copy)
Definition tinystr.h:93
TiXmlString & operator=(const char *copy)
Definition tinystr.h:113
void quit()
Definition tinystr.h:256
void clear()
Definition tinystr.h:195
TiXmlString & assign(const char *str, size_type len)
Definition tinystr.cc:52
Rep * rep_
Definition tinystr.h:266
TiXmlString(const TiXmlString ©)
Definition tinystr.h:86
TiXmlString & append(const char *str, size_type len)
Definition tinystr.cc:71
char * finish() const
Definition tinystr.h:226
char & operator[](size_type index) const
Definition tinystr.h:171
void init(size_type sz, size_type cap)
Definition tinystr.h:234
static Rep nullrep_
Definition tinystr.h:37
size_type size
Definition tinystr.h:230
char str[1]
Definition tinystr.h:231
size_type capacity
Definition tinystr.h:230
bool operator>(const TiXmlString &a, const TiXmlString &b)
Definition tinystr.h:283
bool operator<(const TiXmlString &a, const TiXmlString &b)
Definition tinystr.h:277
TiXmlString operator+(const TiXmlString &a, const TiXmlString &b)
Definition tinystr.cc:84
bool operator==(const TiXmlString &a, const TiXmlString &b)
Definition tinystr.h:272
bool operator<=(const TiXmlString &a, const TiXmlString &b)
Definition tinystr.h:284
bool operator!=(const TiXmlString &a, const TiXmlString &b)
Definition tinystr.h:282
bool operator>=(const TiXmlString &a, const TiXmlString &b)
Definition tinystr.h:285
#define TIXML_EXPLICIT
Definition tinystr.h:59