Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
...
Code Block | ||||
---|---|---|---|---|
| ||||
class MockContainerServices : public maci::ContainerServices {
public:
MockContainerServices(ACE_CString& componentName, PortableServer::POA_ptr poa);
~MockContainerServices();
virtual CORBA::Object* getCORBAComponent(const char* name);
//... Other methods omitted for simplicity
template<class TAdvancedObject> void activateComponent(const char* name) {
TAdvancedObject* obj = new TAdvancedObject(name, this);
obj->initialize();
obj->execute();
this->comps[name] = obj
};
virtual deactivateComponent(const char* name) {
acscomponent::ACSComponentImpl* obj = dynamic_cast<acscomponent::ACSComponentImpl*>(this->comps[name]);
try {
obj->cleanUp();
} catch (...) {
obj->aboutToAbort();
}
this->comps.erase(name);
}
protected:
std::map<std::string, CORBA::Object_var> comps;
}; |
...