Nugget
Public Types | Public Member Functions | Protected Attributes | List of all members
eastl::insert_iterator< Container > Class Template Reference

#include <iterator.h>

Inheritance diagram for eastl::insert_iterator< Container >:
Inheritance graph
[legend]
Collaboration diagram for eastl::insert_iterator< Container >:
Collaboration graph
[legend]

Public Types

typedef Container container_type
 
typedef Container::iterator iterator_type
 
typedef Container::const_reference const_reference
 
- Public Types inherited from eastl::iterator< EASTL_ITC_NS::output_iterator_tag, void, void, void, void >
typedef EASTL_ITC_NS::output_iterator_tag iterator_category
 
typedef void value_type
 
typedef void difference_type
 
typedef void pointer
 
typedef void 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 >

insert_iterator

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 container.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.


The documentation for this class was generated from the following file: