StreamManager Class Reference

Represents stream managing class. More...

#include <streammanager.h>

Collaboration diagram for StreamManager:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~StreamManager ()
void print ()
 Prints information of all used input/output streams.
InputStreamgetQueryInputStream ()
 Returns the query input stream.
InputStreamgetXMLInputStream ()
 Returns the XML document input stream.
OutputStreamgetDebugOutputStream ()
 Returns the debug output stream.
OutputStreamgetEvalOutputStream ()
 Returns the evaluate/result output stream.

Static Public Member Functions

static void initInstance (InputStream *_query_istream, InputStream *_xml_istream, OutputStream *_debug_ostream, OutputStream *_eval_ostream)
 Initializes instance of StreamManager.
static StreamManagergetInstance ()
 Returns instance of StreamManager.

Private Member Functions

 StreamManager (InputStream *_query_istream, InputStream *_xml_istream, OutputStream *_debug_ostream, OutputStream *_eval_ostream)
 Constructor.

Private Attributes

InputStreamquery_istream
 The entered query InputStream.
InputStreamxml_istream
 The entered XML document InputStream.
OutputStreamdebug_ostream
 The entered debug OutputStream.
OutputStreameval_ostream
 The entered evaluate/result OutputStream.

Static Private Attributes

static StreamManagerinstance = NULL
 Instance of StreamManager.


Detailed Description

Represents stream managing class.

Represents stream managing class, which handles all input/ouput streams.

Note:
SINGLETON PATTERN!
Author:
Michael Schmidt

Gunnar Jehl

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

Definition at line 53 of file streammanager.h.


Constructor & Destructor Documentation

StreamManager::~StreamManager (  )  [virtual]

Destructor.

Definition at line 57 of file streammanager.cpp.

References debug_ostream, eval_ostream, query_istream, and xml_istream.

StreamManager::StreamManager ( InputStream _query_istream,
InputStream _xml_istream,
OutputStream _debug_ostream,
OutputStream _eval_ostream 
) [private]

Constructor.

Constructor - creating object for two InputStream and two OutputStream.

Parameters:
[in] _query_istream Pointer to a InputStream object.
[in] _xml_istream Pointer to a InputStream object.
[in] _debug_ostream Pointer to a OutputStream object.
[in] _eval_ostream Pointer to a OutputStream object.

Definition at line 52 of file streammanager.cpp.

Referenced by initInstance().


Member Function Documentation

OutputStream * StreamManager::getDebugOutputStream (  )  [inline]

Returns the debug output stream.

Returns the debug output stream.

Return values:
OutputStream* Pointer to a OutputStream object.

Definition at line 112 of file streammanager.h.

References debug_ostream.

OutputStream * StreamManager::getEvalOutputStream (  )  [inline]

Returns the evaluate/result output stream.

Returns the evaluate/result output stream.

Return values:
OutputStream* Pointer to a OutputStream object.

Definition at line 121 of file streammanager.h.

References eval_ostream.

static StreamManager * StreamManager::getInstance (  )  [static]

Returns instance of StreamManager.

Returns instance of StreamManager, i.e. of this object.

Note:
DO NOT CALL THIS METHOD BEFORE METHOD initInstance(InputStream* _query_istream, InputStream* _xml_istream, OutputStream* _debug_ostream, OutputStream* _eval_ostream) WAS CALLED!
Return values:
StreamManager* Pointer to a StreamManager object.

Definition at line 48 of file streammanager.cpp.

References instance.

Referenced by Executor::parseQuery(), Executor::start(), and Executor::~Executor().

InputStream * StreamManager::getQueryInputStream (  )  [inline]

Returns the query input stream.

Returns the query input stream.

Return values:
InputStream* Pointer to a InputStream object.

Definition at line 96 of file streammanager.h.

References query_istream.

InputStream * StreamManager::getXMLInputStream (  )  [inline]

Returns the XML document input stream.

Returns the XML document input stream.

Return values:
InputStream* Pointer to a InputStream object.

Definition at line 103 of file streammanager.h.

Referenced by Executor::parseQuery().

static void StreamManager::initInstance ( InputStream _query_istream,
InputStream _xml_istream,
OutputStream _debug_ostream,
OutputStream _eval_ostream 
) [static]

Initializes instance of StreamManager.

Initializes instance of StreamManager, i.e. initializes this object.

Note:
CALL THIS METHOD BEFORE METHOD getInstance()!
Parameters:
[in] _query_istream Pointer to a InputStream object.
[in] _xml_istream Pointer to a InputStream object.
[in] _debug_ostream Pointer to a OutputStream object.
[in] _eval_ostream Pointer to a OutputStream object.
Return values:
void 

Definition at line 39 of file streammanager.cpp.

References instance, and StreamManager().

Referenced by Executor::initStreams().

void StreamManager::print (  ) 

Prints information of all used input/output streams.

Prints information of all used input/output streams.

Return values:
void 

Definition at line 64 of file streammanager.cpp.

References debug_ostream, eval_ostream, OutputStream::getArg(), InputStream::getArg(), OutputStream::getType(), InputStream::getType(), NEWLINE, query_istream, and xml_istream.

Referenced by Executor::parseQuery().


Member Data Documentation

The entered debug OutputStream.

The entered debug OutputStream, which is the third argument of the constructor.

Definition at line 158 of file streammanager.h.

Referenced by getDebugOutputStream(), print(), and ~StreamManager().

The entered evaluate/result OutputStream.

The entered evaluate/result OutputStream, which is the fourth argument of the constructor.

Definition at line 164 of file streammanager.h.

Referenced by getEvalOutputStream(), print(), and ~StreamManager().

static StreamManager * StreamManager::instance = NULL [static, private]

Instance of StreamManager.

Instance of StreamManager to avoid duplicate existence of this object.

Definition at line 130 of file streammanager.h.

Referenced by getInstance(), and initInstance().

The entered query InputStream.

The entered query InputStream, which is the first argument of the constructor.

Definition at line 146 of file streammanager.h.

Referenced by getQueryInputStream(), print(), and ~StreamManager().

The entered XML document InputStream.

The entered XML document InputStream, which is the second argument of the constructor.

Definition at line 152 of file streammanager.h.

Referenced by print(), and ~StreamManager().


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