ers::Stream Class Reference

Root/Null issue stream. More...

#include <Stream.h>

Inheritance diagram for ers::Stream:

ers::DefaultStream ers::FIFOStream ers::FilterStream ers::HumanStream List of all members.

Public Member Functions

 Stream ()
 Stream (const Stream &other)
 operator std::string () const
virtual ~Stream ()
virtual void send (const Issue *i)
 Sends an issue into the stream.
virtual Issuereceive ()
 Receives an issue from the stream.
virtual void print_to (std::ostream &stream) const

Static Public Attributes

static const char *const NULL_STREAM_KEY = "null"

Friends

class Issue

Detailed Description

Root/Null issue stream.

Root issue stream. An ERS stream is a mean to send and receive issues. The two core method to do so are send and receive. Certain subclasses of stream might implement only sending, or only receiving. The root stream class implements a null stream, i.e a stream where no issue can be read from and silently discards sent issues.

Author:
Matthias Wiesmann
Version:
1.0

Definition at line 35 of file Stream.h.


Constructor & Destructor Documentation

ers::Stream::Stream (  ) 

Definition at line 31 of file Stream.cxx.

00031 {}

ers::Stream::Stream ( const Stream other  ) 

Definition at line 32 of file Stream.cxx.

00032 {} 

ers::Stream::~Stream (  )  [virtual]

Definition at line 33 of file Stream.cxx.

00033 {}


Member Function Documentation

ers::Stream::operator std::string (  )  const

Definition at line 35 of file Stream.cxx.

References print_to().

00035                                     {
00036     std::ostringstream stream ; 
00037     print_to(stream); 
00038     return stream.str(); 
00039 } // to string 

void ers::Stream::print_to ( std::ostream stream  )  const [virtual]

Reimplemented in ers::FIFOStream, ers::FilterStream, and ers::HumanStream.

Definition at line 59 of file Stream.cxx.

References NULL_STREAM_KEY.

Referenced by operator std::string().

00059                                                  {
00060     stream << NULL_STREAM_KEY << ':' ; 
00061 } // print_to

ers::Issue * ers::Stream::receive (  )  [virtual]

Receives an issue from the stream.

Reads an isssue on the stream

Returns:
the issue that has been read
Note:
This implementation always returns a null pointer

Reimplemented in ers::FIFOStream.

Definition at line 55 of file Stream.cxx.

00055                              {
00056     return 0 ; 
00057 } // receive

void ers::Stream::send ( const Issue i  )  [virtual]

Sends an issue into the stream.

Sends the issue to the stream.

Parameters:
i the issue to send
Note:
This implementation silently discards the Issue

Reimplemented in ers::DefaultStream, ers::FIFOStream, ers::FilterStream, and ers::HumanStream.

Definition at line 46 of file Stream.cxx.

References genRecEmupikp::i.

Referenced by ers::StreamFactory::dispatch(), and ers::FilterStream::send().

00046                                    {
00047     (void) i ; 
00048 } // send 


Friends And Related Function Documentation

friend class Issue [friend]

Definition at line 36 of file Stream.h.


Member Data Documentation

const char *const ers::Stream::NULL_STREAM_KEY = "null" [static]

Key for discard stream

Definition at line 39 of file Stream.h.

Referenced by create_stream(), and print_to().


Generated on Tue Nov 29 23:36:32 2016 for BOSS_7.0.2 by  doxygen 1.4.7