TPIE

2362a60
tpie::pipelining::internal_passive_buffer< T > Class Template Reference

Internal fifo buffer. More...

#include <tpie/pipelining/internal_buffer.h>

Public Types

typedef T item_type
 
typedef
bits::internal_buffer_input_t
< T > 
input_t
 
typedef
bits::internal_buffer_pull_output_t
< T > 
output_t
 

Public Member Functions

 internal_passive_buffer (size_t size, size_t additional_item_size=0)
 Construct a factory for the buffer. More...
 
input_t raw_input ()
 
output_t raw_output ()
 
inputpipe_t input ()
 Return pipe node where items are pushed into the buffer Pushing items into a full buffer causes undefined behaviour. More...
 
outputpipe_t output ()
 Return pipe node where items in the buffer can be pulled from Pulling from the empty buffer causes undefined behaviour. More...
 

Detailed Description

template<typename T>
class tpie::pipelining::internal_passive_buffer< T >

Internal fifo buffer.

Represents an internal buffer with limited capacity.

Definition at line 105 of file internal_buffer.h.

Constructor & Destructor Documentation

template<typename T >
tpie::pipelining::internal_passive_buffer< T >::internal_passive_buffer ( size_t  size,
size_t  additional_item_size = 0 
)
inline

Construct a factory for the buffer.

Note
The factory may be destroied after input and output has been called, it does not need to stay around util after the nodes have been destroied.
Parameters
sizeThe maximal number of elements the buffer will hold.
additional_item_sizeif itemas have a size different then sizeof(T), say if the malloc stuff internally, this additional size will be accounted for per element

Definition at line 129 of file internal_buffer.h.

130  : size(size)
131  , additional_item_size(additional_item_size) {}

Member Function Documentation

template<typename T >
inputpipe_t tpie::pipelining::internal_passive_buffer< T >::input ( )
inline

Return pipe node where items are pushed into the buffer Pushing items into a full buffer causes undefined behaviour.

Definition at line 145 of file internal_buffer.h.

145  {
146  return inputfact_t(input_token, size, additional_item_size);
147  }
template<typename T >
outputpipe_t tpie::pipelining::internal_passive_buffer< T >::output ( )
inline

Return pipe node where items in the buffer can be pulled from Pulling from the empty buffer causes undefined behaviour.

Definition at line 153 of file internal_buffer.h.

153  {
154  return outputfact_t(input_token);
155  }

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