BRE12
Public Types | Public Member Functions | Protected Member Functions | List of all members
tbb::thread_bound_filter Class Reference

A stage in a pipeline served by a user thread. More...

#include <pipeline.h>

Inheritance diagram for tbb::thread_bound_filter:
tbb::filter

Public Types

enum  result_type { success, item_not_available, end_of_stream }
 
- Public Types inherited from tbb::filter
enum  mode { parallel = current_version | filter_is_out_of_order, serial_in_order = current_version | filter_is_serial, serial_out_of_order = current_version | filter_is_serial | filter_is_out_of_order, serial = serial_in_order }
 

Public Member Functions

result_type __TBB_EXPORTED_METHOD try_process_item ()
 If a data item is available, invoke operator() on that item. More...
 
result_type __TBB_EXPORTED_METHOD process_item ()
 Wait until a data item becomes available, and invoke operator() on that item. More...
 
- Public Member Functions inherited from tbb::filter
bool is_serial () const
 True if filter is serial.
 
bool is_ordered () const
 True if filter must receive stream in order.
 
bool is_bound () const
 True if filter is thread-bound.
 
bool object_may_be_null ()
 true if an input filter can emit null
 
virtual void * operator() (void *item)=0
 Operate on an item from the input stream, and return item for output stream. More...
 
virtual __TBB_EXPORTED_METHOD ~filter ()
 Destroy filter. More...
 
virtual void finalize (void *)
 Destroys item if pipeline was cancelled. More...
 

Protected Member Functions

 thread_bound_filter (mode filter_mode)
 
- Protected Member Functions inherited from tbb::filter
 filter (bool is_serial_)
 
 filter (mode filter_mode)
 
void __TBB_EXPORTED_METHOD set_end_of_input ()
 

Additional Inherited Members

- Static Protected Attributes inherited from tbb::filter
static const unsigned char filter_is_serial = 0x1
 The lowest bit 0 is for parallel vs. serial.
 
static const unsigned char filter_is_out_of_order = 0x1<<4
 4th bit distinguishes ordered vs unordered filters. More...
 
static const unsigned char filter_is_bound = 0x1<<5
 5th bit distinguishes thread-bound and regular filters.
 
static const unsigned char filter_may_emit_null = 0x1<<6
 6th bit marks input filters emitting small objects
 
static const unsigned char exact_exception_propagation
 7th bit defines exception propagation mode expected by the application. More...
 
static const unsigned char current_version = __TBB_PIPELINE_VERSION(5)
 
static const unsigned char version_mask = 0x7<<1
 

Detailed Description

A stage in a pipeline served by a user thread.

Member Function Documentation

§ process_item()

result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::process_item ( )

Wait until a data item becomes available, and invoke operator() on that item.

This interface is blocking. Returns 'success' if an item was processed. Returns 'end_of_stream' if there are no more items to process. Never returns 'item_not_available', as it blocks until another return condition applies.

§ try_process_item()

result_type __TBB_EXPORTED_METHOD tbb::thread_bound_filter::try_process_item ( )

If a data item is available, invoke operator() on that item.

This interface is non-blocking. Returns 'success' if an item was processed. Returns 'item_not_available' if no item can be processed now but more may arrive in the future, or if token limit is reached. Returns 'end_of_stream' if there are no more items to process.


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