dune-common  2.2.0
Public Types | Public Member Functions
Dune::IteratorPropertyMap< RAI, IM, T, R > Class Template Reference

Adapter to turn a random access iterator into a property map. More...

#include <dune/common/propertymap.hh>

Inheritance diagram for Dune::IteratorPropertyMap< RAI, IM, T, R >:
Dune::RAPropertyMapHelper< R, IteratorPropertyMap< RAI, IM, T, R > >

List of all members.

Public Types

typedef RAI RandomAccessIterator
 The type of the random access iterator.
typedef IM IndexMap
 The type of the index map.
typedef IndexMap::KeyType KeyType
 The key type of the property map.
typedef T ValueType
 The value type of the property map.
typedef R Reference
 The reference type of the property map.
typedef LvaluePropertyMapTag Category
 The category of this property map.

Public Member Functions

 IteratorPropertyMap (RandomAccessIterator iter, const IndexMap &im=IndexMap())
 Constructor.
 IteratorPropertyMap ()
 Constructor.
Reference operator[] (KeyType key) const
 Access the a value by reference.

Detailed Description

template<class RAI, class IM, class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
class Dune::IteratorPropertyMap< RAI, IM, T, R >

Adapter to turn a random access iterator into a property map.


Member Typedef Documentation

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef LvaluePropertyMapTag Dune::IteratorPropertyMap< RAI, IM, T, R >::Category

The category of this property map.

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef IM Dune::IteratorPropertyMap< RAI, IM, T, R >::IndexMap

The type of the index map.

This will convert the KeyType to std::ptrdiff_t via operator[]().

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef IndexMap::KeyType Dune::IteratorPropertyMap< RAI, IM, T, R >::KeyType

The key type of the property map.

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef RAI Dune::IteratorPropertyMap< RAI, IM, T, R >::RandomAccessIterator

The type of the random access iterator.

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef R Dune::IteratorPropertyMap< RAI, IM, T, R >::Reference

The reference type of the property map.

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef T Dune::IteratorPropertyMap< RAI, IM, T, R >::ValueType

The value type of the property map.


Constructor & Destructor Documentation

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
Dune::IteratorPropertyMap< RAI, IM, T, R >::IteratorPropertyMap ( RandomAccessIterator  iter,
const IndexMap im = IndexMap() 
) [inline]

Constructor.

Parameters:
iterThe random access iterator that provides the mapping.
imThe index map that maps the KeyType to the difference_type of the iterator.
template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
Dune::IteratorPropertyMap< RAI, IM, T, R >::IteratorPropertyMap ( ) [inline]

Constructor.


Member Function Documentation

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
Reference Dune::IteratorPropertyMap< RAI, IM, T, R >::operator[] ( KeyType  key) const [inline]

Access the a value by reference.


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