DGtal  1.4.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)
40 #define CDomainArchetype_RECURSES
41 
42 #if !defined CDomainArchetype_h
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 
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
size_t Size
Type used to represent sizes in the digital space.
Definition: SpaceND.h:107
DGtal::Dimension Dimension
Copy of the type used for the dimension.
Definition: SpaceND.h:129
Aim: The archetype of a class that represents a digital domain, i.e. a non mutable subset of points o...
const Predicate & predicate() const
bool isInside(const Point &p) const
CDomainArchetype(const DigitalSet &aSet)
ConstIterator begin(const Point &aPoint) const
CDomainArchetype(const CDomainArchetype &other)
void selfDisplay(std::ostream &out) const
CDomainArchetype< TSpace > Domain
CConstBidirectionalIteratorArchetype< Point > ConstIterator
DGtal is the top-level namespace which contains all DGtal functions and types.
An archetype of ConstBidirectionalIterator.
const Point aPoint(3, 4)