Forwards messages only if the threshold has not been reached. More...
#include <flow_graph.h>
Public Types | |
typedef T | input_type |
typedef T | output_type |
typedef sender< input_type > | predecessor_type |
typedef receiver< output_type > | successor_type |
Public Types inherited from tbb::flow::interface7::receiver< T > | |
typedef T | input_type |
The input type of this receiver. | |
typedef sender< T > | predecessor_type |
The predecessor type for this node. | |
Public Types inherited from tbb::flow::interface7::sender< T > | |
typedef T | output_type |
The output type of this sender. | |
typedef receiver< T > | successor_type |
The successor type for this node. | |
Public Member Functions | |
limiter_node (graph &g, size_t threshold, int num_decrement_predecessors=0) | |
Constructor. | |
limiter_node (const limiter_node &src) | |
Copy constructor. | |
void | set_name (const char *name) |
bool | register_successor (receiver< output_type > &r) |
Replace the current successor with this new successor. | |
bool | remove_successor (receiver< output_type > &r) |
Removes a successor from this node. More... | |
bool | register_predecessor (predecessor_type &src) |
Adds src to the list of cached predecessors. | |
bool | remove_predecessor (predecessor_type &src) |
Removes src from the list of cached predecessors. | |
Public Member Functions inherited from tbb::flow::interface7::graph_node | |
graph_node (graph &g) | |
Public Member Functions inherited from tbb::flow::interface7::receiver< T > | |
virtual | ~receiver () |
Destructor. | |
bool | try_put (const T &t) |
Put an item to the receiver. | |
Public Member Functions inherited from tbb::flow::interface7::sender< T > | |
virtual bool | try_get (T &) |
Request an item from the sender. | |
virtual bool | try_reserve (T &) |
Reserves an item in the sender. | |
virtual bool | try_release () |
Releases the reserved item. | |
virtual bool | try_consume () |
Consumes the reserved item. | |
Public Attributes | |
internal::decrementer < limiter_node< T > > | decrement |
The internal receiver< continue_msg > that decrements the count. | |
Protected Member Functions | |
task * | try_put_task (const T &t) |
Puts an item to this receiver. | |
void | reset () |
void | reset_receiver () |
Protected Member Functions inherited from tbb::flow::interface7::receiver< T > | |
virtual bool | is_continue_receiver () |
Additional Inherited Members | |
Protected Attributes inherited from tbb::flow::interface7::graph_node | |
graph & | my_graph |
graph_node * | next |
graph_node * | prev |
Forwards messages only if the threshold has not been reached.
This node forwards items until its threshold is reached. It contains no buffering. If the downstream node rejects, the message is dropped.
|
inlinevirtual |
Removes a successor from this node.
r.remove_predecessor(*this) is also called.
Implements tbb::flow::interface7::sender< T >.