Sierra Toolkit Version of the Day
eastl::insert_iterator< Container > Class Template Reference

#include <iterator_eastl.h>

Inherits eastl::iterator< Category, T, Distance, Pointer, Reference >.

List of all members.

Public Types

typedef Container container_type
typedef Container::iterator iterator_type
typedef Container::const_reference const_reference

Public Member Functions

insert_iteratoroperator= (const insert_iterator &x)
 insert_iterator (Container &x, iterator_type itNew)
insert_iteratoroperator= (const_reference value)
insert_iteratoroperator* ()
insert_iteratoroperator++ ()
insert_iteratoroperator++ (int)

Protected Attributes

Container & container
iterator_type it

Detailed Description

template<typename Container>
class eastl::insert_iterator< Container >


An insert_iterator is like an iterator except that when you assign a value to it, the insert_iterator inserts the value into the container and increments the iterator.

insert_iterator is an iterator adaptor that functions as an OutputIterator: assignment through an insert_iterator inserts an object into a container. Specifically, if ii is an insert_iterator, then ii keeps track of a container c and an insertion point p; the expression *ii = x performs the insertion c.insert(p, x).

If you assign through an insert_iterator several times, then you will be inserting several elements into the underlying container. In the case of a sequence, they will appear at a particular location in the underlying sequence, in the order in which they were inserted: one of the arguments to insert_iterator's constructor is an iterator p, and the new range will be inserted immediately before p.

Definition at line 429 of file iterator_eastl.h.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines