STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Attributes | List of all members
insert_iterator< _Container > Class Template Reference
Inheritance diagram for insert_iterator< _Container >:
iterator< _Category, _Ty, _Diff, _Pointer, _Reference >

Public Types

typedef insert_iterator< _Container > _Myt
 
typedef _Container container_type
 
typedef _Container::value_type _Valty
 
- Public Types inherited from iterator< _Category, _Ty, _Diff, _Pointer, _Reference >
typedef _Category iterator_category
 
typedef _Ty value_type
 
typedef _Diff difference_type
 
typedef _Pointer pointer
 
typedef _Reference reference
 

Public Member Functions

 insert_iterator (_Container &_Cont, typename _Container::iterator _Where)
 
_Mytoperator= (const _Valty &_Val)
 
_Mytoperator= (_Valty &&_Val)
 
_Mytoperator* ()
 
_Mytoperator++ ()
 
_Mytoperator++ (int)
 

Protected Attributes

_Container * container
 
_Container::iterator iter
 

Member Typedef Documentation

template<class _Container >
typedef insert_iterator<_Container> insert_iterator< _Container >::_Myt
template<class _Container >
typedef _Container::value_type insert_iterator< _Container >::_Valty
template<class _Container >
typedef _Container insert_iterator< _Container >::container_type

Constructor & Destructor Documentation

template<class _Container >
insert_iterator< _Container >::insert_iterator ( _Container &  _Cont,
typename _Container::iterator  _Where 
)
inline
144  : container(_STD addressof(_Cont)), iter(_Where)
145  { // construct with container and iterator
146  }
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
_Container::iterator iter
Definition: iterator:179
_Container * container
Definition: iterator:178

Member Function Documentation

template<class _Container >
_Myt& insert_iterator< _Container >::operator* ( )
inline
163  { // pretend to return designated value
164  return (*this);
165  }
template<class _Container >
_Myt& insert_iterator< _Container >::operator++ ( )
inline
168  { // pretend to preincrement
169  return (*this);
170  }
template<class _Container >
_Myt& insert_iterator< _Container >::operator++ ( int  )
inline
173  { // pretend to postincrement
174  return (*this);
175  }
template<class _Container >
_Myt& insert_iterator< _Container >::operator= ( const _Valty _Val)
inline
149  { // insert into container and increment stored iterator
150  iter = container->insert(iter, _Val);
151  ++iter;
152  return (*this);
153  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Container::iterator iter
Definition: iterator:179
_Container * container
Definition: iterator:178
template<class _Container >
_Myt& insert_iterator< _Container >::operator= ( _Valty &&  _Val)
inline
156  { // push value into container
157  iter = container->insert(iter, _STD forward<_Valty>(_Val));
158  ++iter;
159  return (*this);
160  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Container::iterator iter
Definition: iterator:179
_Container * container
Definition: iterator:178

Member Data Documentation

template<class _Container >
_Container* insert_iterator< _Container >::container
protected
template<class _Container >
_Container::iterator insert_iterator< _Container >::iter
protected

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