Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
logging
CategoryStream.cpp
Go to the documentation of this file.
1
#include "
CategoryStream.hpp
"
2
#include "
Category.hpp
"
3
4
namespace
OCL
{
5
namespace
logging {
6
7
CategoryStream::CategoryStream
(
Category
* rt_category,
log4cpp::Priority::Value
priority) :
8
_category(rt_category),
9
_priority(priority)
10
{
11
12
}
13
14
CategoryStream::~CategoryStream
()
15
{
16
flush
();
17
}
18
19
void
CategoryStream::flush
()
20
{
21
_category
->
log
(
_priority
,
oss
.str());
22
oss
.flush();
23
}
24
25
CategoryStream
&
eol
(
CategoryStream
& os)
26
{
27
os.
flush
();
28
29
return
os;
30
}
31
32
CategoryStream::CategoryStream
(
const
CategoryStream
& rhs) :
33
_category
(rhs.
_category
),
34
_priority
(rhs.
_priority
)
35
{
36
// Must copy the underlying buffer but not the output stream
37
(*this).oss.str(rhs.
oss
.str());
38
}
39
40
}
// namespace logging
41
}
// namespace OCL
42
OCL::logging::Category::log
virtual void log(log4cpp::Priority::Value priority, const RTT::rt_string &message)
Definition:
Category.cpp:24
OCL::logging::CategoryStream::_priority
log4cpp::Priority::Value _priority
Definition:
CategoryStream.hpp:67
OCL::logging::CategoryStream::~CategoryStream
virtual ~CategoryStream()
Definition:
CategoryStream.cpp:14
OCL::logging::CategoryStream::CategoryStream
CategoryStream(Category *rt_category, log4cpp::Priority::Value priority)
Definition:
CategoryStream.cpp:7
CategoryStream.hpp
OCL::logging::CategoryStream::oss
RTT::rt_ostringstream oss
Definition:
CategoryStream.hpp:68
OCL::logging::CategoryStream
Definition:
CategoryStream.hpp:19
OCL::logging::CategoryStream::_category
Category * _category
Definition:
CategoryStream.hpp:66
OCL::logging::CategoryStream::flush
void flush()
Definition:
CategoryStream.cpp:19
OCL
Definition:
deployer-funcs.cpp:68
log4cpp::Priority::Value
int Value
OCL::logging::eol
CategoryStream & eol(CategoryStream &os)
Definition:
CategoryStream.cpp:25
OCL::logging::Category
Definition:
Category.hpp:25
Category.hpp
ocl
Author(s): OCL Development Team
autogenerated on Mon Mar 23 2020 04:47:19