flow  3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | List of all members
flow::transformer< C, P > Class Template Referenceabstract

Base class from which concrete transformers derive. More...

#include <node.h>

Inheritance diagram for flow::transformer< C, P >:
Inheritance graph
[legend]
Collaboration diagram for flow::transformer< C, P >:
Collaboration graph
[legend]

Public Member Functions

 transformer (const std::string &name_r, const size_t ins, const size_t outs)
 
virtual std::string rename (const std::string &name_r)
 Overrides named::rename.
 
virtual void ready (size_t n)=0
 consumer::ready() function to be implemented by concrete class.
 
- Public Member Functions inherited from flow::consumer< C >
 consumer (const std::string &name_r, const size_t ins)
 
virtual size_t ins () const
 Returns the number of input pins.
 
virtual inpin< C > & input (const size_t n)
 Returns a reference to an input pin.
 
virtual const inpin< C > & 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.
 
- 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.
 
- Public Member Functions inherited from flow::producer< P >
 producer (const std::string &name_r, const size_t outs)
 
virtual size_t outs () const
 Returns the number of output pins.
 
virtual outpin< P > & output (const size_t n)
 Returns a reference to an outpin pin.
 
virtual const outpin< P > & output (const size_t n) const
 Returns a const reference to an outpin pin.
 
virtual outputs_t & outputs ()
 Returns a reference to the container of output pins.
 
virtual const outputs_t & outputs () const
 Returns a const reference to the container of output pins.
 

Protected Member Functions

virtual void sever ()
 Disconnect all pins.
 
virtual void operator() ()
 Implementation of node::operator()().
 
- Protected Member Functions inherited from flow::consumer< C >
virtual void disconnect (size_t pin)
 Disconnect an inpin of this consumer.
 
virtual bool incoming ()
 Tests whether there are any packets at any of the inpins.
 
- Protected Member Functions inherited from flow::producer< P >
virtual void connect (size_t p_pin, consumer< P > *consumer_p, size_t c_pin, const size_t max_length=0, const size_t max_weight=0)
 Connect this producer to a consumer.
 
virtual void disconnect (size_t pin)
 Disconnect an outpin of this producer.
 

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.
 

Detailed Description

template<typename C, typename P>
class flow::transformer< C, P >

Base class from which concrete transformers derive.

Template Parameters
CThe type of data this node consumes.
PThe type of data this node produces.

Constructor & Destructor Documentation

template<typename C, typename P>
flow::transformer< C, P >::transformer ( const std::string &  name_r,
const size_t  ins,
const size_t  outs 
)
inline
Parameters
name_rThe name to give this node.
insNumbers of input pins.
outsNumbers of output pins.

Member Function Documentation

template<typename C, typename P>
virtual std::string flow::transformer< C, P >::rename ( const std::string &  name_r)
inlinevirtual

Overrides named::rename.

Ensures pins are also renamed.

Parameters
name_rNew name to give this node.

Reimplemented from flow::producer< P >.


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