Base class from which concrete pure consumers derive. More...
#include <node.h>


Public Member Functions | |
| consumer (const std::string &name_r, const size_t ins) | |
| virtual size_t | ins () const |
| Returns the number of input pins. | |
| virtual inpin< T > & | input (const size_t n) |
| Returns a reference to an input pin. | |
| virtual const inpin< T > & | input (const size_t n) const |
| Returns a const reference to an input pin. | |
| virtual inputs_t & | inputs () |
| Returns a reference to the container of input pins. | |
| virtual const inputs_t & | inputs () const |
| Returns a const reference to the container of input pins. | |
| virtual std::string | rename (const std::string &name_r) |
| Overrides named::rename. | |
| virtual void | ready (size_t n)=0 |
| Consuming function. | |
Public Member Functions inherited from flow::node | |
| 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. | |
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. | |
Protected Member Functions | |
| virtual void | disconnect (size_t pin) |
| Disconnect an inpin of this consumer. | |
| virtual void | sever () |
| Disconnect all pins. | |
| virtual bool | incoming () |
| Tests whether there are any packets at any of the inpins. | |
| virtual void | operator() () |
| The node's execution function. | |
Friends | |
| class | graph |
Additional Inherited Members | |
Protected Attributes inherited from flow::node | |
| 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. | |
Base class from which concrete pure consumers derive.
Concrete transformers should derive from flow::transformer.
| T | The type of data this node consumes. |
|
inline |
| name_r | The name to give this node. |
| ins | Numbers of input pins. |
|
inlineprotectedvirtual |
Disconnect an inpin of this consumer.
| pin | Index of the pin to disconnect. |
|
inlineprotectedvirtual |
The node's execution function.
This is the implementation of node::operator()(). Nodes that are consumers should use this function as their execution function.
Implements flow::node.
Reimplemented in flow::transformer< C, P >, and flow::transformer< T, T >.
|
inlinevirtual |
Returns a reference to an input pin.
| n | The index of the input pin. |
|
inlinevirtual |
Returns a const reference to an input pin.
| n | The index of the input pin. |
|
inlinevirtual |
Overrides named::rename.
Ensure pins are also renamed.
| name_r | New name to give this node. |
Reimplemented from flow::named.
Reimplemented in flow::transformer< C, P >, and flow::transformer< T, T >.
|
pure virtual |
Consuming function.
This function is called from the operator()() execution function. It is the function that the concrete classes of consuming nodes implement. This function signals that a packet is ready at an input node.
param n The index of the input pin at which a packet has arrived.
Implemented in flow::transformer< C, P >, flow::transformer< T, T >, flow::samples::generic::delay< T >, flow::samples::generic::tee< T >, flow::samples::generic::ostreamer< T >, flow::samples::math::const_adder< T >, and flow::samples::math::adder< T >.
1.8.2