|
OpenWalnut
1.2.5
|
This is a simple class which forwards input data to input data connectors. More...
#include <WModuleInputForwardData.h>
Inheritance diagram for WModuleInputForwardData< T >:Public Types | |
| typedef boost::shared_ptr < WModuleInputForwardData< T > > | PtrType |
| Pointer to this. | |
| typedef WModuleInputForwardData< T > & | RefType |
| Reference to this type. | |
| typedef WModuleInputForwardData< T > | Type |
| Type of the connector. | |
| typedef T | TransferType |
| Typedef to the contained transferable. | |
Public Types inherited from WModuleInputData< T > | |
Public Member Functions | |
| WModuleInputForwardData (boost::shared_ptr< WModule > module, std::string name="", std::string description="") | |
| Constructor. | |
| virtual | ~WModuleInputForwardData () |
| Destructor. | |
| virtual void | forward (boost::shared_ptr< WModuleConnector > to) |
| Forward the input to the specified input. | |
| virtual void | unforward (boost::shared_ptr< WModuleConnector > to) |
| Remove the specified connector from the forwarding list. | |
Public Member Functions inherited from WModuleInputData< T > | |
| WModuleInputData (boost::shared_ptr< WModule > module, std::string name="", std::string description="") | |
| Constructor. | |
| virtual | ~WModuleInputData () |
| Destructor. | |
| virtual void | disconnect (boost::shared_ptr< WModuleConnector > con, bool removeFromOwnList=true) |
| Disconnects this connector if connected. | |
| const boost::shared_ptr< T > | getData (bool reset=true) |
| Gives the currently set data and resets the update flag. | |
| virtual bool | connectable (boost::shared_ptr< WModuleConnector > con) |
| Checks whether the specified connector is an input connector and compatible with T. | |
Public Member Functions inherited from WModuleInputConnector | |
| WModuleInputConnector (boost::shared_ptr< WModule > module, std::string name="", std::string description="") | |
| Constructor. | |
| virtual | ~WModuleInputConnector () |
| Destructor. | |
| boost::shared_ptr< WCondition > | getDataChangedCondition () |
| Gets the condition variable that gets fired whenever new data has been sent. | |
| 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. | |
| virtual bool | updated () |
| Denotes whether the connected output was updated. | |
| virtual bool | handledUpdate () |
| Resets the updated-flag. | |
Public Member Functions inherited from WModuleConnector | |
| 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 | 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. | |
Static Public Member Functions | |
| static PtrType | create (boost::shared_ptr< WModule > module, std::string name="", std::string description="") |
| Convenience method to create a new instance of this in forward 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 in forward data connector with proper type and add it to the list of connectors of the specified module. | |
Protected Member Functions | |
| virtual void | notifyDataChange (boost::shared_ptr< WModuleConnector > input, boost::shared_ptr< WModuleConnector > output) |
| Gets called whenever a connected output updates its data. | |
| virtual void | notifyConnectionClosed (boost::shared_ptr< WModuleConnector > here, boost::shared_ptr< WModuleConnector > there) |
| Gets called whenever a connection between a remote and local connector gets closed. | |
Protected Attributes | |
| boost::shared_ptr < WModuleOutputData< T > > | m_out |
| The output connector which collects data and distributes it to all connectors connected using the forwardTo() method. | |
This is a simple class which forwards input data to input data connectors.
It itself is a input data connector and can be used as one, but also provides the possibility to forward data changes to other input data connectors, using a separate output data connector (which is not visible to the outside world).
Definition at line 43 of file WModuleInputForwardData.h.
| typedef boost::shared_ptr< WModuleInputForwardData< T > > WModuleInputForwardData< T >::PtrType |
Pointer to this.
For convenience.
Reimplemented from WModuleInputData< T >.
Definition at line 49 of file WModuleInputForwardData.h.
| typedef WModuleInputForwardData< T >& WModuleInputForwardData< T >::RefType |
Reference to this type.
Reimplemented from WModuleInputData< T >.
Definition at line 54 of file WModuleInputForwardData.h.
| typedef T WModuleInputForwardData< T >::TransferType |
Typedef to the contained transferable.
Reimplemented from WModuleInputData< T >.
Definition at line 64 of file WModuleInputForwardData.h.
| typedef WModuleInputForwardData< T > WModuleInputForwardData< T >::Type |
Type of the connector.
Reimplemented from WModuleInputData< T >.
Definition at line 59 of file WModuleInputForwardData.h.
|
inline |
Constructor.
This creates a new input data connector which is able to forward data changes TO other input 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 73 of file WModuleInputForwardData.h.
References WModuleInputForwardData< T >::m_out.
|
inlinevirtual |
Destructor.
Definition at line 83 of file WModuleInputForwardData.h.
|
inlinestatic |
Convenience method to create a new instance of this in forward data connector with proper type.
| module | The module owning this instance |
| name | The name of this connector. |
| description | The description of this connector. |
Reimplemented from WModuleInputData< T >.
Definition at line 170 of file WModuleInputForwardData.h.
|
inlinestatic |
Convenience method to create a new instance of this in forward 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. |
Reimplemented from WModuleInputData< T >.
Definition at line 178 of file WModuleInputForwardData.h.
|
inlinevirtual |
Forward the input to the specified input.
The specified input must be compatible with the template parameter of this input.
| to | the input connector to forward data to. |
Definition at line 92 of file WModuleInputForwardData.h.
References WModuleInputForwardData< T >::m_out.
|
inlineprotectedvirtual |
Gets called whenever a connection between a remote and local connector gets closed.
This is used here to forward the NULL data.
| here | the connector of THIS module getting disconnected. |
| there | the connector of the other module getting disconnected. |
Reimplemented from WModuleConnector.
Definition at line 158 of file WModuleInputForwardData.h.
References WModuleInputForwardData< T >::m_out.
|
inlineprotectedvirtual |
Gets called whenever a connected output updates its data.
This method uses this callback to update the m_out connector to inform all inputs to which the data should be forwarded.
| input | the input connector receiving the change |
| output | the output connector sending the change |
Reimplemented from WModuleInputConnector.
Definition at line 144 of file WModuleInputForwardData.h.
References WModuleInputForwardData< T >::m_out.
|
inlinevirtual |
Remove the specified connector from the forwarding list.
| to | the input connector to be removed from forwarding list. |
Definition at line 102 of file WModuleInputForwardData.h.
References WModuleInputForwardData< T >::m_out.
|
protected |
The output connector which collects data and distributes it to all connectors connected using the forwardTo() method.
Definition at line 135 of file WModuleInputForwardData.h.
Referenced by WModuleInputForwardData< T >::forward(), WModuleInputForwardData< T >::notifyConnectionClosed(), WModuleInputForwardData< T >::notifyDataChange(), WModuleInputForwardData< T >::unforward(), and WModuleInputForwardData< T >::WModuleInputForwardData().
1.8.1