#include <fileoutputstream.h>
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. |
Represents a file output stream.
Definition at line 48 of file fileoutputstream.h.
FileOutputStream::FileOutputStream | ( | const char * | _path | ) |
Constructor.
Constructor - creating object for a string (path to a file).
[in] | _path | Pointer to a char object. |
Definition at line 37 of file fileoutputstream.cpp.
FileOutputStream::~FileOutputStream | ( | ) | [virtual] |
void FileOutputStream::close | ( | ) | [virtual] |
Closes the corresponding output stream.
Closes the corresponding output stream.
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.
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.
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.
void |
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.
[in] | str | Pointer to a char object (string to be written). |
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.
[in] | str | Pointer to a char object (string to be written). |
void |
Implements OutputStream.
Definition at line 63 of file fileoutputstream.cpp.
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().