torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::architecture::DDBConsoleStreams Class Reference

Device database console streams class. More...

#include <DDBConsoleStreams.hpp>

+ Inheritance diagram for torc::architecture::DDBConsoleStreams:
+ Collaboration diagram for torc::architecture::DDBConsoleStreams:

Public Types

typedef std::basic_istream< char > istream
 Internal typedef of istream;. More...
 
typedef std::basic_ostream< char > ostream
 Internal typedef of ostream;. More...
 

Public Member Functions

 DDBConsoleStreams (void)
 Null constructor. More...
 
 DDBConsoleStreams (istream &inIn, ostream &inOut, ostream &inErr, ostream &inLog)
 Explicit constructor. More...
 
virtual ~DDBConsoleStreams (void)
 Virtual destructor. More...
 
istreammIn (void)
 Returns the database console input stream. More...
 
ostreammOut (void)
 Returns the database console output stream. More...
 
ostreammErr (void)
 Returns the database console error stream. More...
 
ostreammLog (void)
 Returns the database console log stream. More...
 
istreamgetConsoleIn (void)
 Returns the database console input stream. More...
 
ostreamgetConsoleOut (void)
 Returns the database console output stream. More...
 
ostreamgetConsoleErr (void)
 Returns the database console error stream. More...
 
ostreamgetConsoleLog (void)
 Returns the database console log stream. More...
 
void setConsoleIn (istream &inStream)
 Sets the database console input stream. More...
 
void setConsoleOut (ostream &inStream)
 Sets the database console output stream. More...
 
void setConsoleErr (ostream &inStream)
 Sets the database console error stream. More...
 
void setConsoleLog (ostream &inStream)
 Sets the database console log stream. More...
 
virtual void setConsoleStreams (istream &inIn, ostream &inOut, ostream &inErr, ostream &inLog)
 Sets all of the database console streams. More...
 

Static Public Attributes

static DDBConsoleStreams sDefaultConsoleStreams
 
static DDBConsoleStreams sNullConsoleStreams
 

Protected Attributes

istreammInPtr
 Pointer to the database console input stream. More...
 
ostreammOutPtr
 
ostreammErrPtr
 
ostreammLogPtr
 

Detailed Description

Device database console streams class.

This allows the user to specify alternate streams for cin, cout, and cerr, to redirect console input to or output from the device database.

Definition at line 37 of file DDBConsoleStreams.hpp.

Member Typedef Documentation

Internal typedef of istream;.

Definition at line 41 of file DDBConsoleStreams.hpp.

Internal typedef of ostream;.

Definition at line 43 of file DDBConsoleStreams.hpp.

Constructor & Destructor Documentation

torc::architecture::DDBConsoleStreams::DDBConsoleStreams ( void  )

Null constructor.

Definition at line 32 of file DDBConsoleStreams.cpp.

32  {
33  mInPtr = &std::cin;
34  mOutPtr = &std::cout;
35  mErrPtr = &std::cerr;
36  mLogPtr = &std::clog;
37  }
istream * mInPtr
Pointer to the database console input stream.
torc::architecture::DDBConsoleStreams::DDBConsoleStreams ( istream inIn,
ostream inOut,
ostream inErr,
ostream inLog 
)
inline

Explicit constructor.

Definition at line 51 of file DDBConsoleStreams.hpp.

52  { setConsoleStreams(inIn, inOut, inErr, inLog); }
virtual void setConsoleStreams(istream &inIn, ostream &inOut, ostream &inErr, ostream &inLog)
Sets all of the database console streams.

+ Here is the call graph for this function:

virtual torc::architecture::DDBConsoleStreams::~DDBConsoleStreams ( void  )
inlinevirtual

Virtual destructor.

Definition at line 54 of file DDBConsoleStreams.hpp.

54 {}

Member Function Documentation

ostream& torc::architecture::DDBConsoleStreams::getConsoleErr ( void  )
inline

Returns the database console error stream.

Definition at line 69 of file DDBConsoleStreams.hpp.

69 { return mErr(); }
ostream & mErr(void)
Returns the database console error stream.

+ Here is the call graph for this function:

istream& torc::architecture::DDBConsoleStreams::getConsoleIn ( void  )
inline

Returns the database console input stream.

Definition at line 65 of file DDBConsoleStreams.hpp.

65 { return mIn(); }
istream & mIn(void)
Returns the database console input stream.

+ Here is the call graph for this function:

ostream& torc::architecture::DDBConsoleStreams::getConsoleLog ( void  )
inline

