AwV4::SimpleString Class Reference

An extremely primitive string class. More...

#include <AwV4.h>

List of all members.

Public Member Functions

const char * c_str ()
size_t Length () const
void Assign (const char *str_p)
void Append (const char *str_p)
 SimpleString (const char *str_p=NULL)
 SimpleString (const SimpleString &rhs)
const SimpleStringoperator= (const SimpleString &rhs)
SimpleStringoperator= (const char *rhs)
 ~SimpleString ()
void Free ()

Protected Member Functions

void init (size_t siz)
void quit ()

Classes

struct  StringData


Detailed Description

An extremely primitive string class.

This class implements only the bare minimum required for the V4 class wrappers.

Reference counting is implemented to reduce memory usage; it is therefore not recommended you do any funny business with the pointer returned by c_str()

Examples:

example.cpp.


Constructor & Destructor Documentation

AwV4::SimpleString::SimpleString ( const char *  str_p = NULL  )  [inline]

Default constructor

AwV4::SimpleString::SimpleString ( const SimpleString rhs  )  [inline]

Copy constructor

AwV4::SimpleString::~SimpleString (  )  [inline]

Default destructor


Member Function Documentation

const char* AwV4::SimpleString::c_str (  )  [inline]

Returns a C-style compatible string; funny business not advised!

If you need to do anything complicated, just copy the data and do it yourself (perhaps with another more sophisticated string library)

size_t AwV4::SimpleString::Length (  )  const [inline]

Determine the length of this string, not including the NUL terminator.

void AwV4::SimpleString::Assign ( const char *  str_p  )  [inline]

Assign data to this string.

void AwV4::SimpleString::Append ( const char *  str_p  )  [inline]

Add data to the end of this string

const SimpleString& AwV4::SimpleString::operator= ( const SimpleString rhs  )  [inline]

Assignment operator

SimpleString& AwV4::SimpleString::operator= ( const char *  rhs  )  [inline]

Alternate assignment operator, accepting a C-string

void AwV4::SimpleString::Free (  )  [inline]

Free the contents of the string

void AwV4::SimpleString::init ( size_t  siz  )  [inline, protected]

Allocate space for the string

void AwV4::SimpleString::quit (  )  [inline, protected]

Deallocate string memory


The documentation for this class was generated from the following file:
Generated on Sun Mar 4 05:45:57 2007 for AwV4 by  doxygen 1.5.1-p1