Last change
on this file since 10379 was 10373, checked in by tbretz, 14 years ago |
Changed basis of MessageImp::Write function from const char* to std::string& to be able to boost::bind the function, because boost::bind will hold an internal copy of the string.
|
File size:
849 bytes
|
Line | |
---|
1 | #ifndef FACT_MessageDim
|
---|
2 | #define FACT_MessageDim
|
---|
3 |
|
---|
4 | #include "MessageImp.h"
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 | #include <dis.hxx> // DimService
|
---|
9 |
|
---|
10 | class MessageDimTX : public DimService, public MessageImp
|
---|
11 | {
|
---|
12 | private:
|
---|
13 | bool fDebug;
|
---|
14 |
|
---|
15 | public:
|
---|
16 | MessageDimTX(const std::string &name, std::ostream &out=std::cout);
|
---|
17 | ~MessageDimTX();
|
---|
18 |
|
---|
19 | int Write(const Time &t, const std::string &txt, int qos=kInfo);
|
---|
20 |
|
---|
21 | void SetDebug(bool b=true) { fDebug=b; }
|
---|
22 | };
|
---|
23 |
|
---|
24 |
|
---|
25 |
|
---|
26 | #include <dic.hxx> // DimStampedInfo
|
---|
27 |
|
---|
28 | class MessageDimRX : public DimInfoHandler
|
---|
29 | {
|
---|
30 | protected:
|
---|
31 | MessageImp &fMsg;
|
---|
32 |
|
---|
33 | private:
|
---|
34 | DimStampedInfo fDimMessage;
|
---|
35 |
|
---|
36 | int fMinLogLevel;
|
---|
37 | bool fConnected;
|
---|
38 |
|
---|
39 | protected:
|
---|
40 | void infoHandler();
|
---|
41 |
|
---|
42 | public:
|
---|
43 | MessageDimRX(const std::string &name, MessageImp &imp);
|
---|
44 |
|
---|
45 | void SetMinLogLevel(int min=0) { fMinLogLevel=min; }
|
---|
46 | bool IsConnected() const { return fConnected; }
|
---|
47 | };
|
---|
48 |
|
---|
49 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.