The constructor have to be a C++ [class] with superclass [MqContextC] …
The constructor have to be a C++ [class] with superclass [MqContextC] …
- The factory is implemented as a template with ccmqmsgque::MqFactoryCT<class>.
- The class have to be a sub-class of ccmqmsgque::MqContextC.
- The class have to provide a factory-constructor like Filter6::Filter6.
- The factory-constructor is required in the ccmqmsgque::MqFactoryCT::ObjectSelfCreate
new
function.
- example: use class
MyServer
with public name "MyServer"
as a factory-class
private:
private:
void MyFirstService () {
SendSTART();
SendRETURN();
}
void ServerSetup() {
ServiceCreate("HLWO", MqServiceICB(&MyServer::MyFirstService));
}
};
MqMsgque::CcMqSetup();
try {
srv->LinkCreate(largs);
srv->ProcessEvent (MQ_WAIT_FOREVER);
} catch (const std::exception& e) {
srv->ErrorCatch(e);
}
return srv->Exit();
}