CategoryStream.hpp
Go to the documentation of this file.
1 #ifndef CATEGORY_STREAM_HPP
2 #define CATEGORY_STREAM_HPP 1
3 
4 #include <ocl/OCL.hpp>
5 #include <log4cpp/Priority.hh>
6 #include <rtt/rt_string.hpp>
7 
8 namespace OCL {
9 namespace logging {
10 
11 class OCL_API Category;
12 
19 class OCL_API CategoryStream
20 {
21 public:
22 
29  CategoryStream(Category* rt_category, log4cpp::Priority::Value priority);
30 
36  CategoryStream(const CategoryStream & rhs);
37 
42  virtual ~CategoryStream();
43 
48  void flush();
49 
55  template<typename T> CategoryStream& operator<<(const T& t)
56  {
57  if (_priority != log4cpp::Priority::NOTSET)
58  {
59  (oss) << t;
60  }
61  return *this;
62  }
63 
64 private:
65 
69 
70 };
71 
72 
73 } // namespace logging
74 } // namespace OCL
75 
76 #endif // CATEGORY_STREAM_HPP
log4cpp::Priority::Value _priority
std::basic_ostringstream< char, std::char_traits< char >, RTT::os::rt_allocator< char > > rt_ostringstream
RTT::rt_ostringstream oss
CategoryStream & operator<<(const T &t)


ocl
Author(s): OCL Development Team
autogenerated on Mon Mar 23 2020 04:47:19