DGtal
1.4.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
50
namespace
DGtal
51
{
52
namespace
concepts
53
{
55
// class CDomain
128
template
<
typename
T>
129
struct
CDomain
:
public
CConstSinglePassRange
<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
143
BOOST_CONCEPT_USAGE
(
CDomain
)
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.
150
ConceptUtils::sameType
(
mySize
,
myT
.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
157
ConceptUtils::sameType
(
myIt
,
myT
.begin(
myP
) );
158
159
160
}
161
162
// ------------------------- Private Datas --------------------------------
163
private
:
164
T
myT
;
165
Point
myP
;
166
Predicate
myPred
;
167
bool
myBool
;
168
Size
mySize
;
169
ConstIterator
myIt
;
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)
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition
ConceptUtils.h:117
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CConstSinglePassRange
Aim: Defines the concept describing a const single pass range.
Definition
CConstSinglePassRange.h:93
DGtal::concepts::CDomain
Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digit...
Definition
CDomain.h:130
DGtal::concepts::CDomain::Predicate
T::Predicate Predicate
Definition
CDomain.h:140
DGtal::concepts::CDomain::Domain
T::Domain Domain
Definition
CDomain.h:133
DGtal::concepts::CDomain::Integer
T::Integer Integer
Definition
CDomain.h:137
DGtal::concepts::CDomain::myBool
bool myBool
Definition
CDomain.h:167
DGtal::concepts::CDomain::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CDomain)
Definition
CDomain.h:143
DGtal::concepts::CDomain::Dimension
T::Dimension Dimension
Definition
CDomain.h:139
DGtal::concepts::CDomain::Space
T::Space Space
Definition
CDomain.h:134
DGtal::concepts::CDomain::Point
T::Point Point
Definition
CDomain.h:135
DGtal::concepts::CDomain::Size
T::Size Size
Definition
CDomain.h:138
DGtal::concepts::CDomain::myP
Point myP
Definition
CDomain.h:165
DGtal::concepts::CDomain::Vector
T::Vector Vector
Definition
CDomain.h:136
DGtal::concepts::CDomain::myT
T myT
Definition
CDomain.h:164
DGtal::concepts::CDomain::ConstIterator
T::ConstIterator ConstIterator
Definition
CDomain.h:141
DGtal::concepts::CDomain::myPred
Predicate myPred
Definition
CDomain.h:166
DGtal::concepts::CDomain::myIt
ConstIterator myIt
Definition
CDomain.h:169
DGtal::concepts::CDomain::mySize
Size mySize
Definition
CDomain.h:168
src
DGtal
kernel
domains
CDomain.h
Generated on Mon Jun 10 2024 17:36:03 for DGtal by
1.11.0