BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
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
11#include <ostream>
12#include <sstream>
13
14#include "ers/Stream.h"
15
16namespace ers {
17
18/** This class streams an issue into an human readable string.
19 * It is uses by the issue class to display itself.
20 * This stream can be specified for other uses, but the user is then responsible
21 * for reading data from the stream and clearing it.
22 * \author Matthias Wiesmann
23 * \version 1.0
24 * \brief Single line, human readable format stream.
25 */
26
27class HumanStream : public Stream {
28protected:
29 std::ostringstream m_out_stream ;
30public:
31 static std::string to_string(const Issue *issue) throw() ;
32 static const char* const KEY ;
33 HumanStream() ;
34 HumanStream(const HumanStream &other);
35 ~HumanStream() ;
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
44
Single line, human readable format stream.
Definition: HumanStream.h:27
virtual void send(const Issue *ptr)
Sends an issue into the stream.
Definition: HumanStream.cxx:69
std::string to_string()
Definition: HumanStream.cxx:54
static const char *const KEY
Definition: HumanStream.h:32
std::ostringstream m_out_stream
Definition: HumanStream.h:29
virtual void print_to(std::ostream &stream) const
Definition: HumanStream.cxx:65
Root Issue class.
Root/Null issue stream.
Definition: Stream.h:35