FileInputStream Class Reference

Represents a file input stream. More...

#include <fileinputstream.h>

Inheritance diagram for FileInputStream:

Inheritance graph
[legend]
Collaboration diagram for FileInputStream:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

Represents a file input stream.

Represents a file input stream.

Author:
Michael Schmidt

Gunnar Jehl

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

Definition at line 48 of file fileinputstream.h.


Constructor & Destructor Documentation

FileInputStream::FileInputStream ( 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 fileinputstream.cpp.

FileInputStream::~FileInputStream (  )  [virtual]

Destructor.

Definition at line 41 of file fileinputstream.cpp.

References close(), and file.


Member Function Documentation

void FileInputStream::close (  )  [virtual]

Closes the corresponding input stream.

Closes the corresponding input stream.

Return values:
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.

Return values:
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.

Return values:
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.

Return values:
void 
Exceptions:
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.


Member Data Documentation

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().


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