OpenWalnut
1.4.0
|
Base class for all combiners which apply one connection between two connectors of two modules. More...
#include <WApplyCombiner.h>
Public Member Functions | |
WApplyCombiner (boost::shared_ptr< WModuleContainer > target, WModule::SPtr srcModule, std::string srcConnector, WModule::SPtr targetModule, std::string targetConnector) | |
Creates a combiner which sets up the specified modules and prototype combination. | |
WApplyCombiner (WModule::SPtr srcModule, std::string srcConnector, WModule::SPtr targetModule, std::string targetConnector) | |
Creates a combiner which sets up the specified modules and prototype combination. | |
WApplyCombiner (WModule::SPtr module) | |
Creates a combiner which only adds the given module. | |
virtual | ~WApplyCombiner () |
Destructor. | |
virtual void | apply () |
Apply the internal module structure to the target container. | |
Static Public Member Functions | |
template<typename T > | |
static WCombinerTypes::WOneToOneCombiners | createCombinerList (WModule::SPtr module1, WModule::SPtr module2) |
This method creates a list of possible combiners for connections between the specified modules. |
Base class for all combiners which apply one connection between two connectors of two modules.
Definition at line 46 of file WApplyCombiner.h.
WApplyCombiner::WApplyCombiner | ( | boost::shared_ptr< WModuleContainer > | target, |
WModule::SPtr | srcModule, | ||
std::string | srcConnector, | ||
WModule::SPtr | targetModule, | ||
std::string | targetConnector | ||
) |
Creates a combiner which sets up the specified modules and prototype combination.
Specifying a NULL pointer to the srcModule parameter causes the combiner to only add the target module without any connections. This is especially useful for modules which do not provide any input which must be connected. It is possible to specify prototypes here. The will get created upon apply.
target | the target container |
srcModule | the module whose output should be connected with the prototypes input |
srcConnector | the output connector of the module |
targetModule | the module/prototype to use for connecting the module with |
targetConnector | the input connector of the prototype to connect with srcConnector. |
Definition at line 31 of file WApplyCombiner.cpp.
WApplyCombiner::WApplyCombiner | ( | WModule::SPtr | srcModule, |
std::string | srcConnector, | ||
WModule::SPtr | targetModule, | ||
std::string | targetConnector | ||
) |
Creates a combiner which sets up the specified modules and prototype combination.
This constructor automatically uses the kernel's root container as target container. Specifying a NULL pointer to the srcModule parameter causes the combiner to only add the target module without any connections. This is especially useful for modules which do not provide any input which must be connected. It is possible to specify prototypes here. The will get created upon apply.
srcModule | the module whose output should be connected with the prototypes input |
srcConnector | the output connector of the module |
targetModule | the module/prototype to use for connecting the module with |
targetConnector | the input connector of the prototype to connect with srcConnector. |
Definition at line 38 of file WApplyCombiner.cpp.
WApplyCombiner::WApplyCombiner | ( | WModule::SPtr | module | ) | [explicit] |
Creates a combiner which only adds the given module.
This constructor automatically uses the kernel's root container as target container. Specifying a NULL pointer to the srcModule parameter causes the combiner to only add the target module without any connections. This is especially useful for modules which do not provide any input which must be connected. It is possible to specify prototypes here. The will get created upon apply.
module | the module to add |
Definition at line 44 of file WApplyCombiner.cpp.
WApplyCombiner::~WApplyCombiner | ( | ) | [virtual] |
Destructor.
Definition at line 49 of file WApplyCombiner.cpp.
void WApplyCombiner::apply | ( | ) | [virtual] |
Apply the internal module structure to the target container.
Be aware, that this operation might take some time, as modules can be connected only if they are "ready", which, at least with WMData modules, might take some time. It applies the loaded project file.
Implements WModuleOneToOneCombiner.
Definition at line 54 of file WApplyCombiner.cpp.
References wlog::error(), WModuleFactory::getModuleFactory(), WModuleFactory::isPrototype(), WModuleCombiner::m_container, WModuleOneToOneCombiner::m_srcConnector, WModuleOneToOneCombiner::m_srcModule, WModuleOneToOneCombiner::m_targetConnector, and WModuleOneToOneCombiner::m_targetModule.
static WCombinerTypes::WOneToOneCombiners WApplyCombiner::createCombinerList | ( | WModule::SPtr | module1, |
WModule::SPtr | module2 | ||
) | [inline, static] |
This method creates a list of possible combiners for connections between the specified modules.
Both modules can be prototypes. This method lists only connections from module1's outputs to module2's inputs.
module1 | the first module |
module2 | the second module |
Definition at line 110 of file WApplyCombiner.h.