Jpp
pmt_effective_area_update
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JLogger
JStreamLogger.hh
Go to the documentation of this file.
1
#ifndef __JLOGGER__JSTREAMLOGGER__
2
#define __JLOGGER__JSTREAMLOGGER__
3
4
#include <ostream>
5
6
#include "
JLogger/JLogger.hh
"
7
8
9
/**
10
* \author mdejong
11
*/
12
13
namespace
JLOGGER {}
14
namespace
JPP {
using namespace
JLOGGER; }
15
16
namespace
JLOGGER {
17
18
/**
19
* Message logging based on std::ostream.
20
* This class implements the JLogger interface.
21
*/
22
class
JStreamLogger
:
23
public
JLogger
24
{
25
public
:
26
/**
27
* Constructor.
28
*
29
* \param __out output stream
30
*/
31
JStreamLogger
(std::ostream& __out) :
32
out
(__out)
33
{}
34
35
36
/**
37
* Report message
38
*
39
* \param tag tag
40
* \param message message
41
*/
42
virtual
void
typeout
(
const
std::string& tag,
43
const
std::string& message)
override
44
{
45
out
<< tag <<
' '
<< message << std::endl;
46
}
47
48
protected
:
49
std::ostream&
out
;
50
};
51
}
52
53
#endif
JLOGGER::JStreamLogger
Message logging based on std::ostream.
Definition:
JStreamLogger.hh:22
JLOGGER::JStreamLogger::typeout
virtual void typeout(const std::string &tag, const std::string &message) override
Report message.
Definition:
JStreamLogger.hh:42
JLOGGER::JLogger
Interface for logging messages.
Definition:
JLogger.hh:22
JLogger.hh
JLOGGER::JStreamLogger::out
std::ostream & out
Definition:
JStreamLogger.hh:49
JLOGGER::JStreamLogger::JStreamLogger
JStreamLogger(std::ostream &__out)
Constructor.
Definition:
JStreamLogger.hh:31
Generated by
1.8.5