OpenWalnut
1.4.0
|
Base class for all combiners which apply one connection between two connectors of two modules. More...
#include <WModuleOneToOneCombiner.h>
Public Member Functions | |
WModuleOneToOneCombiner (boost::shared_ptr< WModuleContainer > target, boost::shared_ptr< WModule > srcModule, std::string srcConnector, boost::shared_ptr< WModule > targetModule, std::string targetConnector) | |
Creates a combiner which sets up the specified modules and prototype combination. | |
WModuleOneToOneCombiner (boost::shared_ptr< WModule > srcModule, std::string srcConnector, boost::shared_ptr< WModule > targetModule, std::string targetConnector) | |
Creates a combiner which sets up the specified modules and prototype combination. | |
virtual | ~WModuleOneToOneCombiner () |
Destructor. | |
virtual void | apply ()=0 |
Apply the internal module structure to the target container. | |
boost::shared_ptr< WModule > | getSrcModule () const |
Gets the source module. | |
std::string | getSrcConnector () const |
The output connector of m_srcModule to connect with m_targetConnector. | |
boost::shared_ptr< WModule > | getTargetModule () const |
The module/prototype to connect with m_srcModule. | |
std::string | getTargetConnector () const |
The input connector the target module to connect with m_srcConnector. | |
Protected Attributes | |
boost::shared_ptr< WModule > | m_srcModule |
The source module to connect with the target. | |
std::string | m_srcConnector |
The output connector of m_srcModule to connect with m_targetConnector. | |
boost::shared_ptr< WModule > | m_targetModule |
The module/prototype to connect with m_srcMdodule. | |
std::string | m_targetConnector |
The input connector the target module to connect with m_srcConnector. |
Base class for all combiners which apply one connection between two connectors of two modules.
Definition at line 41 of file WModuleOneToOneCombiner.h.
WModuleOneToOneCombiner::WModuleOneToOneCombiner | ( | boost::shared_ptr< WModuleContainer > | target, |
boost::shared_ptr< WModule > | srcModule, | ||
std::string | srcConnector, | ||
boost::shared_ptr< WModule > | 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 29 of file WModuleOneToOneCombiner.cpp.
WModuleOneToOneCombiner::WModuleOneToOneCombiner | ( | boost::shared_ptr< WModule > | srcModule, |
std::string | srcConnector, | ||
boost::shared_ptr< WModule > | 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 40 of file WModuleOneToOneCombiner.cpp.
WModuleOneToOneCombiner::~WModuleOneToOneCombiner | ( | ) | [virtual] |
Destructor.
Definition at line 50 of file WModuleOneToOneCombiner.cpp.
virtual void WModuleOneToOneCombiner::apply | ( | ) | [pure 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 WModuleCombiner.
Implemented in WApplyCombiner, and WDisconnectCombiner.
std::string WModuleOneToOneCombiner::getSrcConnector | ( | ) | const |
The output connector of m_srcModule to connect with m_targetConnector.
Definition at line 60 of file WModuleOneToOneCombiner.cpp.
References m_srcConnector.
boost::shared_ptr< WModule > WModuleOneToOneCombiner::getSrcModule | ( | ) | const |
Gets the source module.
This module's output connector is connected with the target.
Definition at line 55 of file WModuleOneToOneCombiner.cpp.
References m_srcModule.
std::string WModuleOneToOneCombiner::getTargetConnector | ( | ) | const |
The input connector the target module to connect with m_srcConnector.
Definition at line 70 of file WModuleOneToOneCombiner.cpp.
References m_targetConnector.
boost::shared_ptr< WModule > WModuleOneToOneCombiner::getTargetModule | ( | ) | const |
The module/prototype to connect with m_srcModule.
Definition at line 65 of file WModuleOneToOneCombiner.cpp.
References m_targetModule.
std::string WModuleOneToOneCombiner::m_srcConnector [protected] |
The output connector of m_srcModule to connect with m_targetConnector.
Definition at line 122 of file WModuleOneToOneCombiner.h.
Referenced by WDisconnectCombiner::apply(), WApplyCombiner::apply(), and getSrcConnector().
boost::shared_ptr< WModule > WModuleOneToOneCombiner::m_srcModule [protected] |
The source module to connect with the target.
Definition at line 117 of file WModuleOneToOneCombiner.h.
Referenced by WDisconnectCombiner::apply(), WApplyCombiner::apply(), and getSrcModule().
std::string WModuleOneToOneCombiner::m_targetConnector [protected] |
The input connector the target module to connect with m_srcConnector.
Definition at line 132 of file WModuleOneToOneCombiner.h.
Referenced by WDisconnectCombiner::apply(), WApplyCombiner::apply(), and getTargetConnector().
boost::shared_ptr< WModule > WModuleOneToOneCombiner::m_targetModule [protected] |
The module/prototype to connect with m_srcMdodule.
Definition at line 127 of file WModuleOneToOneCombiner.h.
Referenced by WDisconnectCombiner::apply(), WApplyCombiner::apply(), and getTargetModule().