DGtal  0.9.3beta
Public Types | Public Member Functions
DGtal::STLMapToVertexMapAdapter< TMap > Class Template Reference

#include <DGtal/graph/STLMapToVertexMapAdapter.h>

Inheritance diagram for DGtal::STLMapToVertexMapAdapter< TMap >:
[legend]
Collaboration diagram for DGtal::STLMapToVertexMapAdapter< TMap >:
[legend]

Public Types

typedef STLMapToVertexMapAdapter< TMap > Self
 
typedef TMap Container
 
typedef Container::value_compare Compare
 
typedef Container::allocator_type Allocator
 
typedef Container::key_type Vertex
 
typedef Container::mapped_type Value
 

Public Member Functions

 STLMapToVertexMapAdapter ()
 
template<class InputIterator >
 STLMapToVertexMapAdapter (InputIterator first, InputIterator last, const Compare &comp=Compare(), const Allocator &alloc=Allocator())
 
 STLMapToVertexMapAdapter (STLMapToVertexMapAdapter &other)
 
void setValue (Vertex v, Value val)
 
Value operator() (Vertex v)
 

Detailed Description

template<typename TMap>
class DGtal::STLMapToVertexMapAdapter< TMap >

Aim: This class adapts any map of the STL to match with the CVertexMap concept.

Description of template class 'STLMapToVertexMapAdapter'

Template Parameters
TMapthe type of the associative container.

Definition at line 61 of file STLMapToVertexMapAdapter.h.

Member Typedef Documentation

template<typename TMap >
typedef Container::allocator_type DGtal::STLMapToVertexMapAdapter< TMap >::Allocator

Definition at line 69 of file STLMapToVertexMapAdapter.h.

template<typename TMap >
typedef Container::value_compare DGtal::STLMapToVertexMapAdapter< TMap >::Compare

Definition at line 68 of file STLMapToVertexMapAdapter.h.

template<typename TMap >
typedef TMap DGtal::STLMapToVertexMapAdapter< TMap >::Container

Definition at line 67 of file STLMapToVertexMapAdapter.h.

template<typename TMap >
typedef STLMapToVertexMapAdapter<TMap> DGtal::STLMapToVertexMapAdapter< TMap >::Self

Definition at line 66 of file STLMapToVertexMapAdapter.h.

template<typename TMap >
typedef Container::mapped_type DGtal::STLMapToVertexMapAdapter< TMap >::Value

Definition at line 71 of file STLMapToVertexMapAdapter.h.

template<typename TMap >
typedef Container::key_type DGtal::STLMapToVertexMapAdapter< TMap >::Vertex

Definition at line 70 of file STLMapToVertexMapAdapter.h.

Constructor & Destructor Documentation

template<typename TMap >
DGtal::STLMapToVertexMapAdapter< TMap >::STLMapToVertexMapAdapter ( )
inline
template<typename TMap >
template<class InputIterator >
DGtal::STLMapToVertexMapAdapter< TMap >::STLMapToVertexMapAdapter ( InputIterator  first,
InputIterator  last,
const Compare comp = Compare(),
const Allocator alloc = Allocator() 
)
inline

Definition at line 84 of file STLMapToVertexMapAdapter.h.

86  : Container( first, last, comp, alloc ) {}
template<typename TMap >
DGtal::STLMapToVertexMapAdapter< TMap >::STLMapToVertexMapAdapter ( STLMapToVertexMapAdapter< TMap > &  other)
inline

Definition at line 88 of file STLMapToVertexMapAdapter.h.

Member Function Documentation

template<typename TMap >
Value DGtal::STLMapToVertexMapAdapter< TMap >::operator() ( Vertex  v)
inline

Definition at line 96 of file STLMapToVertexMapAdapter.h.

97  {
98  typename Container::const_iterator it = Container::find(v);
99  ASSERT( it != this->end() );
100  return it->second;
101  }
template<typename TMap >
void DGtal::STLMapToVertexMapAdapter< TMap >::setValue ( Vertex  v,
Value  val 
)
inline

Definition at line 91 of file STLMapToVertexMapAdapter.h.

92  {
93  (*this)[v] = val;
94  }

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