27 #include "../WModuleFactory.h"
29 #include "WApplyCombiner.h"
57 boost::shared_ptr< WModule > srcModule =
m_srcModule;
81 srcModule->isReadyOrCrashed().wait();
82 if( srcModule->isCrashed()() )
85 wlog::error(
"Prototype Combiner" ) <<
"The source module \"" << srcModule->getName() <<
"\" has crashed. Abort.";
93 targetModule->isReadyOrCrashed().wait();
94 if( targetModule->isCrashed()() )
97 wlog::error(
"Prototype Combiner" ) <<
"The target module \"" << targetModule->getName() <<
"\" has crashed. Abort.";
109 if( srcModule && targetModule )
WStreamedLogger error(const std::string &source)
Logging an error message.
Class representing a single module of OpenWalnut.
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. ...
boost::shared_ptr< WModule > m_targetModule
The module/prototype to connect with m_srcMdodule.
static bool isPrototype(boost::shared_ptr< WModule > module)
Checks whether the specified module is a prototype or an instantiated module.
std::string m_targetConnector
The input connector the target module to connect with m_srcConnector.
std::string m_srcConnector
The output connector of m_srcModule to connect with m_targetConnector.
boost::shared_ptr< WModule > m_srcModule
The source module to connect with the target.
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< WModuleContainer > m_container
The module container to use for the modules.
boost::shared_ptr< WModule > SPtr
Shared pointer to a WModule.
static SPtr getModuleFactory()
Returns instance of the module factory to use to create modules.
virtual ~WApplyCombiner()
Destructor.