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

Config::FileWriter Class Reference

#include <Config.h>

Inheritance diagram for Config::FileWriter:

Config::Writer List of all members.

Detailed Description

The file writer is a writer that writes to a file.

Definition at line 114 of file Config.h.

Public Member Functions

 FileWriter ()
 Creates a new file writer.

bool Open (const char *fileName)
 Opens a file for the 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 ~FileWriter ()
 Destroys the file writer.


Private Attributes

FILE * File
 The file to write to.


Constructor & Destructor Documentation

FileWriter  ) 
 

Creates a new file writer.

virtual ~FileWriter  )  [virtual]
 

Destroys the file writer.

This also closes the open file, if any.


Member Function Documentation

bool Open const char *  fileName  ) 
 

Opens a file for the writer.

The method fails if you try this twice.

Parameters:
fileName The name of the file to be opened.
Returns:
Whether the file could be opened.

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

FILE* File [private]
 

The file to write to.

Definition at line 121 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