-
Notifications
You must be signed in to change notification settings - Fork 9
/
cxchannel_none.h
59 lines (36 loc) · 1.36 KB
/
cxchannel_none.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef CXCHANNEL_NONE_H
#define CXCHANNEL_NONE_H
#include "cxchannel.h"
class GM_CCXX_CORE_API CxChannelNone : public CxChannelBase
{
public:
CxChannelNone();
~CxChannelNone();
inline const std::string& typeSimpleName() const { return CS_TypeSimpleName_None; }
inline int typeSimpleId() const { return CxInterinfo::Type_IO_None; }
void toContext(CxISetSkv& context) const ;
void fromContext(const CxIGetSkv& context);
protected:
///----------Abstruct Realization --- begin ---
bool getConnectedImpl() const{return false;}
void openChannelImpl(){}
void closeChannelImpl(){}
int writeDataImpl(const char* pData, int iLength, void * oTarget){return 0;}
void processError( int iError , const std::string& sError , int iTag ){}
bool isSameChannelImpl(const std::map<std::string, std::string> ¶ms) const {return false;}
void toReport(std::vector<std::string>& sReports)const{}
void toDescribe( CxDescribeUnit & describeUnit) const{}
///----------Abstruct Realization --- end ---
};
class GM_CCXX_CORE_API CxChannelNoneFactory : public CxChannelFactoryBase
{
// GM_SINGLETON_DECLARATION( CxChannelNoneFactory )
public:
std::string factoryName() {
return CS_TypeSimpleName_None;
}
CxChannelBase* createObject() {
return new CxChannelNone;
}
};
#endif // CXCHANNEL_NONE_H