#include <common.h>
Inheritance diagram for rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >:
Public Types | |
typedef oi_base::flush_iterator_t | flush_iterator_t |
Public Member Functions | |
obuf_iterator (typename oi_base::container_ref_t anObj, typename Carray_to_iterator< IterBuf >::iterator iterBuf, Mutex *aMtx, size_t aMaxSzBuf) | |
Adjusts the desired buffer'size to this buffer type's maximum. | |
bool | operator!= (const obuf_iterator &refOI) const |
For checking the reutnr value of rpa::transform etc... | |
IterOut | flush_itr (typename oi_base::flush_buffer_t &aBufRef, flush_iterator_t aEnd) |
IterOut | flush_all (typename oi_base::flush_buffer_t &aBufRef) |
Private Types | |
typedef obuf_base< IterOut, Buffer > | oi_base |
typedef obuf_storage< Buffer, IterBuf > | oi_storage |
typedef obuf_guard< Mutex > | oi_guard |
General case. This class must also manages the various combinations of parameters for the constructors. This iterator is not made to be used as a replacement of std::back_insert_iterator in the general case, but only when template specializations can use it in the algorithm. It could, but it would make things confusing. Therefore, if the compiler complains with missing operators '++' and '*', it means that it could not select a useful behaviour and then, you should use a plain std::back_insert_iterator. This will typically happen when using a range_avoid in input.
typedef oi_base::flush_iterator_t rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >::flush_iterator_t |
Reimplemented from rpa::obuf_base< IterOut, Buffer >.
typedef obuf_base< IterOut, Buffer > rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >::oi_base [private] |
typedef obuf_guard< Mutex > rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >::oi_guard [private] |
typedef obuf_storage< Buffer, IterBuf > rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >::oi_storage [private] |
rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >::obuf_iterator | ( | typename oi_base::container_ref_t | anObj, | |
typename Carray_to_iterator< IterBuf >::iterator | iterBuf, | |||
Mutex * | aMtx, | |||
size_t | aMaxSzBuf | |||
) | [inline] |
Adjusts the desired buffer'size to this buffer type's maximum.
Beware : REFERENCE of a container. But value for ostream_iterator.
IterOut rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >::flush_all | ( | typename oi_base::flush_buffer_t & | aBufRef | ) | [inline] |
IterOut rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >::flush_itr | ( | typename oi_base::flush_buffer_t & | aBufRef, | |
flush_iterator_t | aEnd | |||
) | [inline] |
Called when destructing a slice : The results collected into the buffer (or buffer reference) of the slice must be written into the external output iterator. Maybe with a lock. The parameter will always be a slice buffer reference.
Fixed-size buffers must always be protected by a mutex, because the flush is done at reduction time, when all sub-threads are not yet finished, and may still write into the output buffer.
bool rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex >::operator!= | ( | const obuf_iterator< IterOut, Buffer, IterBuf, Mutex > & | refOI | ) | const [inline] |
For checking the reutnr value of rpa::transform etc...