DGtal 1.3.0
Loading...
Searching...
No Matches
CDomain.h
1
17#pragma once
18
31#if defined(CDomain_RECURSES)
32#error Recursive header files inclusion detected in CDomain.h
33#else // defined(CDomain_RECURSES)
35#define CDomain_RECURSES
36
37#if !defined CDomain_h
39#define CDomain_h
40
42// Inclusions
43#include <iostream>
44#include "boost/concept_check.hpp"
45#include "DGtal/base/Common.h"
46#include "DGtal/base/ConceptUtils.h"
47#include "DGtal/base/CConstSinglePassRange.h"
49
50namespace DGtal
51{
52 namespace concepts
53 {
55 // class CDomain
128 template <typename T>
130 {
131 // ----------------------- Concept checks ------------------------------
132 public:
133 typedef typename T::Domain Domain;
134 typedef typename T::Space Space;
135 typedef typename T::Point Point;
136 typedef typename T::Vector Vector;
137 typedef typename T::Integer Integer;
138 typedef typename T::Size Size;
139 typedef typename T::Dimension Dimension;
140 typedef typename T::Predicate Predicate;
141 typedef typename T::ConstIterator ConstIterator;
142
144 {
145 // Domain should have a lowerBound() returning a Point.
146 ConceptUtils::sameType( myP, myT.lowerBound() );
147 // Domain should have an upperBound() returning a Point.
148 ConceptUtils::sameType( myP, myT.upperBound() );
149 // Domain should have a size() returning a Size.
151 // Domain should have a isInside(p) returning a bool.
152 ConceptUtils::sameType( myBool, myT.isInside( myP ) );
153 // Domain should have a predicate() returning a Predicate.
154 ConceptUtils::sameType( myPred, myT.predicate() );
155 // Domain should have a begin(Point) method returning an
156 // ConstIterator starting from Point
158
159
160 }
161
162 // ------------------------- Private Datas --------------------------------
163 private:
167 bool myBool;
170 // ------------------------- Internals ------------------------------------
171 private:
172
173 }; // end of concept CDomain
174 }
175} // namespace DGtal
176
177// //
179
180#endif // !defined CDomain_h
181
182#undef CDomain_RECURSES
183#endif // else defined(CDomain_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 a const single pass range.
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Definition: CDomain.h:130
T::Predicate Predicate
Definition: CDomain.h:140
BOOST_CONCEPT_USAGE(CDomain)
Definition: CDomain.h:143
T::Dimension Dimension
Definition: CDomain.h:139
T::ConstIterator ConstIterator
Definition: CDomain.h:141
ConstIterator myIt
Definition: CDomain.h:169