Object that represents a node inlet. More...
#include <node.h>
Public Member Functions | |
inpin (const std::string &name_r, std::condition_variable *transition_cv_p, std::mutex *transition_m_p) | |
Constructor. | |
virtual std::string | rename (const std::string &name_r) |
Overrides named::rename. | |
virtual bool | peek () const |
Check whether a packet is in the pipe. | |
virtual std::unique_ptr < packet< T > > | pop () |
Extracts a packet from the pipe. | |
virtual void | incoming () |
Notifies this pin that a packet has been queued to the pipe. | |
Public Member Functions inherited from flow::pin< T > | |
pin (const std::string &name_r) | |
pin (const pin< T > &o) | |
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. | |
Friends | |
class | consumer< T > |
Additional Inherited Members | |
Protected Attributes inherited from flow::pin< T > | |
std::shared_ptr< std::pair < pipe< T >, std::unique_ptr < std::mutex > > > | d_pipe_sp |
Shared ownership of a pipe with the pin to which this pin is connected. | |
Object that represents a node inlet.
Nodes that consume packets, i.e. transformers and consumers, have at least one inpin.
|
inline |
Constructor.
name_r | The name to give this node. |
transition_cv_p | Pointer to the node's transition condition_variable. |
transition_m_p | Pointer to the node's transition mutex. |
|
inlinevirtual |
Overrides named::rename.
Ensures pipe is also renamed.
name_r | New name to give this inpin. |
Reimplemented from flow::named.
|
inlinevirtual |
Check whether a packet is in the pipe.
false
if there is no pipe or the pipe is empty, true
otherwise.
|
inlinevirtual |
Extracts a packet from the pipe.
|
inlinevirtual |
Notifies this pin that a packet has been queued to the pipe.
When a producing node has moved a packet to the pipe, that node's outpin will call this function on the connected inpin. If this inpin's owning node state is flow::started, it touches the state signal the node there is a packet to be consumed.