DGtal  0.9.2
CSpace.h
1 
17 #pragma once
18 
34 #if defined(CSpace_RECURSES)
35 #error Recursive header files inclusion detected in CSpace.h
36 #else // defined(CSpace_RECURSES)
37 
38 #define CSpace_RECURSES
39 
40 #if !defined CSpace_h
41 
42 #define CSpace_h
43 
45 // Inclusions
46 #include <iostream>
47 #include "DGtal/base/Common.h"
48 #include "DGtal/base/ConceptUtils.h"
49 #include "DGtal/kernel/CInteger.h"
50 #include "DGtal/kernel/CUnsignedNumber.h"
51 #include "DGtal/kernel/CIntegralNumber.h"
52 #include "DGtal/kernel/NumberTraits.h"
54 
55 namespace DGtal
56 {
57  namespace concepts
58  {
60  // class CSpace
104  template <typename T>
105  struct CSpace
106  {
107  // ----------------------- Concept checks ------------------------------
108  public:
109  typedef typename T::Space Space;
110  typedef typename T::Integer Integer;
111  typedef typename T::Point Point;
112  typedef typename T::Vector Vector;
113  typedef typename T::Dimension Dimension;
114  typedef typename T::Size Size;
115  typedef typename T::RealPoint RealPoint;
116  typedef typename T::RealVector RealVector;
122 
124  {
125  //Should have a static dimension.
126  ConceptUtils::sameType( myDim, T::dimension );
127  }
128 
129  // ------------------------- Private Datas --------------------------------
130  private:
131  Dimension myDim;
132 
133  // ------------------------- Internals ------------------------------------
134  private:
135 
136  }; // end of concept CSpace
137  }
138 } // namespace DGtal
139 
140 
141 
142 // //
144 
145 #endif // !defined CSpace_h
146 
147 #undef CSpace_RECURSES
148 #endif // else defined(CSpace_RECURSES)
Aim: Concept checking for Unsigned numbers. Models of this concept should be listed in NumberTraits c...
T::Integer Integer
Definition: CSpace.h:110
BOOST_CONCEPT_USAGE(CSpace)
Definition: CSpace.h:123
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:87
BOOST_CONCEPT_ASSERT((CUnsignedNumber< Dimension >))
void sameType(const T &t1, const T &t2)
T::RealPoint RealPoint
Definition: CSpace.h:115
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines...
Definition: CSpace.h:105
Aim: Concept checking for Integral Numbers. Models of this concept should be listed in NumberTraits c...
DGtal is the top-level namespace which contains all DGtal functions and types.
T::RealVector RealVector
Definition: CSpace.h:116
T::Dimension Dimension
Definition: CSpace.h:113