28 #include "../WModuleFactory.h"
29 #include "WApplyCombiner.h"
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 )
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.
virtual ~WApplyCombiner()
Destructor.
std::shared_ptr< WModuleContainer > m_container
The module container to use for the modules.
static SPtr getModuleFactory()
Returns instance of the module factory to use to create modules.
static bool isPrototype(std::shared_ptr< WModule > module)
Checks whether the specified module is a prototype or an instantiated module.
Base class for all combiners which apply one connection between two connectors of two modules.
std::shared_ptr< WModule > m_srcModule
The source module to connect with the target.
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.
std::shared_ptr< WModule > m_targetModule
The module/prototype to connect with m_srcMdodule.
Class representing a single module of OpenWalnut.
std::shared_ptr< WModule > SPtr
Shared pointer to a WModule.
std::shared_ptr< WThreadedRunner > SPtr
Abbreviation to a shared_ptr to this type.
WStreamedLogger error(const std::string &source)
Logging an error message.