![]() |
OpenWalnut
1.5.0dev
|
Class implementing output connection functionality between modules. More...
#include <WModuleOutputConnector.h>
Inheritance diagram for WModuleOutputConnector:
Collaboration diagram for WModuleOutputConnector:Public Member Functions | |
| WModuleOutputConnector (std::shared_ptr< WModule > module, std::string name="", std::string description="") | |
| Constructor. More... | |
| virtual | ~WModuleOutputConnector () |
| Destructor. More... | |
| boost::signals2::connection | subscribeSignal (MODULE_CONNECTOR_SIGNAL signal, t_GenericSignalHandlerType notifier) |
| Connects (subscribes) a specified notify function with a signal this module instance is offering. More... | |
| virtual bool | connectable (std::shared_ptr< WModuleConnector > con) |
| Checks whether the specified connector is an input connector. More... | |
| virtual bool | lazyConnectable (std::shared_ptr< WModuleConnector > con) |
| Checks whether the specified connector is connectable to this one, but ignores compatibility the type to be transferred. More... | |
| virtual std::shared_ptr< WPrototyped > | getTransferPrototype ()=0 |
| Returns the prototype of the WTransferable used in this connector. More... | |
| virtual const std::shared_ptr< WTransferable > | getRawData () const =0 |
| Gives back the currently set data as WTransferable. More... | |
| virtual bool | isInputConnector () const |
| Returns true if this instance is an WModuleInputConnector. More... | |
| virtual bool | isOutputConnector () const |
| Returns true if this instance is an WModuleOutputConnector. More... | |
Public Member Functions inherited from WModuleConnector | |
| WModuleConnector (std::shared_ptr< WModule > module, std::string name="", std::string description="") | |
| Constructor. More... | |
| virtual | ~WModuleConnector () |
| Destructor. More... | |
| std::shared_ptr< WModule > | getModule () const |
| Returns the module which owns this connector. More... | |
| virtual void | disconnect (std::shared_ptr< WModuleConnector > con, bool removeFromOwnList=true) |
| Disconnects this connector if connected. More... | |
| virtual void | disconnectAll () |
| Disconnects ALL connected connectors. More... | |
| virtual void | connect (std::shared_ptr< WModuleConnector > con, bool force=false) |
| Connects this Module Connector with another one. More... | |
| bool | isConnectedTo (std::shared_ptr< WModuleConnector > con) |
| Checks whether this connector is connected to the given one. More... | |
| unsigned int | isConnected () |
| Gets the count of connections currently established. More... | |
| const std::string | getDescription () const |
| Gives information about this connection. More... | |
| void | setDescription (std::string desc) |
| Sets the connector's description. More... | |
| const std::string | getName () const |
| Gives name of connection. More... | |
| const std::string | getCanonicalName () const |
| Gives canonical name of connection. More... | |
| void | setName (std::string name) |
| Sets the connector's name. More... | |
| WCombinerTypes::WOneToOneCombiners | getPossibleDisconnections () |
| Returns a list of possible disconnections for this connector. More... | |
| std::shared_ptr< WModuleInputConnector > | toInputConnector () |
| Tries to convert this instance to an input connector. More... | |
| std::shared_ptr< WModuleOutputConnector > | toOutputConnector () |
| Tries to convert this instance to an output connector. More... | |
| std::shared_ptr< WCondition > | getDataChangedCondition () |
| Gets the condition variable that gets fired whenever new data has been sent. More... | |
Protected Member Functions | |
| virtual void | propagateDataChange () |
| Propagates the signal "DATA_CHANGED" to all connected items. More... | |
Protected Member Functions inherited from WModuleConnector | |
| virtual void | connectSignals (std::shared_ptr< WModuleConnector > con) |
| Connect additional signals. More... | |
| virtual void | disconnectSignals (std::shared_ptr< WModuleConnector > con) |
| Disconnect all signals subscribed by this connector from "con". More... | |
| virtual const t_GenericSignalHandlerType | getSignalHandler (MODULE_CONNECTOR_SIGNAL signal) |
| Gives the signal handler function responsible for a given signal. More... | |
| virtual void | notifyConnectionEstablished (std::shared_ptr< WModuleConnector > here, std::shared_ptr< WModuleConnector > there) |
| Gets called whenever a connector gets connected to the specified input. More... | |
| virtual void | notifyConnectionClosed (std::shared_ptr< WModuleConnector > here, std::shared_ptr< WModuleConnector > there) |
| Gets called whenever a connection between a remote and local connector gets closed. More... | |
Private Attributes | |
| t_GenericSignalType | signal_DataChanged |
| Signal fired whenever new data should be propagated. More... | |
Additional Inherited Members | |
Public Types inherited from WModuleConnector | |
| typedef std::shared_ptr< WModuleConnector > | SPtr |
| Shared pointer to this class. More... | |
| typedef std::shared_ptr< const WModuleConnector > | ConstSPtr |
| Const shared pointer to this class. More... | |
Protected Attributes inherited from WModuleConnector | |
| std::set< std::shared_ptr< WModuleConnector > > | m_connected |
| List of connectors connected to this connector. More... | |
| std::shared_mutex | m_connectionListLock |
| Lock for avoiding concurrent write to m_Connected (multiple reader, single writer lock). More... | |
| std::weak_ptr< WModule > | m_module |
| The Module this connector belongs to. More... | |
| std::string | m_moduleName |
| The name of the module owning this connector. More... | |
| t_GenericSignalType | signal_ConnectionEstablished |
| Signal emitted whenever connection has been established. More... | |
| t_GenericSignalType | signal_ConnectionClosed |
| Signal emitted whenever connection has been closed. More... | |
| std::shared_ptr< WCondition > | m_dataChangedCondition |
| Condition fired whenever data changes. More... | |
Class implementing output connection functionality between modules.
Definition at line 44 of file WModuleOutputConnector.h.
| WModuleOutputConnector::WModuleOutputConnector | ( | std::shared_ptr< WModule > | module, |
| std::string | name = "", |
||
| std::string | description = "" |
||
| ) |
Constructor.
| module | the module which is owner of this connector. |
| name | The name of this connector. |
| description | Short description of this connector. |
Definition at line 36 of file WModuleOutputConnector.cpp.
|
virtual |
Destructor.
Definition at line 41 of file WModuleOutputConnector.cpp.
|
virtual |
Checks whether the specified connector is an input connector.
| con | the connector to check against. |
Implements WModuleConnector.
Reimplemented in WModuleOutputData< T >, and WModuleOutputData< WDataSetSingle >.
Definition at line 46 of file WModuleOutputConnector.cpp.
Referenced by WModuleOutputData< T >::connectable().
Here is the caller graph for this function:
|
pure virtual |
Gives back the currently set data as WTransferable.
Implemented in WModuleOutputData< T >, and WModuleOutputData< WDataSetSingle >.
|
pure virtual |
Returns the prototype of the WTransferable used in this connector.
Implemented in WModuleOutputData< T >, and WModuleOutputData< WDataSetSingle >.
|
virtual |
Returns true if this instance is an WModuleInputConnector.
Implements WModuleConnector.
Definition at line 87 of file WModuleOutputConnector.cpp.
|
virtual |
Returns true if this instance is an WModuleOutputConnector.
Implements WModuleConnector.
Definition at line 92 of file WModuleOutputConnector.cpp.
|
virtual |
Checks whether the specified connector is connectable to this one, but ignores compatibility the type to be transferred.
| con | the connector to check against. |
Implements WModuleConnector.
Definition at line 57 of file WModuleOutputConnector.cpp.
|
protectedvirtual |
Propagates the signal "DATA_CHANGED" to all connected items.
Definition at line 81 of file WModuleOutputConnector.cpp.
References WModuleConnector::m_dataChangedCondition, and signal_DataChanged.
Referenced by WModuleOutputData< T >::triggerUpdate().
Here is the caller graph for this function:
|
virtual |
Connects (subscribes) a specified notify function with a signal this module instance is offering.
| WModuleSignalSubscriptionFailed | thrown if the signal can't be connected. |
| signal | the signal to connect to. |
| notifier | the notifier function to bind. |
Reimplemented from WModuleConnector.
Definition at line 68 of file WModuleOutputConnector.cpp.
References signal_DataChanged, and WModuleConnector::subscribeSignal().
Here is the call graph for this function:
|
private |
Signal fired whenever new data should be propagated.
Represented by DATA_CHANGED enum- element.
Definition at line 137 of file WModuleOutputConnector.h.
Referenced by propagateDataChange(), and subscribeSignal().