ldas-tools-al 2.6.4
|
Class to handle streaming of messages. More...
#include <Log.hh>
Public Types | |
typedef boost::shared_ptr< StreamCBInterface > | callback_type |
Public Member Functions | |
StreamInterface () | |
Constructor. More... | |
virtual | ~StreamInterface () |
Destructor. More... | |
void | Callback (callback_type Callback) |
Establish callback. More... | |
virtual void | Close ()=0 |
How to close the stream. More... | |
virtual bool | IsOpen () const =0 |
Resturn the open state of the stream. More... | |
virtual void | Open ()=0 |
How to open the stream. More... | |
virtual void | WriteMessage (const std::string &Message)=0 |
How to open the stream. More... | |
template<typename T > | |
std::ostream & | operator<< (T a) |
Output to the stream. More... | |
Protected Member Functions | |
void | onClose () |
Destructor. More... | |
void | onOpen () |
Destructor. More... | |
virtual std::ostream & | stream ()=0 |
Gain access to the stream. More... | |
Private Attributes | |
callback_type | callback |
Callback storage. More... | |
Class to handle streaming of messages.
This is an pure abstract class which describes the interface that needs to be created by derived classes.
typedef boost::shared_ptr< StreamCBInterface > LDASTools::AL::Log::StreamInterface::callback_type |
LDASTools::AL::Log::StreamInterface::StreamInterface | ( | ) |
Constructor.
|
virtual |
Destructor.
|
inline |
Establish callback.
|
pure virtual |
How to close the stream.
Implemented in LDASTools::AL::Log::StreamStdErr, and LDASTools::AL::Log::StreamFile.
|
pure virtual |
Resturn the open state of the stream.
Implemented in LDASTools::AL::Log::StreamStdErr, and LDASTools::AL::Log::StreamFile.
|
protected |
Destructor.
|
protected |
Destructor.
|
pure virtual |
How to open the stream.
Implemented in LDASTools::AL::Log::StreamStdErr, and LDASTools::AL::Log::StreamFile.
|
inline |
Output to the stream.
|
protectedpure virtual |
Gain access to the stream.
Implemented in LDASTools::AL::Log::StreamStdErr, and LDASTools::AL::Log::StreamFile.
|
pure virtual |
How to open the stream.
[in] | Message | The message to send to the output stream. |
Implemented in LDASTools::AL::Log::StreamStdErr, and LDASTools::AL::Log::StreamFile.
|
private |
Callback storage.
If this is set, then this instance is called to handle additional actions that should happen when the stream is opened or closed.