DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CAdjacency.h
1 
17 #pragma once
18 
31 #if defined(CAdjacency_RECURSES)
32 #error Recursive header files inclusion detected in CAdjacency.h
33 #else // defined(CAdjacency_RECURSES)
34 
35 #define CAdjacency_RECURSES
36 
37 #if !defined CAdjacency_h
38 
39 #define CAdjacency_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <vector>
45 #include "boost/concept_check.hpp"
46 #include "DGtal/base/ConceptUtils.h"
47 #include "DGtal/base/Common.h"
48 #include "DGtal/topology/CUndirectedSimpleLocalGraph.h"
50 
51 namespace DGtal
52 {
53 
55  // class CAdjacency
135  template <typename Adj>
136  struct CAdjacency :
138  {
139  // ----------------------- Concept checks ------------------------------
140  public:
141 
142  typedef typename Adj::Space Space;
143  typedef typename Adj::Point Point;
144  typedef typename Adj::Adjacency Adjacency;
145 
147  {
148  // check isAdjacentTo
149  ConceptUtils::sameType( myBool, myAdj.isAdjacentTo( myP1, myP2 ) );
150  // check isProperlyAdjacentTo
152  myAdj.isProperlyAdjacentTo( myP1, myP2 ) );
153  }
154 
155  // ------------------------- Private Datas --------------------------------
156  private:
157  Adj myAdj;
160  bool myBool;
161  std::back_insert_iterator< std::vector<Point> > myInserter;
162 
163  // ------------------------- Internals ------------------------------------
164  private:
165 
166  }; // end of concept CAdjacency
167 
168 } // namespace DGtal
169 
170 // //
172 
173 #endif // !defined CAdjacency_h
174 
175 #undef CAdjacency_RECURSES
176 #endif // else defined(CAdjacency_RECURSES)