77 #ifndef TIXML_STRING_INCLUDED 78 #define TIXML_STRING_INCLUDED 87 #if defined(_MSC_VER) && (_MSC_VER >= 1200 ) 89 #define TIXML_EXPLICIT explicit 90 #elif defined(__GNUC__) && (__GNUC__ >= 3 ) 92 #define TIXML_EXPLICIT explicit 94 #define TIXML_EXPLICIT 97 namespace RTT {
namespace marsh {
131 init( static_cast<size_type>( strlen(copy) ));
139 memcpy(
start(), str, len);
151 return assign( copy, (size_type)strlen(copy));
164 return append(suffix, static_cast<size_type>( strlen(suffix) ));
170 return append(&single, 1);
200 const char&
at (size_type index)
const 202 assert( index <
length() );
209 assert( index <
length() );
214 size_type
find (
char lookup)
const 216 return find(lookup, 0);
220 size_type
find (
char tofind, size_type offset)
const 224 for (
const char* p =
c_str() + offset; *p !=
'\0'; ++p)
226 if (*p == tofind)
return static_cast< size_type
>( p -
c_str() );
270 void init(size_type sz, size_type cap)
279 const size_type bytesNeeded =
sizeof(
Rep) + cap;
280 const size_type intsNeeded = ( bytesNeeded +
sizeof(int) - 1 ) /
sizeof( int );
281 rep_ =
reinterpret_cast<Rep*
>(
new int[ intsNeeded ] );
298 delete [] (
reinterpret_cast<int*
>(
rep_ ) );
359 #endif // TIXML_STRING_INCLUDED 360 #endif // TIXML_USE_STL
void swap(TiXmlString &other)
const char * data() const
size_type capacity() const
TIXML_EXPLICIT TiXmlString(const char *copy)
TiXmlString & operator=(const char *copy)
bool operator<(const TiXmlString &a, const TiXmlString &b)
TiXmlString operator+(const TiXmlString &a, const TiXmlString &b)
void set_size(size_type sz)
bool operator>=(const TiXmlString &a, const TiXmlString &b)
TiXmlString & append(const char *str, size_type len)
TiXmlString & operator+=(const char *suffix)
char & operator[](size_type index) const
TIXML_EXPLICIT TiXmlString(const char *str, size_type len)
bool operator<=(const TiXmlString &a, const TiXmlString &b)
void reserve(size_type cap)
const char * c_str() const
void init(size_type sz, size_type cap)
TIXML_OSTREAM & operator<<(TIXML_OSTREAM &out, const TiXmlNode &base)
TiXmlString(const TiXmlString ©)
bool operator>(const TiXmlString &a, const TiXmlString &b)
const char & at(size_type index) const
static const size_type npos
size_type find(char tofind, size_type offset) const
bool operator==(const TiXmlString &a, const TiXmlString &b)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
TiXmlString & assign(const char *str, size_type len)
size_type find(char lookup) const
bool operator!=(const TiXmlString &a, const TiXmlString &b)