DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions
DGtal::STLMapToVertexMapAdapter< TMap > Class Template Reference

#include <STLMapToVertexMapAdapter.h>

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

Definition at line 82 of file STLMapToVertexMapAdapter.h.

: Container() {}
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.

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

Definition at line 88 of file STLMapToVertexMapAdapter.h.

: Container( other ) {}

Member Function Documentation

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

Definition at line 96 of file STLMapToVertexMapAdapter.h.

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

Definition at line 91 of file STLMapToVertexMapAdapter.h.

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

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