itom
|
A channel defines a propagation pipeline between two parameters of two nodes. The nodes are instances of the class AbstractNode, which is for instance a base class of AbstractFigure, and therefore each plot designer plugin in itom. More...
#include <AbstractNode.h>
Public Types | |
enum | UpdateState { StateIdle , StateUpdatePending , StateUpdateReceived } |
Public Member Functions | |
Channel () | |
default constructor of a channel | |
Channel (AbstractNode *sender, ito::Param *senderParam, AbstractNode *receiver, ito::Param *receiverParam) | |
constructor of a properly initialized channel | |
virtual | ~Channel () |
destructor of channel. | |
Channel (const Channel &cpy) | |
copy constructor | |
Channel & | operator= (const Channel &rhs) |
assign operator | |
AbstractNode * | getSender () const |
returns the sender node of this channel (or NULL if not available) | |
AbstractNode * | getReceiver () const |
returns the receiver node of this channel (or NULL if not available) | |
UpdateState | getUpdateState () const |
returns the current update state of this channel (see enumeration UpdateState) | |
QString | getSenderParamName () const |
return parameter name as QLatin1String of output parameter of sender, connected to this channel. | |
QString | getReceiverParamName () const |
return parameter name as QLatin1String of input parameter of receiver, connected to this channel | |
RetVal | propagateUpdatePending () |
this method sets the updateState of this channel to StateUpdatePending and calls setUpdatePending of the receiver node. | |
RetVal | setUpdateReceived () |
informs this channel that changed value of the sender parameter has been copied / set to its receiver parameter | |
uint | getHash () const |
ito::Param * | getSenderParam () const |
returns the input parameter of this channel, which is an output parameter of the sender node | |
ito::Param * | getReceiverParam () const |
returns the output parameter of this channel, which is an input parameter of the receiver node | |
void | resetUpdateState (void) |
bool | isSender (const AbstractNode *node) const |
bool | isReceiver (const AbstractNode *node) const |
Static Public Member Functions | |
static uint | calcChannelHash (const AbstractNode *sender, const ito::Param *senderParam, const AbstractNode *receiver, const ito::Param *receiverParam) |
static helper method to calculate a hash value based on the sender, the receiver and both participating parameters. | |
Private Member Functions | |
Q_DECLARE_PRIVATE (Channel) | |
Private Attributes | |
QScopedPointer< ChannelPrivate > | d_ptr |
A channel defines a propagation pipeline between two parameters of two nodes. The nodes are instances of the class AbstractNode, which is for instance a base class of AbstractFigure, and therefore each plot designer plugin in itom.
Every instance of AbstractNode can define a set of input and output parameters as list of ito::Param.
This channel is a directed connection between one output parameter of the sender node and one input parameter of a receiver node. Both parameters must be compatible, hence, have the same type.
ito::Channel::Channel | ( | ) |
default constructor of a channel
This constructor creates a channel with an invalid sender as well as receiver (both NULL).
ito::Channel::Channel | ( | AbstractNode * | sender, |
ito::Param * | senderParam, | ||
AbstractNode * | receiver, | ||
ito::Param * | receiverParam ) |
constructor of a properly initialized channel
This method constructs an instance of class Channel, that connects a given output parameter (senderParam) of a sender node to a given input parameter (receiverParam) of another receiver node.
uint ito::Channel::getHash | ( | ) | const |
The hash identifying this channel in the connection list of the participating nodes
bool ito::Channel::isReceiver | ( | const AbstractNode * | node | ) | const |
returns true, if the node given as the argument fills the role of receiver in this channel.
returns true, if the node given as the argument fills the role of receiver in this channel. Useful, since parent/child do not have predefined roles
bool ito::Channel::isSender | ( | const AbstractNode * | node | ) | const |
returns true, if the node given as the argument fills the role of sender in this channel.
returns true, if the node given as the argument fills the role of sender in this channel. Useful, since parent/child do not have predefined roles
|
private |
self-managed pointer to the private class container (deletes itself if d_ptr is destroyed). pointer to private class of Channel defined in Channel.cpp. This container is used to allow flexible changes in the interface without destroying the binary compatibility
void ito::Channel::resetUpdateState | ( | void | ) |
Resets the state to StateIdle. Note: This reset is NOT propagated down the node tree
Sets the updatePending flag of this channel back to false. Note: This reset is NOT propagated down the node tree