Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Config::StringWriter Class Reference

#include <Config.h>

Inheritance diagram for Config::StringWriter:

Config::Writer List of all members.

Detailed Description

The string writer is a writer that creates a string.

Definition at line 164 of file Config.h.

Public Member Functions

const char * GetString ()
 Returns the so far accumulated string.

 StringWriter ()
 Creates a new string writer.

virtual bool Write (const char *string)
 Writes a string to the writer's target.

virtual bool Write (char character)
 Writes a character to the writer's target.

virtual ~StringWriter ()
 Destroys the string writer.


Private Member Functions

void IncreaseBuffer ()
 Increases the buffer's size by CF_SWBUFFERINCREASE bytes.


Private Attributes

char * Buffer
 The so far accumulated string.

unsigned int BufferLen
 The current length of the buffer.

unsigned int BufferSize
 The current size of the buffer.


Constructor & Destructor Documentation

StringWriter  ) 
 

Creates a new string writer.

virtual ~StringWriter  )  [virtual]
 

Destroys the string writer.


Member Function Documentation

const char* GetString  )  [inline]
 

Returns the so far accumulated string.

Returns:
The string.
Warning:
You must not delete nor modify this string. It is automatically deleted when destroying the writer.

void IncreaseBuffer  )  [private]
 

Increases the buffer's size by CF_SWBUFFERINCREASE bytes.

virtual bool Write const char *  string  )  [virtual]
 

Writes a string to the writer's target.

Parameters:
string The string to be written.
Returns:
Whether the writing was successful.
Note:
Implement this method in derivatives.

Reimplemented from Config::Writer.

virtual bool Write char  character  )  [virtual]
 

Writes a character to the writer's target.

Parameters:
character The character to be written.
Returns:
Whether the writing was successful.
Note:
Implement this method in derivatives.

Reimplemented from Config::Writer.


Member Data Documentation

char* Buffer [private]
 

The so far accumulated string.

Definition at line 171 of file Config.h.

unsigned int BufferLen [private]
 

The current length of the buffer.

This is the number of used (filled) bytes.

Definition at line 177 of file Config.h.

unsigned int BufferSize [private]
 

The current size of the buffer.

This is the number of reserved (allocated) bytes.

Definition at line 183 of file Config.h.


The documentation for this class was generated from the following file:
Generated on Tue Oct 3 00:23:39 2006 for ToolBox by doxygen 1.3.6