OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
optimizer
Util
Trace
CoutSink.h
Go to the documentation of this file.
1
#ifndef __TRACE_COUT_SINK_H__
2
#define __TRACE_COUT_SINK_H__
3
4
#include <iostream>
5
#include <string>
6
7
#include "
Util/Trace/TraceComponent.h
"
8
9
class
CoutSink
:
public
TraceComponent
{
10
11
public
:
12
13
14
CoutSink
(std::string prefix =
""
)
15
:
TraceComponent
(
"CoutSink"
)
16
,
prefix_
(prefix) {
17
18
clear_color_
=
"\e[0m"
;
19
}
20
21
~CoutSink
()
22
{}
23
24
25
void
setColor
(std::string color) {
color_
= color; }
26
void
setClearColor
(std::string color) {
clear_color_
= color; }
27
28
29
void
execute
(std::ostringstream &dump) {
30
std::cout <<
color_
<<
prefix_
31
<< dump.str()
32
<<
clear_color_
<< std::flush;
33
}
34
35
private
:
36
37
std::string
prefix_
;
38
std::string
color_
;
39
std::string
clear_color_
;
40
41
};
42
43
#endif
CoutSink::prefix_
std::string prefix_
Definition:
CoutSink.h:37
CoutSink::execute
void execute(std::ostringstream &dump)
Definition:
CoutSink.h:29
TraceComponent
Definition:
TraceComponent.h:7
TraceComponent.h
CoutSink
Definition:
CoutSink.h:9
CoutSink::setClearColor
void setClearColor(std::string color)
Definition:
CoutSink.h:26
CoutSink::setColor
void setColor(std::string color)
Definition:
CoutSink.h:25
CoutSink::~CoutSink
~CoutSink()
Definition:
CoutSink.h:21
CoutSink::CoutSink
CoutSink(std::string prefix="")
Definition:
CoutSink.h:14
CoutSink::clear_color_
std::string clear_color_
Definition:
CoutSink.h:39
CoutSink::color_
std::string color_
Definition:
CoutSink.h:38
Generated on Sat Jan 4 2020 14:47:42 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5