![]() |
OpenWalnut
1.5.0dev
|
This is a simple class which forwards output data to output data connectors. More...
#include <WModuleOutputForwardData.h>
Inheritance diagram for WModuleOutputForwardData< T >:
Collaboration diagram for WModuleOutputForwardData< T >:Public Types | |
| typedef std::shared_ptr< WModuleOutputForwardData< T > > | SPtr |
| Pointer to this. More... | |
| typedef std::shared_ptr< const WModuleOutputForwardData< T > > | ConstSPtr |
| Pointer to this. More... | |
| typedef SPtr | PtrType |
| Pointer to this. More... | |
| typedef WModuleOutputForwardData< T > & | RefType |
| Reference to this type. More... | |
| typedef WModuleOutputForwardData< T > | Type |
| Type of the connector. More... | |
| typedef T | TransferType |
| Typedef to the contained transferable. More... | |
Public Types inherited from WModuleOutputData< T > | |
| typedef std::shared_ptr< WModuleOutputData< T > > | PtrType |
| Pointer to this. More... | |
| typedef std::shared_ptr< WModuleOutputData< T > > | SPtr |
| Pointer to this. More... | |
| typedef std::shared_ptr< const WModuleOutputData< T > > | ConstSPtr |
| Pointer to this. More... | |
| typedef WModuleOutputData< T > & | RefType |
| Reference to this type. More... | |
| typedef WModuleOutputData< T > | Type |
| Type of the connector. More... | |
| typedef T | TransferType |
| Typedef to the contained transferable. More... | |
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... | |
Public Member Functions | |
| WModuleOutputForwardData (std::shared_ptr< WModule > module, std::string name="", std::string description="") | |
| Constructor. More... | |
| virtual | ~WModuleOutputForwardData () |
| Destructor. More... | |
| virtual void | forward (std::shared_ptr< WModuleConnector > from) |
| Forward the output to the specified output. More... | |
| virtual void | unforward (std::shared_ptr< WModuleConnector > from) |
| Remove the specified connector from the forwarding list. More... | |
Public Member Functions inherited from WModuleOutputData< T > | |
| WModuleOutputData (std::shared_ptr< WModule > module, std::string name="", std::string description="") | |
| Constructor. More... | |
| virtual | ~WModuleOutputData () |
| Destructor. More... | |
| virtual void | updateData (std::shared_ptr< T > data) |
| Update the data associated. More... | |
| virtual void | reset () |
| Resets the data on this output. More... | |
| virtual void | triggerUpdate () |
| This method simply propagates an update but does not actually change the data. More... | |
| virtual const std::shared_ptr< WTransferable > | getRawData () const |
| Gives back the currently set data as WTransferable. More... | |
| const std::shared_ptr< T > | getData () const |
| Gives back the currently set data. More... | |
| virtual bool | connectable (std::shared_ptr< WModuleConnector > con) |
| Checks whether the specified connector is an input connector and compatible with T. More... | |
| virtual std::shared_ptr< WPrototyped > | getTransferPrototype () |
| Returns the prototype of the Type T used in this connector. More... | |
Public Member Functions inherited from WModuleOutputConnector | |
| 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 | 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 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... | |
Static Public Member Functions | |
| static PtrType | create (std::shared_ptr< WModule > module, std::string name="", std::string description="") |
| Convenience method to create a new instance of this out data connector with proper type. More... | |
| static PtrType | createAndAdd (std::shared_ptr< WModule > module, std::string name="", std::string description="") |
| Convenience method to create a new instance of this out data connector with proper type and add it to the list of connectors of the specified module. More... | |
Static Public Member Functions inherited from WModuleOutputData< T > | |
| static PtrType | create (std::shared_ptr< WModule > module, std::string name="", std::string description="") |
| Convenience method to create a new instance of this out data connector with proper type. More... | |
| static PtrType | createAndAdd (std::shared_ptr< WModule > module, std::string name="", std::string description="") |
| Convenience method to create a new instance of this out data connector with proper type and add it to the list of connectors of the specified module. More... | |
Protected Member Functions | |
| virtual void | inputNotifyDataChange (std::shared_ptr< WModuleConnector >, std::shared_ptr< WModuleConnector >) |
| Gets called whenever a connected output updates its data. More... | |
Protected Member Functions inherited from WModuleOutputConnector | |
| 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... | |
Protected Attributes | |
| std::shared_ptr< WModuleInputData< T > > | m_in |
| The output connector which collects data and distributes it to all connectors connected using the forwardTo() method. More... | |
Protected Attributes inherited from WModuleOutputData< T > | |
| std::shared_ptr< T > | m_data |
| The data associated with this connector. 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... | |
This is a simple class which forwards output data to output data connectors.
It itself is a output data connector and can be used as one, but also provides the possibility to forward data changes to other output data connectors.
Definition at line 40 of file WModuleOutputForwardData.h.
| typedef std::shared_ptr< const WModuleOutputForwardData< T > > WModuleOutputForwardData< T >::ConstSPtr |
| typedef SPtr WModuleOutputForwardData< T >::PtrType |
| typedef WModuleOutputForwardData< T >& WModuleOutputForwardData< T >::RefType |
Reference to this type.
Definition at line 61 of file WModuleOutputForwardData.h.
| typedef std::shared_ptr< WModuleOutputForwardData< T > > WModuleOutputForwardData< T >::SPtr |
| typedef T WModuleOutputForwardData< T >::TransferType |
Typedef to the contained transferable.
Definition at line 71 of file WModuleOutputForwardData.h.
| typedef WModuleOutputForwardData< T > WModuleOutputForwardData< T >::Type |
Type of the connector.
Definition at line 66 of file WModuleOutputForwardData.h.
|
inline |
Constructor.
This creates a new output data connector which is able to forward data changes FROM other output data connectors.
| module | the module which is owner of this connector. |
| name | The name of this connector. |
| description | Short description of this connector. |
Definition at line 103 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::inputNotifyDataChange(), and WModuleOutputForwardData< T >::m_in.
Here is the call graph for this function:
|
inlinevirtual |
Destructor.
Definition at line 123 of file WModuleOutputForwardData.h.
|
static |
Convenience method to create a new instance of this out data connector with proper type.
| module | the module owning this instance |
| name | the name of this connector. |
| description | the description of this connector. |
Definition at line 167 of file WModuleOutputForwardData.h.
|
static |
Convenience method to create a new instance of this out data connector with proper type and add it to the list of connectors of the specified module.
| module | the module owning this instance |
| name | the name of this connector. |
| description | the description of this connector. |
Definition at line 176 of file WModuleOutputForwardData.h.
Referenced by WMTemplateContainers::connectors().
Here is the caller graph for this function:
|
inlinevirtual |
Forward the output to the specified output.
The specified output must be compatible with the template parameter of this output.
| from | the output connector whose data should be forwarded. |
Definition at line 132 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::m_in.
Referenced by WMTemplateContainers::moduleMain().
Here is the caller graph for this function:
|
inlineprotectedvirtual |
Gets called whenever a connected output updates its data.
In detail: it is a callback for m_in and waits simply forwards new data to this output instance.
Definition at line 157 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::m_in, and WModuleOutputData< T >::updateData().
Referenced by WModuleOutputForwardData< T >::WModuleOutputForwardData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinevirtual |
Remove the specified connector from the forwarding list.
| from | the output connector to be removed from forwarding list. |
Definition at line 142 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::m_in.
|
protected |
The output connector which collects data and distributes it to all connectors connected using the forwardTo() method.
Definition at line 151 of file WModuleOutputForwardData.h.
Referenced by WModuleOutputForwardData< T >::forward(), WModuleOutputForwardData< T >::inputNotifyDataChange(), WModuleOutputForwardData< T >::unforward(), and WModuleOutputForwardData< T >::WModuleOutputForwardData().