BengCString Class Reference

#include <CString.h>

List of all members.

Public Member Functions

 BengCString (void)
 Creates a BengCString object. The string will initialize as NULL, so you must give it data using set().
 ~BengCString (void)
 Destroys the BengCString object, deallocating the string, if any.
char * set (const char *text)
 Changes the contents of the string to 'text', allocating or reallocating as necessary to provide enough room.
char * append (const char *text)
 Adds the contents of 'text' to the end of the current string, reallocating to provide enough extra room.

Public Attributes

char * string


Detailed Description

The BengCString class provides a way to dynamically create and alter C strings without having to perform operations low-level. For a game, this is preferable to C++ strings when performance is critical. BengCString will have approximately the same construction and destruction times as an ordinary C string, while C++ strings take much longer to create and destroy.

Constructor & Destructor Documentation

BengCString::BengCString ( void   ) 

Creates a BengCString object. The string will initialize as NULL, so you must give it data using set().

BengCString::~BengCString ( void   ) 

Destroys the BengCString object, deallocating the string, if any.


Member Function Documentation

char* BengCString::append ( const char *  text  ) 

Adds the contents of 'text' to the end of the current string, reallocating to provide enough extra room.

char* BengCString::set ( const char *  text  ) 

Changes the contents of the string to 'text', allocating or reallocating as necessary to provide enough room.


Member Data Documentation

Contains the C string data. Since this class has no internals, you will be able to perform manual operations on it, but it is advised that you use the class methods to operate on the string where possible.


The documentation for this class was generated from the following file:

Generated on Sun May 3 21:56:25 2009 for BlitzzEngine by  doxygen 1.5.8