Template Class insert_iterator

Inheritance Relationships

Base Type

  • public std::iterator< std::output_iterator_tag, void, void, void, void >

Derived Type

Class Documentation

template <typename Container>
class insert_iterator : public std::iterator<std::output_iterator_tag, void, void, void, void>

Insert iterator (over a shad container).

shad::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. Incrementing the shad::buffered_insert_iterator is a no-op.

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

Subclassed by shad::buffered_insert_iterator< Container >

Public Types

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

Public Functions

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.

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.

insert_iterator &operator*()
insert_iterator &operator++()
insert_iterator &operator++(int)

Protected Types

template<>
using Iterator = typename Container::iterator
template<>
using internal_container_t = typename Container::internal_container_t

Protected Attributes

internal_container_t::ObjectID global_id_
Iterator iterator_
internal_container_t *local_container_ptr_ = nullptr
rt::Locality locality_ = {rt::numLocalities()}