#include <pipeline.h>
Inheritance diagram for rpa::pipe_circular< Container, void >:
Public Types | |
typedef container_traits< Container >::value_type | value_type |
typedef pipe_itr< value_type, reader > | iterator |
This is a synchronized iterator. It hangs until there is data to read. | |
Public Member Functions | |
pipe_circular () | |
pipe_circular (size_t maxNb) | |
template<class Iter> | |
pipe_circular (Iter begIter, Iter endIter) | |
pipe_circular (const Container &aCont) | |
iterator | begin (void) |
These two iterators can be used into algorithm of std. | |
iterator | end (void) |
Private Types | |
typedef pipe_container< Container > | pip_cont_t |
typedef container_traits< Container >::iterator | intrn_iter |
Private Member Functions | |
void | init (void) |
Common init to all constructors. | |
Private Attributes | |
intrn_iter | _it_rd |
intrn_iter | _it_end |
bool | _shut |
Classes | |
class | reader |
Models how to read from a circular pipe without condition variable. More... |
It cannot be blocking, and it sends an exception as soon as there is an extra element it cannot store.
typedef container_traits< Container >::iterator rpa::pipe_circular< Container, void >::intrn_iter [private] |
typedef pipe_itr< value_type, reader > rpa::pipe_circular< Container, void >::iterator |
This is a synchronized iterator. It hangs until there is data to read.
Reimplemented from rpa::pipe_container< Container >.
typedef pipe_container< Container > rpa::pipe_circular< Container, void >::pip_cont_t [private] |
typedef container_traits< Container >::value_type rpa::pipe_circular< Container, void >::value_type |
rpa::pipe_circular< Container, void >::pipe_circular | ( | ) | [inline] |
rpa::pipe_circular< Container, void >::pipe_circular | ( | size_t | maxNb | ) | [inline] |
This simply initialises the pipe as empty, with a given size. the pipe will never grow bigger.
rpa::pipe_circular< Container, void >::pipe_circular | ( | Iter | begIter, | |
Iter | endIter | |||
) | [inline] |
This inititializes the pipe as full, with this range of data. Its size is the size of the range.
rpa::pipe_circular< Container, void >::pipe_circular | ( | const Container & | aCont | ) | [inline] |
This initializes the pipe with the content of this container which is copied. The pipe will never be bigger.
iterator rpa::pipe_circular< Container, void >::begin | ( | void | ) | [inline] |
These two iterators can be used into algorithm of std.
Reimplemented from rpa::pipe_container< Container >.
iterator rpa::pipe_circular< Container, void >::end | ( | void | ) | [inline] |
Reimplemented from rpa::pipe_container< Container >.
void rpa::pipe_circular< Container, void >::init | ( | void | ) | [inline, private] |
Common init to all constructors.
intrn_iter rpa::pipe_circular< Container, void >::_it_end [private] |
intrn_iter rpa::pipe_circular< Container, void >::_it_rd [private] |
bool rpa::pipe_circular< Container, void >::_shut [private] |
If this is set, when threads are waiting for data and the pipe is empty, they will consider that the pipe will never have data anymore. Otherwise, they will simply wait.