OpenWalnut
1.5.0dev
|
Combiner which disconnects the specified connection. More...
#include <WDisconnectCombiner.h>
Public Member Functions | |
WDisconnectCombiner (std::shared_ptr< WModuleContainer > target, std::shared_ptr< WModule > srcModule, std::string srcConnector, std::shared_ptr< WModule > targetModule, std::string targetConnector) | |
Creates a combiner which disconnects the specified connection. More... | |
WDisconnectCombiner (std::shared_ptr< WModule > srcModule, std::string srcConnector, std::shared_ptr< WModule > targetModule, std::string targetConnector) | |
Creates a combiner which disconnects the specified connection. More... | |
WDisconnectCombiner (std::shared_ptr< WModuleConnector > srcConnector, std::shared_ptr< WModuleConnector > targetConnector) | |
Creates a combiner which disconnects the specified connection. More... | |
virtual | ~WDisconnectCombiner () |
Destructor. More... | |
virtual void | apply () |
Disconnects the specified connection. More... | |
Public Member Functions inherited from WModuleOneToOneCombiner | |
WModuleOneToOneCombiner (std::shared_ptr< WModuleContainer > target, std::shared_ptr< WModule > srcModule, std::string srcConnector, std::shared_ptr< WModule > targetModule, std::string targetConnector) | |
Creates a combiner which sets up the specified modules and prototype combination. More... | |
WModuleOneToOneCombiner (std::shared_ptr< WModule > srcModule, std::string srcConnector, std::shared_ptr< WModule > targetModule, std::string targetConnector) | |
Creates a combiner which sets up the specified modules and prototype combination. More... | |
virtual | ~WModuleOneToOneCombiner () |
Destructor. More... | |
std::shared_ptr< WModule > | getSrcModule () const |
Gets the source module. More... | |
std::string | getSrcConnector () const |
The output connector of m_srcModule to connect with m_targetConnector. More... | |
std::shared_ptr< WModule > | getTargetModule () const |
The module/prototype to connect with m_srcModule. More... | |
std::string | getTargetConnector () const |
The input connector the target module to connect with m_srcConnector. More... | |
Public Member Functions inherited from WModuleCombiner | |
WModuleCombiner (std::shared_ptr< WModuleContainer > target) | |
Creates an empty combiner. More... | |
WModuleCombiner () | |
Creates an empty combiner. More... | |
virtual | ~WModuleCombiner () |
Destructor. More... | |
virtual void | run () |
Run thread and call apply(). More... | |
Public Member Functions inherited from WThreadedRunner | |
WThreadedRunner () | |
Default constructor. More... | |
virtual | ~WThreadedRunner () |
Destructor. More... | |
void | run (THREADFUNCTION f) |
Run thread. More... | |
void | wait (bool requestFinish=false) |
Wait for the thread to be finished. More... | |
virtual void | requestStop () |
This method's purpose is to request a stop without waiting for it. More... | |
virtual boost::signals2::connection | subscribeSignal (THREAD_SIGNAL signal, t_ThreadErrorSignalHandlerType notifier) |
Connects a specified notify function with a signal this thread instance is offering. More... | |
const WBoolFlag & | isCrashed () const |
Checks whether this thread has been crashed. More... | |
const std::string & | getCrashMessage () const |
Get the message of the exception finally causing the crash. More... | |
void | setThreadName (std::string name) |
Set the name of the thread. More... | |
std::string | getThreadName () const |
Returns the current thread name. More... | |
Additional Inherited Members | |
Public Types inherited from WThreadedRunner | |
typedef std::shared_ptr< WThreadedRunner > | SPtr |
Abbreviation to a shared_ptr to this type. More... | |
typedef std::shared_ptr< const WThreadedRunner > | ConstSPtr |
Abbreviation to a const shared_ptr to this type. More... | |
typedef boost::function< void(void) > | THREADFUNCTION |
Type used for simple thread functions. More... | |
Static Public Member Functions inherited from WThreadedRunner | |
static void | setThisThreadName (std::string name) |
Static function to set the name of the calling thread. More... | |
Protected Member Functions inherited from WModuleCombiner | |
virtual void | threadMain () |
Function that has to be overwritten for execution. More... | |
Protected Member Functions inherited from WThreadedRunner | |
virtual void | notifyStop () |
Gets called when the thread should be stopped. More... | |
void | yield () const |
Give remaining execution timeslice to another thread. More... | |
void | sleep (const int32_t t) const |
Sets thread asleep. More... | |
void | msleep (const int32_t t) const |
Sets thread asleep. More... | |
void | waitForStop () |
Let the thread sleep until a stop request was given. More... | |
virtual void | onThreadException (const WException &e) |
This method is called if an exception was caught, which came from the custom thread code. More... | |
void | handleDeadlyException (const WException &e, std::string sender="WThreadedRunner") |
Handle the specified exception which was not caught in the thread, which basically means the thread has crashed. More... | |
Protected Attributes inherited from WModuleOneToOneCombiner | |
std::shared_ptr< WModule > | m_srcModule |
The source module to connect with the target. More... | |
std::string | m_srcConnector |
The output connector of m_srcModule to connect with m_targetConnector. More... | |
std::shared_ptr< WModule > | m_targetModule |
The module/prototype to connect with m_srcMdodule. More... | |
std::string | m_targetConnector |
The input connector the target module to connect with m_srcConnector. More... | |
Protected Attributes inherited from WModuleCombiner | |
std::shared_ptr< WModuleContainer > | m_container |
The module container to use for the modules. More... | |
Protected Attributes inherited from WThreadedRunner | |
boost::thread | m_thread |
Thread instance. More... | |
WBoolFlag | m_shutdownFlag |
Condition getting fired whenever the thread should quit. More... | |
WBoolFlag | m_isCrashed |
True whenever an exception is thrown during threadMain. More... | |
std::string | m_crashMessage |
The crash message. More... | |
Combiner which disconnects the specified connection.
Definition at line 45 of file WDisconnectCombiner.h.
WDisconnectCombiner::WDisconnectCombiner | ( | std::shared_ptr< WModuleContainer > | target, |
std::shared_ptr< WModule > | srcModule, | ||
std::string | srcConnector, | ||
std::shared_ptr< WModule > | targetModule, | ||
std::string | targetConnector | ||
) |
Creates a combiner which disconnects the specified connection.
If the specified connection does not exist (anymore), nothing will happen.
target | the target container |
srcModule | the module whose connector should be disconnected |
srcConnector | the srcModule connector to disconnect |
targetModule | the module whose connector should be disconnected from srcConnector |
targetConnector | the targetModule connector to disconnect. |
Definition at line 30 of file WDisconnectCombiner.cpp.
WDisconnectCombiner::WDisconnectCombiner | ( | std::shared_ptr< WModule > | srcModule, |
std::string | srcConnector, | ||
std::shared_ptr< WModule > | targetModule, | ||
std::string | targetConnector | ||
) |
Creates a combiner which disconnects the specified connection.
If the specified connection does not exist (anymore), nothing will happen.
srcModule | the module whose connector should be disconnected |
srcConnector | the srcModule connector to disconnect |
targetModule | the module whose connector should be disconnected from srcConnector |
targetConnector | the targetModule connector to disconnect. |
Definition at line 37 of file WDisconnectCombiner.cpp.
WDisconnectCombiner::WDisconnectCombiner | ( | std::shared_ptr< WModuleConnector > | srcConnector, |
std::shared_ptr< WModuleConnector > | targetConnector | ||
) |
Creates a combiner which disconnects the specified connection.
If the specified connection does not exist (anymore), nothing will happen.
srcConnector | connector 1 |
targetConnector | connector 2 |
Definition at line 43 of file WDisconnectCombiner.cpp.
|
virtual |
Destructor.
Definition at line 49 of file WDisconnectCombiner.cpp.
|
virtual |
Disconnects the specified connection.
Implements WModuleOneToOneCombiner.
Definition at line 54 of file WDisconnectCombiner.cpp.
References WModuleOneToOneCombiner::m_srcConnector, WModuleOneToOneCombiner::m_srcModule, WModuleOneToOneCombiner::m_targetConnector, and WModuleOneToOneCombiner::m_targetModule.