flow  3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
flow::node Class Referenceabstract

Base class common to all nodes. More...

#include <node.h>

Inheritance diagram for flow::node:
Inheritance graph
[legend]
Collaboration diagram for flow::node:
Collaboration graph
[legend]

Public Member Functions

 node (const std::string &name_r)
 
 node (node &&node_rr)
 Move constructor.
 
virtual state::type state () const
 Returns the node's state.
 
virtual void started ()
 Indicates the node has been started.
 
virtual void paused ()
 Indicates the node has been paused.
 
virtual void stopped ()
 Indicates the node has been stopped.
 
virtual void operator() ()=0
 The node's execution function.
 
- Public Member Functions inherited from flow::named
 named (const std::string &name_r)
 Constructor the takes a name.
 
 named (named &&name_rr)
 Move constructor.
 
 named (const named &name_r)
 Copy constructor.
 
virtual const std::string & name () const
 A const reference to this object's name.
 
virtual std::string rename (const std::string &name_r)
 Sets this object's name to a new name.
 

Protected Member Functions

virtual void sever ()=0
 Disconnect all pins.
 

Protected Attributes

std::condition_variable d_transition_cv
 The condition variable to monitor the node's state.
 
std::mutex d_transition_m
 The mutex to lock when waiting on d_transition_cv.
 

Friends

class graph
 

Detailed Description

Base class common to all nodes.

Constructor & Destructor Documentation

flow::node::node ( const std::string &  name_r)
inline

Constructor.

Parameters
name_rThe name to give this node.

Member Function Documentation

virtual void flow::node::started ( )
inlinevirtual

Indicates the node has been started.

Concrete nodes can override this function to be notified of the state transition.

virtual void flow::node::paused ( )
inlinevirtual

Indicates the node has been paused.

Concrete nodes can override this function to be notified of the state transition.

virtual void flow::node::stopped ( )
inlinevirtual

Indicates the node has been stopped.

Concrete nodes can override this function to be notified of the state transition.

Reimplemented in flow::samples::generic::ostreamer< T >, and flow::samples::generic::generator< T >.

virtual void flow::node::operator() ( )
pure virtual

The node's execution function.

When the node is started, this function is called. It will exit when the node is stopped.

Implemented in flow::transformer< C, P >, flow::transformer< T, T >, flow::consumer< T >, flow::consumer< C >, flow::producer< T >, and flow::producer< P >.


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