DGtal 1.3.0
Loading...
Searching...
No Matches
CDigitalSetArchetype.h
1
17#pragma once
18
19#ifndef _MSC_VER
20#pragma GCC diagnostic ignored "-Wunused-parameter"
21#endif
22
23
36#if defined(CDigitalSetArchetype_RECURSES)
37#error Recursive header files inclusion detected in CDigitalSetArchetype.h
38#else // defined(CDigitalSetArchetype_RECURSES)
40#define CDigitalSetArchetype_RECURSES
41
42#if !defined CDigitalSetArchetype_h
44#define CDigitalSetArchetype_h
45
47// Inclusions
48#include <iostream>
49#include <set>
50#include <string>
51#include "DGtal/base/Common.h"
52#include "DGtal/base/CountedPtr.h"
53#include "DGtal/kernel/sets/CDigitalSet.h"
55
56namespace DGtal
57{
58 namespace concepts
59 {
61 // template class CDigitalSetArchetype
71 template <typename TDomain>
73 {
74 public:
75 typedef TDomain Domain;
76 typedef typename Domain::Point Point;
77 typedef typename Domain::Size Size;
78 //typedef boost::bidirectional_iterator_archetype<Point> Iterator;
81
82 // ----------------------- Standard services ------------------------------
83 public:
84
89
97
103
110 { return *this; }
111
115 const Domain & domain() const { return DummyObject<Domain>::get(); }
116
121
122 // ----------------------- Standard Set services --------------------------
123 public:
124
128 Size size() const { return 0; }
129
133 bool empty() const { return true; }
134
141 void insert( const Point & p ) {}
142
151 template <typename PointInputIterator>
152 void insert( PointInputIterator first, PointInputIterator last ) {}
153
163 void insertNew( const Point & p ) {}
164
175 template <typename PointInputIterator>
176 void insertNew( PointInputIterator first, PointInputIterator last ) {}
177
184 Size erase( const Point & p ) { return 0; }
185
192 void erase( Iterator it ) {}
193
201 void erase( Iterator first, Iterator last ) {}
202
207 void clear() {}
208
212 ConstIterator find( const Point & p ) const
214
219 Iterator find( const Point & p )
220 { return DummyObject<Iterator>::get(); }
221
227
233
238 { return DummyObject<Iterator>::get(); }
239
244 { return DummyObject<Iterator>::get(); }
245
251 ( const CDigitalSetArchetype<Domain> & aSet )
252 { return *this; }
253
254 // ----------------------- Model of concepts::CPointPredicate -----------------------------
255 public:
256
261 bool operator()( const Point & p ) const
262 { return p == p; }
263
264 // ----------------------- Other Set services -----------------------------
265 public:
266
272 template< typename TOutputIterator >
273 void computeComplement(TOutputIterator& ito) const {}
274
282 {}
283
293
294
295 // ----------------------- Interface --------------------------------------
296 public:
297
302 void selfDisplay ( std::ostream & out ) const {}
303
308 bool isValid() const { return true; }
309
310
311 }; // end of class CDigitalSetArchetype
312 }
313} // namespace DGtal
314
315
316// //
318
319#endif // !defined CDigitalSetArchetype_h
320
321#undef CDigitalSetArchetype_RECURSES
322#endif // else defined(CDigitalSetArchetype_RECURSES)
323
324
Aim: Copy on write shared pointer.
Definition: CowPtr.h:68
Aim: The archetype of a container class for storing sets of digital points within some given domain.
void insert(PointInputIterator first, PointInputIterator last)
ConstIterator find(const Point &p) const
void selfDisplay(std::ostream &out) const
void erase(Iterator first, Iterator last)
CDigitalSetArchetype(const CDigitalSetArchetype &other)
CDigitalSetArchetype & operator=(const CDigitalSetArchetype &other)
void insertNew(PointInputIterator first, PointInputIterator last)
void computeComplement(TOutputIterator &ito) const
void assignFromComplement(const CDigitalSetArchetype< Domain > &other_set)
void computeBoundingBox(Point &lower, Point &upper) const
CSinglePassIteratorArchetype< Point > Iterator
DGtal is the top-level namespace which contains all DGtal functions and types.
An archetype of SingePassIterator.
Vector lower(const Vector &z, unsigned int k)
Vector upper(const Vector &z, unsigned int k)