Template Class buffered_insert_iterator

Inheritance Relationships

Base Type

Class Documentation

template <typename Container>
class buffered_insert_iterator : public shad::insert_iterator<Container>

Buffered insert iterator.

shad::buffered_insert_iterator is an OutputIterator that inserts elements into a distributed container for which it was constructed, at the position pointed to by the supplied iterator. The buffered insertion is performed whenever the iterator (whether dereferenced or not) is assigned to. The buffer to be flushed into the container when the flush() function is called. Incrementing the shad::buffered_insert_iterator is a no-op.

Template Parameters
  • Container: The type of the distributed container.

Public Types

template<>
using value_type = typename base_t::value_type
template<>
using container_type = typename base_t::container_type

Public Functions

buffered_insert_iterator(Container &container, Iterator iterator)

Constructor.

Parameters
  • container: The container into which the iterator inserts.
  • iterator: The position at which the iterator starts to insert.

buffered_insert_iterator &operator=(const value_type &value)

The assignment operator.

The assignment operator inserts a value (through buffering) and advance iterator.

Return
A self reference.
Parameters
  • value: A const reference to the value to be inserted.

void wait()

Wait for pending insertions to the container.

void flush()

Flushes pending insertions to the container.

buffered_insert_iterator &operator*()
buffered_insert_iterator &operator++()
buffered_insert_iterator &operator++(int)