BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/ers/include/ers/HumanStream.h
Go to the documentation of this file.
1/*
2 * HumanStream.h
3 * ers
4 *
5 * Created by Matthias Wiesmann on 01.11.04.
6 * Copyright 2004 CERN. All rights reserved.
7 *
8 */
9
10#include <ostream>
11#include <sstream>
12
13#include "ers/Stream.h"
14
15namespace ers {
16
17 /** This class streams an issue into an human readable string.
18 * It is uses by the issue class to display itself.
19 * This stream can be specified for other uses, but the user is then responsible
20 * for reading data from the stream and clearing it.
21 * \author Matthias Wiesmann
22 * \version 1.0
23 * \brief Single line, human readable format stream.
24 */
25
26 class HumanStream : public Stream {
27 protected:
28 std::ostringstream m_out_stream;
29
30 public:
31 static std::string to_string( const Issue* issue ) throw();
32 static const char* const KEY;
34 HumanStream( const HumanStream& other );
36 std::string to_string();
37 void clear();
38 virtual void send( const Issue* ptr );
39 virtual void print_to( std::ostream& stream ) const;
40
41 }; // human_stream
42
43} // namespace ers
virtual void send(const Issue *ptr)
Sends an issue into the stream.
std::string to_string()
virtual void print_to(std::ostream &stream) const