DGtal  1.5.beta
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 94 of file OpInSTLContainers.h.

Member Typedef Documentation

◆ Iterator

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

Definition at line 98 of file OpInSTLContainers.h.

◆ ReverseIterator

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

Definition at line 99 of file OpInSTLContainers.h.

Member Function Documentation

◆ erase()

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

Definition at line 101 of file OpInSTLContainers.h.

104  {
105  //base iterator pointing to the same element
106  Iterator base = (++anIterator).base();
107  //base iterator pointing to the element that
108  //followed the erased element
109  base = aContainer.erase(base);
110  //reverse iterator pointing to the element that
111  //preceded the erased element
112  return ReverseIterator(base);
113  }

◆ insert()

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 115 of file OpInSTLContainers.h.

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

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