Page History
...
Calling a Module from C++
It is possible to call modules directly from In some cases it might be needed to start module instances directly from code and pass results back to C++. In this case you can do the following:
Code Block | ||||
---|---|---|---|---|
| ||||
void CMyClass::MyModuleCallback(bool bSuccess, const TModuleParams& outputParams) { // do something with the output parameters } void CMyClass::CallMyModule() { IFlowGraphModuleManager* pModuleManager = gEnv->pFlowSystem->GetIModuleManager(); if (const IFlowGraphModule* pModule = pModuleManager->GetModule(“MyModule”)) { TModuleParams inputParams; //… add input parameters (has to match the inputs in the module) pModuleManager->CreateModuleInstance(pModule->GetId(), inputParams, functor(*this, &CMyClass::MyModuleCallback)); } } |
...
Overview
Content Tools