OpenWalnut
1.4.0
|
This is a simple class which forwards output data to output data connectors. More...
#include <WModuleOutputForwardData.h>
Public Types | |
typedef boost::shared_ptr < WModuleOutputForwardData< T > > | SPtr |
Pointer to this. | |
typedef boost::shared_ptr < const WModuleOutputForwardData< T > > | ConstSPtr |
Pointer to this. | |
typedef SPtr | PtrType |
Pointer to this. | |
typedef WModuleOutputForwardData< T > & | RefType |
Reference to this type. | |
typedef WModuleOutputForwardData< T > | Type |
Type of the connector. | |
typedef T | TransferType |
Typedef to the contained transferable. | |
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. | |
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 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. | |
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. |
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 boost::shared_ptr< const WModuleOutputForwardData< T > > WModuleOutputForwardData< T >::ConstSPtr |
Pointer to this.
For convenience.
Reimplemented from WModuleOutputData< T >.
Definition at line 51 of file WModuleOutputForwardData.h.
typedef SPtr WModuleOutputForwardData< T >::PtrType |
Pointer to this.
For convenience.
Reimplemented from WModuleOutputData< T >.
Definition at line 56 of file WModuleOutputForwardData.h.
typedef WModuleOutputForwardData< T >& WModuleOutputForwardData< T >::RefType |
Reference to this type.
Reimplemented from WModuleOutputData< T >.
Definition at line 61 of file WModuleOutputForwardData.h.
typedef boost::shared_ptr< WModuleOutputForwardData< T > > WModuleOutputForwardData< T >::SPtr |
Pointer to this.
For convenience.
Reimplemented from WModuleOutputData< T >.
Definition at line 46 of file WModuleOutputForwardData.h.
typedef T WModuleOutputForwardData< T >::TransferType |
Typedef to the contained transferable.
Reimplemented from WModuleOutputData< T >.
Definition at line 71 of file WModuleOutputForwardData.h.
typedef WModuleOutputForwardData< T > WModuleOutputForwardData< T >::Type |
Type of the connector.
Reimplemented from WModuleOutputData< T >.
Definition at line 66 of file WModuleOutputForwardData.h.
WModuleOutputForwardData< T >::WModuleOutputForwardData | ( | boost::shared_ptr< WModule > | module, |
std::string | name = "" , |
||
std::string | description = "" |
||
) | [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.
virtual WModuleOutputForwardData< T >::~WModuleOutputForwardData | ( | ) | [inline, virtual] |
Destructor.
Definition at line 117 of file WModuleOutputForwardData.h.
WModuleOutputForwardData< T >::PtrType WModuleOutputForwardData< T >::create | ( | boost::shared_ptr< WModule > | module, |
std::string | name = "" , |
||
std::string | description = "" |
||
) | [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. |
Reimplemented from WModuleOutputData< T >.
Definition at line 161 of file WModuleOutputForwardData.h.
WModuleOutputForwardData< T >::PtrType WModuleOutputForwardData< T >::createAndAdd | ( | boost::shared_ptr< WModule > | module, |
std::string | name = "" , |
||
std::string | description = "" |
||
) | [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. |
Reimplemented from WModuleOutputData< T >.
Definition at line 170 of file WModuleOutputForwardData.h.
virtual void WModuleOutputForwardData< T >::forward | ( | boost::shared_ptr< WModuleConnector > | from | ) | [inline, virtual] |
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 126 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::m_in.
virtual void WModuleOutputForwardData< T >::inputNotifyDataChange | ( | boost::shared_ptr< WModuleConnector > | , |
boost::shared_ptr< WModuleConnector > | |||
) | [inline, protected, virtual] |
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 151 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::m_in, and WModuleOutputData< T >::updateData().
Referenced by WModuleOutputForwardData< T >::WModuleOutputForwardData().
virtual void WModuleOutputForwardData< T >::unforward | ( | boost::shared_ptr< WModuleConnector > | from | ) | [inline, virtual] |
Remove the specified connector from the forwarding list.
from | the output connector to be removed from forwarding list. |
Definition at line 136 of file WModuleOutputForwardData.h.
References WModuleOutputForwardData< T >::m_in.
boost::shared_ptr< WModuleInputData< T > > 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 145 of file WModuleOutputForwardData.h.
Referenced by WModuleOutputForwardData< T >::forward(), WModuleOutputForwardData< T >::inputNotifyDataChange(), WModuleOutputForwardData< T >::unforward(), and WModuleOutputForwardData< T >::WModuleOutputForwardData().