Back to index

nux  3.0.0
Classes | Defines | Functions
tinystr.h File Reference
#include <assert.h>
#include <string.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TiXmlString
struct  TiXmlString::Rep
class  TiXmlOutStream

Defines

#define TIXML_EXPLICIT

Functions

bool operator== (const TiXmlString &a, const TiXmlString &b)
bool operator< (const TiXmlString &a, const TiXmlString &b)
bool operator!= (const TiXmlString &a, const TiXmlString &b)
bool operator> (const TiXmlString &a, const TiXmlString &b)
bool operator<= (const TiXmlString &a, const TiXmlString &b)
bool operator>= (const TiXmlString &a, const TiXmlString &b)
bool operator== (const TiXmlString &a, const char *b)
bool operator== (const char *a, const TiXmlString &b)
bool operator!= (const TiXmlString &a, const char *b)
bool operator!= (const char *a, const TiXmlString &b)
TiXmlString operator+ (const TiXmlString &a, const TiXmlString &b)
TiXmlString operator+ (const TiXmlString &a, const char *b)
TiXmlString operator+ (const char *a, const TiXmlString &b)

Class Documentation

struct TiXmlString::Rep

Definition at line 278 of file tinystr.h.

Class Members
size_type capacity
size_type size
char str

Define Documentation

#define TIXML_EXPLICIT

Definition at line 78 of file tinystr.h.


Function Documentation

bool operator!= ( const TiXmlString a,
const TiXmlString b 
) [inline]

Definition at line 332 of file tinystr.h.

{
  return ! (a == b);
}
bool operator!= ( const TiXmlString a,
const char *  b 
) [inline]

Definition at line 357 of file tinystr.h.

{
  return ! (a == b);
}
bool operator!= ( const char *  a,
const TiXmlString b 
) [inline]

Definition at line 361 of file tinystr.h.

{
  return ! (b == a);
}
TiXmlString operator+ ( const TiXmlString a,
const TiXmlString b 
)

Definition at line 112 of file tinystr.cpp.

{
  TiXmlString tmp;
  tmp.reserve (a.length() + b.length() );
  tmp += a;
  tmp += b;
  return tmp;
}

Here is the call graph for this function:

TiXmlString operator+ ( const TiXmlString a,
const char *  b 
)

Definition at line 121 of file tinystr.cpp.

{
  TiXmlString tmp;
  TiXmlString::size_type b_len = static_cast<TiXmlString::size_type> ( strlen (b) );
  tmp.reserve (a.length() + b_len);
  tmp += a;
  tmp.append (b, b_len);
  return tmp;
}

Here is the call graph for this function:

TiXmlString operator+ ( const char *  a,
const TiXmlString b 
)

Definition at line 131 of file tinystr.cpp.

{
  TiXmlString tmp;
  TiXmlString::size_type a_len = static_cast<TiXmlString::size_type> ( strlen (a) );
  tmp.reserve (a_len + b.length() );
  tmp.append (a, a_len);
  tmp += b;
  return tmp;
}

Here is the call graph for this function:

bool operator< ( const TiXmlString a,
const TiXmlString b 
) [inline]

Definition at line 327 of file tinystr.h.

{
  return strcmp (a.c_str(), b.c_str() ) < 0;
}

Here is the call graph for this function:

bool operator<= ( const TiXmlString a,
const TiXmlString b 
) [inline]

Definition at line 340 of file tinystr.h.

{
  return ! (b < a);
}
bool operator== ( const TiXmlString a,
const TiXmlString b 
) [inline]

Definition at line 322 of file tinystr.h.

{
  return    ( a.length() == b.length() )                       // optimization on some platforms
            && ( strcmp (a.c_str(), b.c_str() ) == 0 ); // actual compare
}

Here is the call graph for this function:

bool operator== ( const TiXmlString a,
const char *  b 
) [inline]

Definition at line 349 of file tinystr.h.

{
  return strcmp (a.c_str(), b) == 0;
}

Here is the call graph for this function:

bool operator== ( const char *  a,
const TiXmlString b 
) [inline]

Definition at line 353 of file tinystr.h.

{
  return b == a;
}
bool operator> ( const TiXmlString a,
const TiXmlString b 
) [inline]

Definition at line 336 of file tinystr.h.

{
  return b < a;
}
bool operator>= ( const TiXmlString a,
const TiXmlString b 
) [inline]

Definition at line 344 of file tinystr.h.

{
  return ! (a < b);
}