DGtal 1.3.0
Loading...
Searching...
No Matches
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)
35#define CPrimitiveComputer_RECURSES
36
37#if !defined CPrimitiveComputer_h
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
50namespace 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)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the concept describing an object that computes some primitive from input points,...
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition: Boost.dox:32
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition: Boost.dox:30