#include <outputstream.h>

Public Member Functions | |
| OutputStream (OSTREAM_TYPE _type, const char *_arg) | |
| Constructor. | |
| virtual | ~OutputStream () |
| virtual void | open ()=0 |
| Opens the corresponding output stream. | |
| virtual void | close ()=0 |
| Closes the corresponding output stream. | |
| void | decrementIndents (int n=INDENT_SINGLE) |
| Decrements the number of indents to be outputted. | |
| void | incrementIndents (int n=INDENT_SINGLE) |
| Increments the number of indents to be outputted. | |
| void | resetIndents () |
| Resets the number of indents to be outputted. | |
| virtual void | writeIndents () |
| Writes all indent characters to the corresponding output stream. | |
| virtual void | write (const char *str)=0 |
| Writes a string to the corresponding output stream. | |
| virtual void | writeln (const char *str)=0 |
| Writes a string with an ending newline character to the corresponding output stream. | |
| virtual bool | isWriteable ()=0 |
| Returns/Verifies if the corresponding output stream is writeable. | |
| virtual void | flush ()=0 |
| Flushes the corresponding output stream. | |
| const OSTREAM_TYPE | getType () |
| Returns the OSTREAM_TYPE of the corresponding output stream. | |
| const char * | getArg () |
| Returns the entered argument (e.g. path to a file) of the corresponding output stream. | |
Protected Attributes | |
| OSTREAM_TYPE | type |
| The entered OSTREAM_TYPE. | |
| const char * | arg |
| The entered string (e.g. path to a file). | |
Private Attributes | |
| int | indents |
Represents base class of all output streams.
Definition at line 105 of file outputstream.h.
| OutputStream::OutputStream | ( | OSTREAM_TYPE | _type, | |
| const char * | _arg | |||
| ) |
Constructor.
Constructor - creating object for an OSTREAM_TYPE and a string (e.g. path to a file).
| [in] | _type | OSTREAM_TYPE. |
| [in] | _arg | Pointer to a char object. |
Definition at line 37 of file outputstream.cpp.
| OutputStream::~OutputStream | ( | ) | [virtual] |
Destructor.
Definition at line 42 of file outputstream.cpp.
| void OutputStream::close | ( | ) | [pure virtual] |
Closes the corresponding output stream.
Closes the corresponding output stream.
| void |
Implemented in FileOutputStream, NullOutputStream, SocketOutputStream, and StdoutOutputStream.
| void OutputStream::decrementIndents | ( | int | n = INDENT_SINGLE |
) | [inline] |
Decrements the number of indents to be outputted.
Decrements the number of indents to be outputted.
| [in] | n | Number of indents to be decremented. |
| void |
Definition at line 141 of file outputstream.h.
References indents.
| void OutputStream::flush | ( | ) | [pure virtual] |
Flushes the corresponding output stream.
Flushes the corresponding output stream.
| void |
Implemented in FileOutputStream, NullOutputStream, SocketOutputStream, and StdoutOutputStream.
| const char * OutputStream::getArg | ( | ) | [inline] |
Returns the entered argument (e.g. path to a file) of the corresponding output stream.
Returns the entered argument (e.g. path to a file) of the corresponding output stream.
| const | char* Pointer to a char object. |
Definition at line 215 of file outputstream.h.
References arg.
Referenced by Executor::evalQuery(), and StreamManager::print().
| const OSTREAM_TYPE OutputStream::getType | ( | ) | [inline] |
Returns the OSTREAM_TYPE of the corresponding output stream.
Returns the OSTREAM_TYPE of the corresponding output stream.
| OSTREAM_TYPE. |
Definition at line 206 of file outputstream.h.
References type.
Referenced by Executor::evalQuery(), and StreamManager::print().
| void OutputStream::incrementIndents | ( | int | n = INDENT_SINGLE |
) | [inline] |
Increments the number of indents to be outputted.
Increments the number of indents to be outputted.
| [in] | n | Number of indents to be incremented. |
| void |
Definition at line 149 of file outputstream.h.
| bool OutputStream::isWriteable | ( | ) | [pure 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. |
Implemented in FileOutputStream, NullOutputStream, SocketOutputStream, and StdoutOutputStream.
Referenced by Executor::initStreams(), and Executor::~Executor().
| void OutputStream::open | ( | ) | [pure 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) |
Implemented in FileOutputStream, NullOutputStream, SocketOutputStream, and StdoutOutputStream.
Referenced by Executor::initStreams().
| void OutputStream::resetIndents | ( | ) | [inline] |
Resets the number of indents to be outputted.
Resets the number of indents to be outputted, i.e. sets indents = 0.
| void |
Definition at line 158 of file outputstream.h.
References indents.
| void OutputStream::write | ( | const char * | str | ) | [pure 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 |
Implemented in FileOutputStream, NullOutputStream, SocketOutputStream, and StdoutOutputStream.
Referenced by operator<<(), and writeIndents().
| void OutputStream::writeIndents | ( | ) | [virtual] |
Writes all indent characters to the corresponding output stream.
Writes all indent characters to the corresponding output stream, i.e. writes INDENT_TOKEN INDENT_MULTIPLICATOR * indents times.
| void |
Definition at line 45 of file outputstream.cpp.
References INDENT_MULTIPLICATOR, INDENT_TOKEN, indents, and write().
| void OutputStream::writeln | ( | const char * | str | ) | [pure 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 |
Implemented in FileOutputStream, NullOutputStream, SocketOutputStream, and StdoutOutputStream.
const char * OutputStream::arg [protected] |
The entered string (e.g. path to a file).
The entered string (e.g. path to a file), which is the second argument of the constructor.
Definition at line 237 of file outputstream.h.
Referenced by getArg(), and FileOutputStream::open().
int OutputStream::indents [private] |
The number of indents to be outputted.
Definition at line 224 of file outputstream.h.
Referenced by decrementIndents(), resetIndents(), and writeIndents().
OSTREAM_TYPE OutputStream::type [protected] |
The entered OSTREAM_TYPE.
The entered OSTREAM_TYPE, which is the first argument of the constructor.
Definition at line 231 of file outputstream.h.
Referenced by getType().
1.5.9