DGtal  0.9.2
CVertexMap.h
1 
17 #pragma once
18 
32 #if defined(CVertexMap_RECURSES)
33 #error Recursive header files inclusion detected in CVertexMap.h
34 #else // defined(CVertexMap_RECURSES)
35 
36 #define CVertexMap_RECURSES
37 
38 #if !defined CVertexMap_h
39 
40 #define CVertexMap_h
41 
43 // Inclusions
44 #include <iostream>
45 #include "DGtal/base/Common.h"
46 #include "DGtal/base/CPredicate.h"
47 #include "boost/concept_check.hpp"
49 
50 // @since 0.8 In DGtal::concepts
51 namespace DGtal {
52  namespace concepts {
53 
55  // class CVertexMap
95  template <typename T>
96  struct CVertexMap:
98  {
99  // ----------------------- Concept checks ------------------------------
100  public:
101  // 1. define first provided types (i.e. inner types), like
102  typedef typename T::Vertex Vertex;
103  typedef typename T::Value Value;
104 
105  // 2. then check the presence of data members, operators and methods with
107  {
108  ConceptUtils::sameType( myValue, myX.operator()(myVertex) );
109  myX.setValue(myVertex, myValue);
110  }
111 
112  // ------------------------- Private Datas --------------------------------
113  private:
114  T myX;
115  Vertex myVertex;
116  Value myValue;
117 
118  }; // end of concept CVertexMap
119 
120 } // namespace concepts
121 } // namespace DGtal
122 
123 // //
125 
126 #endif // !defined CVertexMap_h
127 
128 #undef CVertexMap_RECURSES
129 #endif // else defined(CVertexMap_RECURSES)
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition: Boost.dox:32
void sameType(const T &t1, const T &t2)
DGtal is the top-level namespace which contains all DGtal functions and types.
BOOST_CONCEPT_USAGE(CVertexMap)
Definition: CVertexMap.h:106
Aim: models of CVertexMap concept implement mapping between graph vertices and values.
Definition: CVertexMap.h:96