#include <fileinputstream.h>
Public Member Functions | |
FileInputStream (const char *_path) | |
Constructor. | |
virtual | ~FileInputStream () |
void | open () |
void | close () |
FILE * | getParserStream () |
bool | isReadable () |
Private Attributes | |
FILE * | file |
The opened file for reading. |
Represents a file input stream.
Definition at line 48 of file fileinputstream.h.
FileInputStream::FileInputStream | ( | 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 fileinputstream.cpp.
FileInputStream::~FileInputStream | ( | ) | [virtual] |
void FileInputStream::close | ( | ) | [virtual] |
Closes the corresponding input stream.
Closes the corresponding input stream.
void |
Implements InputStream.
Definition at line 61 of file fileinputstream.cpp.
References file.
Referenced by ~FileInputStream().
FILE * FileInputStream::getParserStream | ( | ) | [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. |
Implements InputStream.
Definition at line 65 of file fileinputstream.cpp.
References file.
bool FileInputStream::isReadable | ( | ) | [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. |
Implements InputStream.
Definition at line 69 of file fileinputstream.cpp.
References file.
void FileInputStream::open | ( | ) | [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) |
Implements InputStream.
Definition at line 47 of file fileinputstream.cpp.
References InputStream::arg, and file.
FILE * FileInputStream::file [private] |
The opened file for reading.
The opened file for reading, 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 89 of file fileinputstream.h.
Referenced by close(), getParserStream(), isReadable(), open(), and ~FileInputStream().