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