WARPXM v1.10.0
Loading...
Searching...
No Matches
wxlogstream.h
Go to the documentation of this file.
1#ifndef wxlogstream_h
2#define wxlogstream_h
3
4// WarpX lib includes
5#include "wxlogstreamstrm.h"
6
7// std includes
8#include <sstream>
9#include <iostream>
10
19{
20public:
24 WxLogStream(WxLogger* log, int level);
25
30
35
42 template<typename T> WxLogStream& operator<<(T val)
43 {
44 strm->operator<<(val);
45 return *this;
46 }
47
54 WxLogStream& operator<<(std::ostream& (*p)(std::ostream&) )
55 {
56 strm->operator<<(p);
57 return *this;
58 }
59
66 WxLogStream& operator<<(std::ios& (*p)(std::ios&) )
67 {
68 strm->operator<<(p);
69 return *this;
70 }
71
72private:
76 mutable int* useCount;
80 WxLogStreamStrm* strm;
81};
82
84#endif // wxlogstream_h
Provides interface to streaming iostreams to logs.
Definition: wxlogstream.h:19
~WxLogStream()
Delete stream.
WxLogStream(WxLogger *log, int level)
Create new stream object.
WxLogStream & operator<<(T val)
Output supplied value.
Definition: wxlogstream.h:42
WxLogStream & operator<<(std::ios &(*p)(std::ios &))
I/O for manipulators.
Definition: wxlogstream.h:66
WxLogStream & operator<<(std::ostream &(*p)(std::ostream &))
I/O for manipulators.
Definition: wxlogstream.h:54
WxLogStream(const WxLogStream &ls)
Copy ctor.
Works with WxLogStream for providing streaming to logs.
Definition: wxlogstreamstrm.h:22
Definition: wxlogger.h:109