OpenWalnut  1.3.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
WModuleOutputForwardData< T > Class Template Reference

This is a simple class which forwards output data to output data connectors. More...

#include <WModuleOutputForwardData.h>

+ Inheritance diagram for WModuleOutputForwardData< T >:

Public Types

typedef boost::shared_ptr
< WModuleOutputForwardData< T > > 
SPtr
 Pointer to this. More...
 
typedef boost::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 boost::shared_ptr
< WModuleOutputData< T > > 
PtrType
 Pointer to this. More...
 
typedef WModuleOutputData< T > & RefType
 Reference to this type. More...
 
typedef WModuleOutputData< TType
 Type of the connector. More...
 
typedef T TransferType
 Typedef to the contained transferable. More...
 

Public Member Functions

 WModuleOutputForwardData (boost::shared_ptr< WModule > module, std::string name="", std::string description="")
 Constructor. More...
 
virtual ~WModuleOutputForwardData ()
 Destructor. More...
 
virtual void forward (boost::shared_ptr< WModuleConnector > from)
 Forward the output to the specified output. More...
 
virtual void unforward (boost::shared_ptr< WModuleConnector > from)
 Remove the specified connector from the forwarding list. More...
 
- Public Member Functions inherited from WModuleOutputData< T >
 WModuleOutputData (boost::shared_ptr< WModule > module, std::string name="", std::string description="")
 Constructor. More...
 
virtual ~WModuleOutputData ()
 Destructor. More...
 
virtual void updateData (boost::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
boost::shared_ptr
< WTransferable
getRawData () const
 Gives back the currently set data as WTransferable. More...
 
const boost::shared_ptr< TgetData () const
 Gives back the currently set data. More...
 
virtual bool connectable (boost::shared_ptr< WModuleConnector > con)
 Checks whether the specified connector is an input connector and compatible with T. More...
 
virtual boost::shared_ptr
< WPrototyped
getTransferPrototype ()
 Returns the prototype of the Type T used in this connector. More...
 
- Public Member Functions inherited from WModuleOutputConnector
 WModuleOutputConnector (boost::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 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 (boost::shared_ptr< WModule > module, std::string name="", std::string description="")
 Constructor. More...
 
virtual ~WModuleConnector ()
 Destructor. More...
 
boost::shared_ptr< WModulegetModule () const
 Returns the module which owns this connector. More...
 
virtual void disconnect (boost::shared_ptr< WModuleConnector > con, bool removeFromOwnList=true)
 Disconnects this connector if connected. More...
 
virtual void disconnectAll ()
 Disconnects ALL connected connectors. More...
 
virtual void connect (boost::shared_ptr< WModuleConnector > con)
 Connects this Module Connector with another one. More...
 
bool isConnectedTo (boost::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...
 
boost::shared_ptr
< WModuleInputConnector
toInputConnector ()
 Tries to convert this instance to an input connector. More...
 
boost::shared_ptr
< WModuleOutputConnector
toOutputConnector ()
 Tries to convert this instance to an output connector. More...
 

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. More...
 
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. More...
 
- Static Public Member Functions inherited from WModuleOutputData< T >
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. More...
 
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. More...
 

Protected Member Functions

virtual void inputNotifyDataChange (boost::shared_ptr< WModuleConnector >, boost::shared_ptr< WModuleConnector >)
 Gets called whenever a connected output updates its data. More...
 

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. More...
 

Detailed Description

template<typename T>
class WModuleOutputForwardData< T >

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.

Member Typedef Documentation

template<typename T>
typedef boost::shared_ptr< const WModuleOutputForwardData< T > > WModuleOutputForwardData< T >::ConstSPtr

Pointer to this.

For convenience.

Definition at line 54 of file WModuleOutputForwardData.h.

template<typename T>
typedef SPtr WModuleOutputForwardData< T >::PtrType

Pointer to this.

For convenience.

Definition at line 59 of file WModuleOutputForwardData.h.

template<typename T>
typedef WModuleOutputForwardData< T >& WModuleOutputForwardData< T >::RefType

Reference to this type.

Definition at line 64 of file WModuleOutputForwardData.h.

template<typename T>
typedef boost::shared_ptr< WModuleOutputForwardData< T > > WModuleOutputForwardData< T >::SPtr

Pointer to this.

For convenience.

Definition at line 49 of file WModuleOutputForwardData.h.

template<typename T>
typedef T WModuleOutputForwardData< T >::TransferType

Typedef to the contained transferable.

Definition at line 74 of file WModuleOutputForwardData.h.

template<typename T>
typedef WModuleOutputForwardData< T > WModuleOutputForwardData< T >::Type

Type of the connector.

Definition at line 69 of file WModuleOutputForwardData.h.

Constructor & Destructor Documentation

template<typename T>
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.

Parameters
modulethe module which is owner of this connector.
nameThe name of this connector.
descriptionShort description of this connector.

Definition at line 106 of file WModuleOutputForwardData.h.

References WModuleOutputForwardData< T >::inputNotifyDataChange(), and WModuleOutputForwardData< T >::m_in.

template<typename T>
virtual WModuleOutputForwardData< T >::~WModuleOutputForwardData ( )
inlinevirtual

Destructor.

Definition at line 120 of file WModuleOutputForwardData.h.

Member Function Documentation

template<typename T >
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.

Parameters
modulethe module owning this instance
namethe name of this connector.
descriptionthe description of this connector.
Returns
the pointer to the created connector.

Definition at line 164 of file WModuleOutputForwardData.h.

template<typename T >
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.

Parameters
modulethe module owning this instance
namethe name of this connector.
descriptionthe description of this connector.
Returns
the pointer to the created connector.

Definition at line 173 of file WModuleOutputForwardData.h.

template<typename T>
virtual void WModuleOutputForwardData< T >::forward ( boost::shared_ptr< WModuleConnector from)
inlinevirtual

Forward the output to the specified output.

The specified output must be compatible with the template parameter of this output.

Parameters
fromthe output connector whose data should be forwarded.

Definition at line 129 of file WModuleOutputForwardData.h.

References WModuleOutputForwardData< T >::m_in.

template<typename T>
virtual void WModuleOutputForwardData< T >::inputNotifyDataChange ( boost::shared_ptr< WModuleConnector ,
boost::shared_ptr< WModuleConnector  
)
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 154 of file WModuleOutputForwardData.h.

References WModuleOutputForwardData< T >::m_in, and WModuleOutputData< T >::updateData().

Referenced by WModuleOutputForwardData< T >::WModuleOutputForwardData().

template<typename T>
virtual void WModuleOutputForwardData< T >::unforward ( boost::shared_ptr< WModuleConnector from)
inlinevirtual

Remove the specified connector from the forwarding list.

Parameters
fromthe output connector to be removed from forwarding list.

Definition at line 139 of file WModuleOutputForwardData.h.

References WModuleOutputForwardData< T >::m_in.

Member Data Documentation

template<typename T>
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 148 of file WModuleOutputForwardData.h.

Referenced by WModuleOutputForwardData< T >::forward(), WModuleOutputForwardData< T >::inputNotifyDataChange(), WModuleOutputForwardData< T >::unforward(), and WModuleOutputForwardData< T >::WModuleOutputForwardData().


The documentation for this class was generated from the following file: