Engauge Digitizer  2
CategoryStream.hh
Go to the documentation of this file.
1 #ifndef CATEGORY_STREAM_HH
2 #define CATEGORY_STREAM_HH
3 
4 #include <ios>
5 #include "log4cpp/Priority.hh"
6 
7 namespace log4cpp {
8 
9  class Category;
10  class CategoryStream;
11 
12  CategoryStream &eol (CategoryStream &os);
13 
16  {
17  public:
19  CategoryStream(Category &category,
20  Priority::Value priority);
21 
22  virtual ~CategoryStream();
23 
25  inline Category &getCategory() const { return m_category; }
26 
28  inline Priority::Value getPriority () const throw() {
29  return m_priority;
30  }
31 
33  void flush ();
34 
36  template<typename T>
38  return *this;
39  }
40 
42  CategoryStream &operator<<(const char*) {
43  return *this;
44  }
45 
47  CategoryStream &operator<<(const std::string &) {
48  return *this;
49  }
50 
52  std::streamsize width(std::streamsize wide);
53 
54  private:
55 
56  Category &m_category;
57  Priority::Value m_priority;
58  };
59 }
60 
61 #endif // CATEGORY_STREAM_HH
Noop class that mimics class of the same name in log4cpp library.
Definition: Category.hh:14
Priority::Value getPriority() const
Return useless value.
CategoryStream & eol(CategoryStream &os)
CategoryStream(Category &category, Priority::Value priority)
Single constructor.
Streaming of simple types and objects to a category.
int Value
Priority level.
Definition: Priority.hh:24
CategoryStream & operator<<(const std::string &)
Noop insertion method for string.
std::streamsize width(std::streamsize wide)
Noop method to get width.
CategoryStream & operator<<(const T &)
Stream of arbitrary types and objects.
Category & getCategory() const
Return useless value.
CategoryStream & operator<<(const char *)
Noop insertion method for character.