25 #ifndef WAPPLYCOMBINER_H
26 #define WAPPLYCOMBINER_H
35 #include "../WModule.h"
36 #include "../WModuleCombinerTypes.h"
37 #include "../WModuleInputConnector.h"
38 #include "../WModuleOutputConnector.h"
39 #include "WModuleOneToOneCombiner.h"
108 template <
typename T >
112 WCombinerTypes::WOneToOneCombiners lComp;
121 if( ( pcons.size() == 0 ) || ( cons.size() == 0 ) )
127 for( WModule::OutputConnectorList::const_iterator outIter = cons.begin(); outIter != cons.end(); ++outIter )
130 for( WModule::InputConnectorList::const_iterator inIter = pcons.begin(); inIter != pcons.end(); ++inIter )
133 if( ( *outIter )->connectable( *inIter ) && ( *inIter )->connectable( *outIter ) )
136 lComp.push_back( std::shared_ptr< WApplyCombiner >(
137 new T( module1, ( *outIter )->getName(), module2, ( *inIter )->getName() ) )
Base class for all combiners which apply one connection between two connectors of two modules.
virtual void apply()
Apply the internal module structure to the target container.
WApplyCombiner(std::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.
static WCombinerTypes::WOneToOneCombiners createCombinerList(WModule::SPtr module1, WModule::SPtr module2)
This method creates a list of possible combiners for connections between the specified modules.
virtual ~WApplyCombiner()
Destructor.
Base class for all combiners which apply one connection between two connectors of two modules.
std::shared_ptr< WModule > SPtr
Shared pointer to a WModule.
std::vector< std::shared_ptr< WModuleOutputConnector > > OutputConnectorList
The type for the list of output connectors.
std::vector< std::shared_ptr< WModuleInputConnector > > InputConnectorList
The type for the list of input connectors.