FileOutputStream Class Reference

Represents a file output stream. More...

#include <fileoutputstream.h>

Inheritance diagram for FileOutputStream:

Inheritance graph
[legend]
Collaboration diagram for FileOutputStream:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FileOutputStream (const char *_path)
 Constructor.
virtual ~FileOutputStream ()
void open ()
void close ()
void write (const char *str)
void writeln (const char *str)
bool isWriteable ()
void flush ()

Private Attributes

FILE * file
 The opened file for writing.


Detailed Description

Represents a file output stream.

Represents a file output stream.

Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition at line 48 of file fileoutputstream.h.


Constructor & Destructor Documentation

FileOutputStream::FileOutputStream ( const char *  _path  ) 

Constructor.

Constructor - creating object for a string (path to a file).

Parameters:
[in] _path Pointer to a char object.

Definition at line 37 of file fileoutputstream.cpp.

FileOutputStream::~FileOutputStream (  )  [virtual]

Destructor.

Definition at line 42 of file fileoutputstream.cpp.

References close().


Member Function Documentation

void FileOutputStream::close (  )  [virtual]

Closes the corresponding output stream.

Closes the corresponding output stream.

Return values:
void 

Implements OutputStream.

Definition at line 55 of file fileoutputstream.cpp.

References file.

Referenced by ~FileOutputStream().

void FileOutputStream::flush (  )  [virtual]

Flushes the corresponding output stream.

Flushes the corresponding output stream.

Return values:
void 

Implements OutputStream.

Definition at line 72 of file fileoutputstream.cpp.

References file.

bool FileOutputStream::isWriteable (  )  [virtual]

Returns/Verifies if the corresponding output stream is writeable.

Returns/Verifies if the corresponding output stream is writeable.

Return values:
bool true if the corresponding output stream is writeable, false otherwise.

Implements OutputStream.

Definition at line 68 of file fileoutputstream.cpp.

References file.

void FileOutputStream::open (  )  [virtual]

Opens the corresponding output stream.

Opens the corresponding output stream.

Return values:
void 
Exceptions:
IOStreamException If an error occured (e.g. if it is not possible to open a file)

Implements OutputStream.

Definition at line 46 of file fileoutputstream.cpp.

References OutputStream::arg, and file.

void FileOutputStream::write ( const char *  str  )  [virtual]

Writes a string to the corresponding output stream.

Writes a string to the corresponding output stream.

Parameters:
[in] str Pointer to a char object (string to be written).
Return values:
void 

Implements OutputStream.

Definition at line 59 of file fileoutputstream.cpp.

References file.

void FileOutputStream::writeln ( const char *  str  )  [virtual]

Writes a string with an ending newline character to the corresponding output stream.

Writes a string with an ending newline character to the corresponding output stream.

Parameters:
[in] str Pointer to a char object (string to be written).
Return values:
void 

Implements OutputStream.

Definition at line 63 of file fileoutputstream.cpp.

References file, and NEWLINE.


Member Data Documentation

FILE * FileOutputStream::file [private]

The opened file for writing.

The opened file for writing, which was found for the path given as argument of the constructor. This member variable is NULL on creation of object but should not be NULL anymore after method open() has been executed.

Definition at line 99 of file fileoutputstream.h.

Referenced by close(), flush(), isWriteable(), open(), write(), and writeln().


Generated on Sun May 24 20:20:24 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9