OpenWalnut
1.2.5
|
This is a simple class which forwards output data to output data connectors. More...
#include <WModuleOutputForwardData.h>
Public Member Functions | |
WModuleOutputForwardData (boost::shared_ptr< WModule > module, std::string name="", std::string description="") | |
Constructor. | |
virtual | ~WModuleOutputForwardData () |
Destructor. | |
virtual void | forward (boost::shared_ptr< WModuleConnector > from) |
Forward the output to the specified output. | |
virtual void | unforward (boost::shared_ptr< WModuleConnector > from) |
Remove the specified connector from the forwarding list. | |
![]() | |
WModuleOutputData (boost::shared_ptr< WModule > module, std::string name="", std::string description="") | |
Constructor. | |
virtual | ~WModuleOutputData () |
Destructor. | |
virtual void | updateData (boost::shared_ptr< T > data) |
Update the data associated. | |
virtual void | reset () |
Resets the data on this output. | |
virtual void | triggerUpdate () |
This method simply propagates an update but does not actually change the data. | |
virtual const boost::shared_ptr < WTransferable > | getRawData () const |
Gives back the currently set data as WTransferable. | |
const boost::shared_ptr< T > | getData () const |
Gives back the currently set data. | |
virtual bool | connectable (boost::shared_ptr< WModuleConnector > con) |
Checks whether the specified connector is an input connector and compatible with T. | |
virtual boost::shared_ptr < WPrototyped > | getTransferPrototype () |
Returns the prototype of the Type T used in this connector. | |
![]() | |
WModuleOutputConnector (boost::shared_ptr< WModule > module, std::string name="", std::string description="") | |
Constructor. | |
virtual | ~WModuleOutputConnector () |
Destructor. | |
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. | |
virtual bool | isInputConnector () const |
Returns true if this instance is an WModuleInputConnector. | |
virtual bool | isOutputConnector () const |
Returns true if this instance is an WModuleOutputConnector. | |
![]() | |
WModuleConnector (boost::shared_ptr< WModule > module, std::string name="", std::string description="") | |
Constructor. | |
virtual | ~WModuleConnector () |
Destructor. | |
boost::shared_ptr< WModule > | getModule () const |
Returns the module which owns this connector. | |
virtual void | disconnect (boost::shared_ptr< WModuleConnector > con, bool removeFromOwnList=true) |
Disconnects this connector if connected. | |
virtual void | disconnectAll () |
Disconnects ALL connected connectors. | |
virtual void | connect (boost::shared_ptr< WModuleConnector > con) |
Connects this Module Connector with another one. | |
bool | isConnectedTo (boost::shared_ptr< WModuleConnector > con) |
Checks whether this connector is connected to the given one. | |
unsigned int | isConnected () |
Gets the count of connections currently established. | |
const std::string | getDescription () const |
Gives information about this connection. | |
void | setDescription (std::string desc) |
Sets the connector's description. | |
const std::string | getName () const |
Gives name of connection. | |
const std::string | getCanonicalName () const |
Gives canonical name of connection. | |
void | setName (std::string name) |
Sets the connector's name. | |
WCombinerTypes::WOneToOneCombiners | getPossibleDisconnections () |
Returns a list of possible disconnections for this connector. | |
boost::shared_ptr < WModuleInputConnector > | toInputConnector () |
Tries to convert this instance to an input connector. | |
boost::shared_ptr < WModuleOutputConnector > | toOutputConnector () |
Tries to convert this instance to an output connector. |
Protected Member Functions | |
virtual void | inputNotifyDataChange (boost::shared_ptr< WModuleConnector >, boost::shared_ptr< WModuleConnector >) |
Gets called whenever a connected output updates its data. |
Protected Attributes | |
boost::shared_ptr < WModuleInputData< T > > | m_in |
The output connector which collects data and distributes it to all connectors connected using the forwardTo() method. |
Additional Inherited Members | |
![]() | |
typedef boost::shared_ptr < WModuleOutputData< T > > | PtrType |
Pointer to this. | |
typedef WModuleOutputData< T > & | RefType |
Reference to this type. | |
typedef WModuleOutputData< T > | Type |
Type of the connector. | |
typedef T | TransferType |
Typedef to the contained transferable. | |
![]() | |
static PtrType | create (boost::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. | |
static PtrType | createAndAdd (boost::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. |
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 43 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 54 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::inputNotifyDataChange(), and WModuleOutputForwardData< T >::m_in.
|
inlinevirtual |
Destructor.
Definition at line 68 of file WModuleOutputForwardData.h.
|
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 77 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::m_in.
|
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 103 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::m_in, and WModuleOutputData< T >::updateData().
Referenced by WModuleOutputForwardData< T >::WModuleOutputForwardData().
|
inlinevirtual |
Remove the specified connector from the forwarding list.
from | the output connector to be removed from forwarding list. |
Definition at line 87 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 97 of file WModuleOutputForwardData.h.
Referenced by WModuleOutputForwardData< T >::forward(), WModuleOutputForwardData< T >::inputNotifyDataChange(), WModuleOutputForwardData< T >::unforward(), and WModuleOutputForwardData< T >::WModuleOutputForwardData().