DGtal  0.9.3beta
Public Types | Static Public Member Functions
DGtal::OpInSTLContainers< Container, std::reverse_iterator< typename Container::iterator > > Struct Template Reference

#include <DGtal/base/OpInSTLContainers.h>

Public Types

typedef Container::iterator Iterator
 
typedef std::reverse_iterator< typename Container::iterator > ReverseIterator
 

Static Public Member Functions

static ReverseIterator erase (Container &aContainer, ReverseIterator &anIterator)
 
static ReverseIterator insert (Container &aContainer, ReverseIterator &anIterator, const typename Container::value_type &aValue)
 

Detailed Description

template<typename Container>
struct DGtal::OpInSTLContainers< Container, std::reverse_iterator< typename Container::iterator > >

Definition at line 92 of file OpInSTLContainers.h.

Member Typedef Documentation

template<typename Container >
typedef Container::iterator DGtal::OpInSTLContainers< Container, std::reverse_iterator< typename Container::iterator > >::Iterator

Definition at line 96 of file OpInSTLContainers.h.

template<typename Container >
typedef std::reverse_iterator<typename Container::iterator> DGtal::OpInSTLContainers< Container, std::reverse_iterator< typename Container::iterator > >::ReverseIterator

Definition at line 97 of file OpInSTLContainers.h.

Member Function Documentation

template<typename Container >
static ReverseIterator DGtal::OpInSTLContainers< Container, std::reverse_iterator< typename Container::iterator > >::erase ( Container &  aContainer,
ReverseIterator anIterator 
)
inlinestatic

Definition at line 99 of file OpInSTLContainers.h.

102  {
103  //base iterator pointing to the same element
104  Iterator base = (++anIterator).base();
105  //base iterator pointing to the element that
106  //followed the erased element
107  base = aContainer.erase(base);
108  //reverse iterator pointing to the element that
109  //preceded the erased element
110  return ReverseIterator(base);
111  }
template<typename Container >
static ReverseIterator DGtal::OpInSTLContainers< Container, std::reverse_iterator< typename Container::iterator > >::insert ( Container &  aContainer,
ReverseIterator anIterator,
const typename Container::value_type &  aValue 
)
inlinestatic

Definition at line 113 of file OpInSTLContainers.h.

117  {
118  Iterator base = aContainer.insert(anIterator.base(), aValue);
119  return ReverseIterator(base);
120  }

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