31 #if defined(STLMapToVertexMapAdapter_RECURSES)
32 #error Recursive header files inclusion detected in STLMapToVertexMapAdapter.h
33 #else // defined(STLMapToVertexMapAdapter_RECURSES)
35 #define STLMapToVertexMapAdapter_RECURSES
37 #if !defined STLMapToVertexMapAdapter_h
39 #define STLMapToVertexMapAdapter_h
43 #include "DGtal/base/Common.h"
60 template <
typename TMap >
68 typedef typename Container::value_compare
Compare;
69 typedef typename Container::allocator_type
Allocator;
70 typedef typename Container::key_type
Vertex;
71 typedef typename Container::mapped_type
Value;
86 :
Container( first, last, comp, alloc ) {}
98 typename Container::const_iterator it = Container::find(v);
99 ASSERT( it != this->end() );
112 #endif // !defined STLMapToVertexMapAdapter_h
114 #undef STLMapToVertexMapAdapter_RECURSES
115 #endif // else defined(STLMapToVertexMapAdapter_RECURSES)
void setValue(Vertex v, Value val)
STLMapToVertexMapAdapter(STLMapToVertexMapAdapter &other)
STLMapToVertexMapAdapter(InputIterator first, InputIterator last, const Compare &comp=Compare(), const Allocator &alloc=Allocator())
STLMapToVertexMapAdapter< TMap > Self
DGtal is the top-level namespace which contains all DGtal functions and types.
Container::allocator_type Allocator
Container::value_compare Compare
Container::mapped_type Value
Container::key_type Vertex
Aim: This class adapts any map of the STL to match with the CVertexMap concept.
Value operator()(Vertex v)
STLMapToVertexMapAdapter()