DGtal  1.3.beta
CPrimitiveComputer.h
1 
17 #pragma once
18 
31 #if defined(CPrimitiveComputer_RECURSES)
32 #error Recursive header files inclusion detected in CPrimitiveComputer.h
33 #else // defined(CPrimitiveComputer_RECURSES)
34 
35 #define CPrimitiveComputer_RECURSES
36 
37 #if !defined CPrimitiveComputer_h
38 
39 #define CPrimitiveComputer_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "boost/concept_check.hpp"
46 #include "DGtal/base/ConceptUtils.h"
48 
49 // @since 0.8 In DGtal::concepts
50 namespace DGtal {
51  namespace concepts {
52 
54  // class CPrimitiveComputer
94  template <typename T>
96  {
97  // ----------------------- Concept checks ------------------------------
98  public:
99  // Inner types
100  typedef typename T::Primitive Primitive;
101  typedef typename T::Space Space;
102 
103  // Methods
105  {
107  }
109  {
110  ConceptUtils::sameType( myP, myX.primitive() );
111  }
112  // ------------------------- Private Datas --------------------------------
113  private:
114  T myX; // only if T is default constructible.
116 
117  // ------------------------- Internals ------------------------------------
118  private:
119 
120  }; // end of concept CPrimitiveComputer
121 
122 } // namespace concepts
123 } // namespace DGtal
124 
125 // //
127 
128 #endif // !defined CPrimitiveComputer_h
129 
130 #undef CPrimitiveComputer_RECURSES
131 #endif // else defined(CPrimitiveComputer_RECURSES)
boost::DefaultConstructible
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition: Boost.dox:30
DGtal::concepts::CPrimitiveComputer::myX
T myX
Definition: CPrimitiveComputer.h:114
DGtal::concepts::CPrimitiveComputer::checkConstConstraints
void checkConstConstraints() const
Definition: CPrimitiveComputer.h:108
DGtal::concepts::CPrimitiveComputer::Space
T::Space Space
Definition: CPrimitiveComputer.h:101
DGtal::concepts::CPrimitiveComputer
Aim: Defines the concept describing an object that computes some primitive from input points,...
Definition: CPrimitiveComputer.h:95
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
boost::CopyConstructible
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal::concepts::CPrimitiveComputer::Primitive
T::Primitive Primitive
Definition: CPrimitiveComputer.h:100
Space
SpaceND< 2 > Space
Definition: testSimpleRandomAccessRangeFromPoint.cpp:42
boost::Assignable
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition: Boost.dox:32
DGtal::concepts::CPrimitiveComputer::myP
Primitive myP
Definition: CPrimitiveComputer.h:115
DGtal::concepts::CPrimitiveComputer::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CPrimitiveComputer)
Definition: CPrimitiveComputer.h:104