25 #ifndef WAPPLYCOMBINER_H
26 #define WAPPLYCOMBINER_H
33 #include <boost/shared_ptr.hpp>
35 #include "../WModule.h"
36 #include "../WModuleCombinerTypes.h"
37 #include "WModuleOneToOneCombiner.h"
39 #include "../WModuleInputConnector.h"
40 #include "../WModuleOutputConnector.h"
109 template <
typename T >
113 WCombinerTypes::WOneToOneCombiners lComp;
122 if( ( pcons.size() == 0 ) || ( cons.size() == 0 ) )
128 for( WModule::OutputConnectorList::const_iterator outIter = cons.begin(); outIter != cons.end(); ++outIter )
131 for( WModule::InputConnectorList::const_iterator inIter = pcons.begin(); inIter != pcons.end(); ++inIter )
134 if( ( *outIter )->connectable( *inIter ) && ( *inIter )->connectable( *outIter ) )
137 lComp.push_back( boost::shared_ptr< WApplyCombiner >(
138 new T( module1, ( *outIter )->getName(), module2, ( *inIter )->getName() ) )
153 #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...