InputStream Class Reference

Represents base class of all input streams. More...

#include <inputstream.h>

Inheritance diagram for InputStream:

Inheritance graph
[legend]

List of all members.

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


Detailed Description

Represents base class of all input streams.

Represents base class of all input streams.

Author:
Michael Schmidt

Gunnar Jehl

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

Definition at line 53 of file inputstream.h.


Constructor & Destructor Documentation

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

Parameters:
[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.


Member Function Documentation

void InputStream::close (  )  [pure virtual]

Closes the corresponding input stream.

Closes the corresponding input stream.

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

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

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

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

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

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

Parameters:
[in] _arg Pointer to a char object.
Return values:
void 

Definition at line 120 of file inputstream.h.

References arg.

Referenced by Executor::parseQuery().


Member Data Documentation

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

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


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