Template Class buffered_insert_iterator¶
- Defined in File iterator.h
Inheritance Relationships¶
Base Type¶
public shad::insert_iterator< Container >
(Template Class insert_iterator)
Class Documentation¶
-
template <typename Container>
classbuffered_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<>
usingvalue_type
= typename base_t::value_type¶
-
template<>
usingcontainer_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)¶