DGtal  1.3.beta
CDomainArchetype.h
1 
17 #pragma once
18 
19 #ifndef _MSC_VER
20 #pragma GCC diagnostic ignored "-Wunused-parameter"
21 #endif
22 
23 
36 #if defined(CDomainArchetype_RECURSES)
37 #error Recursive header files inclusion detected in CDomainArchetype.h
38 #else // defined(CDomainArchetype_RECURSES)
39 
40 #define CDomainArchetype_RECURSES
41 
42 #if !defined CDomainArchetype_h
43 
44 #define CDomainArchetype_h
45 
47 // Inclusions
48 #include <iostream>
49 #include <set>
50 #include <string>
51 #include "DGtal/base/Common.h"
52 #include "DGtal/kernel/domains/CDomain.h"
54 
55 namespace DGtal
56 {
57  namespace concepts
58  {
60  // template class CDomainArchetype
70  template <typename TSpace>
72  {
73  public:
74 
75  // ----------------------- associated types -------------------------------
76  public:
78  typedef TSpace Space;
79  typedef typename Space::Integer Integer;
80  typedef typename Space::Point Point;
81  typedef typename Space::Vector Vector;
82  typedef typename Space::Size Size;
83  typedef typename Space::Dimension Dimension;
88  typedef int Predicate;
92  typedef int DigitalSet;
93 
94  // ----------------------- Standard services ------------------------------
95  public:
96 
101 
106  CDomainArchetype ( const DigitalSet & aSet ) {}
107 
108 
113  CDomainArchetype ( const CDomainArchetype & other ) {}
114 
115  // ----------------------- Domain services --------------------------------
116  public:
117 
122  { return DummyObject<ConstIterator>::get(); }
123 
128  { return DummyObject<ConstIterator>::get(); }
129 
134  { return DummyObject<ConstIterator>::get(); }
135 
140  const Point &lowerBound() const
141  { return DummyObject<Point>::get(); }
142 
147  const Point &upperBound() const
148  { return DummyObject<Point>::get(); }
149 
154  Size size() const
155  { return DummyObject<Size>::get(); }
156 
161  bool isInside( const Point & p ) const
162  { return true; }
163 
164 
168  const Predicate & predicate() const
169  { return DummyObject<Predicate>::get(); }
170 
171 
172  // ----------------------- Interface --------------------------------------
173  public:
174 
179  void selfDisplay ( std::ostream & out ) const {}
180 
185  bool isValid() const { return true; }
186 
187  }; // end of class CDomainArchetype
188  }
189 } // namespace DGtal
190 
191 
192 // //
194 
195 #endif // !defined CDomainArchetype_h
196 
197 #undef CDomainArchetype_RECURSES
198 #endif // else defined(CDomainArchetype_RECURSES)
199 
200 
DGtal::DummyObject
Definition: ConceptUtils.h:86
DGtal::concepts::CDomainArchetype::lowerBound
const Point & lowerBound() const
Definition: CDomainArchetype.h:140
DGtal::concepts::CDomainArchetype::DigitalSet
int DigitalSet
Definition: CDomainArchetype.h:92
DGtal::concepts::CDomainArchetype::begin
ConstIterator begin(const Point &aPoint) const
Definition: CDomainArchetype.h:121
DGtal::SpaceND::Dimension
DGtal::Dimension Dimension
Copy of the type used for the dimension.
Definition: SpaceND.h:129
DGtal::concepts::CDomainArchetype::~CDomainArchetype
~CDomainArchetype()
Definition: CDomainArchetype.h:100
DGtal::concepts::CDomainArchetype::Predicate
int Predicate
Definition: CDomainArchetype.h:88
aPoint
const Point aPoint(3, 4)
DGtal::concepts::CDomainArchetype::Point
Space::Point Point
Definition: CDomainArchetype.h:80
DGtal::SpaceND::Size
size_t Size
Type used to represent sizes in the digital space.
Definition: SpaceND.h:107
DGtal::concepts::CDomainArchetype::upperBound
const Point & upperBound() const
Definition: CDomainArchetype.h:147
DGtal::concepts::CDomainArchetype::Integer
Space::Integer Integer
Definition: CDomainArchetype.h:79
DGtal::concepts::CDomainArchetype::Size
Space::Size Size
Definition: CDomainArchetype.h:82
DGtal::CConstBidirectionalIteratorArchetype
An archetype of ConstBidirectionalIterator.
Definition: BasicArchetypes.h:79
DGtal::concepts::CDomainArchetype::isValid
bool isValid() const
Definition: CDomainArchetype.h:185
DGtal::concepts::CDomainArchetype::begin
ConstIterator begin() const
Definition: CDomainArchetype.h:127
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CDomainArchetype::size
Size size() const
Definition: CDomainArchetype.h:154
DGtal::concepts::CDomainArchetype::Vector
Space::Vector Vector
Definition: CDomainArchetype.h:81
DGtal::concepts::CDomainArchetype::predicate
const Predicate & predicate() const
Definition: CDomainArchetype.h:168
DGtal::concepts::CDomainArchetype::isInside
bool isInside(const Point &p) const
Definition: CDomainArchetype.h:161
DGtal::concepts::CDomainArchetype::CDomainArchetype
CDomainArchetype(const DigitalSet &aSet)
Definition: CDomainArchetype.h:106
DGtal::concepts::CDomainArchetype
Aim: The archetype of a class that represents a digital domain, i.e. a non mutable subset of points o...
Definition: CDomainArchetype.h:71
DGtal::concepts::CDomainArchetype::end
ConstIterator end() const
Definition: CDomainArchetype.h:133
DGtal::concepts::CDomainArchetype::CDomainArchetype
CDomainArchetype(const CDomainArchetype &other)
Definition: CDomainArchetype.h:113
DGtal::concepts::CDomainArchetype::Space
TSpace Space
Definition: CDomainArchetype.h:78
DGtal::concepts::CDomainArchetype::Domain
CDomainArchetype< TSpace > Domain
Definition: CDomainArchetype.h:77
DGtal::PointVector< dim, Integer >
DGtal::concepts::CDomainArchetype::selfDisplay
void selfDisplay(std::ostream &out) const
Definition: CDomainArchetype.h:179
DGtal::SpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
DGtal::concepts::CDomainArchetype::ConstIterator
CConstBidirectionalIteratorArchetype< Point > ConstIterator
Definition: CDomainArchetype.h:84
DGtal::concepts::CDomainArchetype::Dimension
Space::Dimension Dimension
Definition: CDomainArchetype.h:83