#include <inputstream.h>
Public Member Functions | |
InputStream (ISTREAM_TYPE _type, const char *_arg) | |
Constructor. | |
virtual | ~InputStream () |
virtual void | open ()=0 |
Opens the corresponding input stream. | |
virtual void | close ()=0 |
Closes the corresponding input stream. | |
virtual FILE * | getParserStream ()=0 |
Returns the (file-)input stream needed for YACC parser. | |
virtual bool | isReadable ()=0 |
Returns/Verifies if the corresponding input stream is readable. | |
const ISTREAM_TYPE | getType () |
Returns the ISTREAM_TYPE of the corresponding input stream. | |
const char * | getArg () |
Returns the entered argument (e.g. path to a file) of the corresponding input stream. | |
void | setArg (const char *_arg) |
Sets the argument (e.g. path to a file) of the corresponding input stream. | |
Protected Attributes | |
ISTREAM_TYPE | type |
The entered ISTREAM_TYPE. | |
const char * | arg |
The entered string (e.g. path to a file). |
Represents base class of all input streams.
Definition at line 53 of file inputstream.h.
InputStream::InputStream | ( | ISTREAM_TYPE | _type, | |
const char * | _arg | |||
) |
Constructor.
Constructor - creating object for an ISTREAM_TYPE and a string (e.g. path to a file).
[in] | _type | ISTREAM_TYPE. |
[in] | _arg | Pointer to a char object. |
Definition at line 37 of file inputstream.cpp.
InputStream::~InputStream | ( | ) | [virtual] |
Destructor.
Definition at line 41 of file inputstream.cpp.
void InputStream::close | ( | ) | [pure virtual] |
Closes the corresponding input stream.
Closes the corresponding input stream.
void |
Implemented in FileInputStream, NullInputStream, SocketInputStream, and StdinInputStream.
const char * InputStream::getArg | ( | ) | [inline] |
Returns the entered argument (e.g. path to a file) of the corresponding input stream.
Returns the entered argument (e.g. path to a file) of the corresponding input stream.
const | char* Pointer to a char object. |
Definition at line 110 of file inputstream.h.
Referenced by StreamManager::print().
FILE * InputStream::getParserStream | ( | ) | [pure virtual] |
Returns the (file-)input stream needed for YACC parser.
Returns the (file-)input stream needed for YACC parser.
FILE* | Pointer to a file object. |
Implemented in FileInputStream, NullInputStream, SocketInputStream, and StdinInputStream.
Referenced by StreamPreProcessor::StreamPreProcessor().
const ISTREAM_TYPE InputStream::getType | ( | ) | [inline] |
Returns the ISTREAM_TYPE of the corresponding input stream.
Returns the ISTREAM_TYPE of the corresponding input stream.
ISTREAM_TYPE. |
Definition at line 103 of file inputstream.h.
References type.
Referenced by StreamManager::print().
bool InputStream::isReadable | ( | ) | [pure virtual] |
Returns/Verifies if the corresponding input stream is readable.
Returns/Verifies if the corresponding input stream is readable.
bool | true if the corresponding input stream is readable, false otherwise. |
Implemented in FileInputStream, NullInputStream, SocketInputStream, and StdinInputStream.
Referenced by Executor::initStreams().
void InputStream::open | ( | ) | [pure virtual] |
Opens the corresponding input stream.
Opens the corresponding input stream.
void |
IOStreamException | If an error occured (e.g. if it is not possible to open a file) |
Implemented in FileInputStream, NullInputStream, SocketInputStream, and StdinInputStream.
Referenced by Executor::initStreams(), and Executor::parseQuery().
void InputStream::setArg | ( | const char * | _arg | ) | [inline] |
Sets the argument (e.g. path to a file) of the corresponding input stream.
Sets the argument (e.g. path to a file) of the corresponding input stream.
[in] | _arg | Pointer to a char object. |
void |
Definition at line 120 of file inputstream.h.
References arg.
Referenced by Executor::parseQuery().
const char * InputStream::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 135 of file inputstream.h.
Referenced by FileInputStream::open(), and setArg().
ISTREAM_TYPE InputStream::type [protected] |
The entered ISTREAM_TYPE.
The entered ISTREAM_TYPE, which is the first argument of the constructor.
Definition at line 129 of file inputstream.h.
Referenced by getType().