|
OpenWalnut 1.3.1
|
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 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. | |
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.
| WModuleInputForwardData< T >::WModuleInputForwardData | ( | boost::shared_ptr< WModule > | module, |
| std::string | name = "", |
||
| std::string | description = "" |
||
| ) | [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.
| virtual WModuleInputForwardData< T >::~WModuleInputForwardData | ( | ) | [inline, virtual] |
Destructor.
Definition at line 83 of file WModuleInputForwardData.h.
| WModuleInputForwardData< T >::PtrType WModuleInputForwardData< T >::create | ( | boost::shared_ptr< WModule > | module, |
| std::string | name = "", |
||
| std::string | description = "" |
||
| ) | [inline, static] |
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 169 of file WModuleInputForwardData.h.
| WModuleInputForwardData< T >::PtrType WModuleInputForwardData< T >::createAndAdd | ( | boost::shared_ptr< WModule > | module, |
| std::string | name = "", |
||
| std::string | description = "" |
||
| ) | [inline, static] |
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 177 of file WModuleInputForwardData.h.
| virtual void WModuleInputForwardData< T >::forward | ( | boost::shared_ptr< WModuleConnector > | to | ) | [inline, virtual] |
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.
| virtual void WModuleInputForwardData< T >::notifyConnectionClosed | ( | boost::shared_ptr< WModuleConnector > | here, |
| boost::shared_ptr< WModuleConnector > | there | ||
| ) | [inline, protected, virtual] |
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 157 of file WModuleInputForwardData.h.
References WModuleInputForwardData< T >::m_out.
| virtual void WModuleInputForwardData< T >::notifyDataChange | ( | boost::shared_ptr< WModuleConnector > | input, |
| boost::shared_ptr< WModuleConnector > | output | ||
| ) | [inline, protected, virtual] |
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 143 of file WModuleInputForwardData.h.
References WModuleInputForwardData< T >::m_out.
| virtual void WModuleInputForwardData< T >::unforward | ( | boost::shared_ptr< WModuleConnector > | to | ) | [inline, virtual] |
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.
boost::shared_ptr< WModuleOutputData< T > > 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 134 of file WModuleInputForwardData.h.
Referenced by WModuleInputForwardData< T >::forward(), WModuleInputForwardData< T >::notifyConnectionClosed(), WModuleInputForwardData< T >::notifyDataChange(), WModuleInputForwardData< T >::unforward(), and WModuleInputForwardData< T >::WModuleInputForwardData().
1.7.4