Returns the database console log stream.

Definition at line 71 of file DDBConsoleStreams.hpp.

71 { return mLog(); }
ostream & mLog(void)
Returns the database console log stream.

+ Here is the call graph for this function:

ostream& torc::architecture::DDBConsoleStreams::getConsoleOut ( void  )
inline

Returns the database console output stream.

Definition at line 67 of file DDBConsoleStreams.hpp.

67 { return mOut(); }
ostream & mOut(void)
Returns the database console output stream.

+ Here is the call graph for this function:

ostream& torc::architecture::DDBConsoleStreams::mErr ( void  )
inline

Returns the database console error stream.

Definition at line 61 of file DDBConsoleStreams.hpp.

+ Here is the caller graph for this function:

istream& torc::architecture::DDBConsoleStreams::mIn ( void  )
inline

Returns the database console input stream.

Definition at line 57 of file DDBConsoleStreams.hpp.

57 { return *mInPtr; }
istream * mInPtr
Pointer to the database console input stream.

+ Here is the caller graph for this function:

ostream& torc::architecture::DDBConsoleStreams::mLog ( void  )
inline

Returns the database console log stream.

Definition at line 63 of file DDBConsoleStreams.hpp.

+ Here is the caller graph for this function:

ostream& torc::architecture::DDBConsoleStreams::mOut ( void  )
inline

Returns the database console output stream.

Definition at line 59 of file DDBConsoleStreams.hpp.

+ Here is the caller graph for this function:

void torc::architecture::DDBConsoleStreams::setConsoleErr ( ostream inStream)
inline

Sets the database console error stream.

Definition at line 77 of file DDBConsoleStreams.hpp.

77 { mErrPtr = &inStream; }

+ Here is the caller graph for this function:

void torc::architecture::DDBConsoleStreams::setConsoleIn ( istream inStream)
inline

Sets the database console input stream.

Definition at line 73 of file DDBConsoleStreams.hpp.

73 { mInPtr = &inStream; }
istream * mInPtr
Pointer to the database console input stream.

+ Here is the caller graph for this function:

void torc::architecture::DDBConsoleStreams::setConsoleLog ( ostream inStream)
inline

Sets the database console log stream.

Definition at line 79 of file DDBConsoleStreams.hpp.

79 { mLogPtr = &inStream; }

+ Here is the caller graph for this function:

void torc::architecture::DDBConsoleStreams::setConsoleOut ( ostream inStream)
inline

Sets the database console output stream.

Definition at line 75 of file DDBConsoleStreams.hpp.

75 { mOutPtr = &inStream; }

+ Here is the caller graph for this function:

virtual void torc::architecture::DDBConsoleStreams::setConsoleStreams ( istream inIn,
ostream inOut,
ostream inErr,
ostream inLog 
)
inlinevirtual

Sets all of the database console streams.

Parameters
inInThe console input stream.
inOutThe console output stream.
inErrThe console error stream.
inLogThe console log stream.

Reimplemented in torc::architecture::DDB.

Definition at line 85 of file DDBConsoleStreams.hpp.

86  {
87  setConsoleIn(inIn);
88  setConsoleOut(inOut);
89  setConsoleErr(inErr);
90  setConsoleLog(inLog);
91  }
void setConsoleOut(ostream &inStream)
Sets the database console output stream.
void setConsoleIn(istream &inStream)
Sets the database console input stream.
void setConsoleLog(ostream &inStream)
Sets the database console log stream.
void setConsoleErr(ostream &inStream)
Sets the database console error stream.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ostream* torc::architecture::DDBConsoleStreams::mErrPtr
protected

Definition at line 96 of file DDBConsoleStreams.hpp.

istream* torc::architecture::DDBConsoleStreams::mInPtr
protected

Pointer to the database console input stream.

Definition at line 94 of file DDBConsoleStreams.hpp.

ostream* torc::architecture::DDBConsoleStreams::mLogPtr
protected

Definition at line 97 of file DDBConsoleStreams.hpp.

ostream* torc::architecture::DDBConsoleStreams::mOutPtr
protected

Definition at line 95 of file DDBConsoleStreams.hpp.

DDBConsoleStreams torc::architecture::DDBConsoleStreams::sDefaultConsoleStreams
static

Definition at line 45 of file DDBConsoleStreams.hpp.

DDBConsoleStreams torc::architecture::DDBConsoleStreams::sNullConsoleStreams
static

Definition at line 46 of file DDBConsoleStreams.hpp.


The documentation for this class was generated from the following files: