DGtal  1.3.beta
CDigitalSurfaceContainer.h
1 
17 #pragma once
18 
31 #if defined(CDigitalSurfaceContainer_RECURSES)
32 #error Recursive header files inclusion detected in CDigitalSurfaceContainer.h
33 #else // defined(CDigitalSurfaceContainer_RECURSES)
34 
35 #define CDigitalSurfaceContainer_RECURSES
36 
37 #if !defined CDigitalSurfaceContainer_h
38 
39 #define CDigitalSurfaceContainer_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/topology/Topology.h"
46 #include "DGtal/topology/CCellularGridSpaceND.h"
47 #include "DGtal/topology/CDigitalSurfaceTracker.h"
49 
50 // @since 0.8 In DGtal::concepts
51 namespace DGtal {
52  namespace concepts {
53 
55  // class CDigitalSurfaceContainer
126  template <typename T>
128  {
129  // ----------------------- Concept checks ------------------------------
130  public:
131  typedef typename T::KSpace KSpace;
132  typedef typename T::Surfel Surfel;
133  typedef typename T::SurfelConstIterator SurfelConstIterator;
134  typedef typename T::DigitalSurfaceTracker DigitalSurfaceTracker;
135  typedef typename T::Size Size;
136 
141 
142  // 2. then check the presence of data members, operators and methods with
144  {
145  // check const methods.
147  }
149  {
150  // x.space() const, returns a const KSpace &
151  ConceptUtils::sameType( myKSpace, myX.space() );
152  // x.isInside( Surfel ) const, returns bool.
153  ConceptUtils::sameType( myBool, myX.isInside( mySurfel ) );
154  // x.begin() const, returns SurfelConstIterator
156  // x.end() const, returns SurfelConstIterator
158  // x.newTracker( Surfel ) const, returns DigitalSurfaceTracker*
160  // x.connectedness() const, returns Connectedness
161  ConceptUtils::sameType( myConnectedness, myX.connectedness() );
162  // x.nbSurfels() const, returns Connectedness
163  ConceptUtils::sameType( mySize, myX.nbSurfels() );
164  // x.empty() const, returns bool
165  ConceptUtils::sameType( myBool, myX.empty() );
166  }
167  // ------------------------- Private Datas --------------------------------
168  private:
169  T myX; // do not require T to be default constructible.
172  bool myBool;
177  // ------------------------- Internals ------------------------------------
178  private:
179 
180  }; // end of concept CDigitalSurfaceContainer
181 
182 } // namespace concepts
183 } // namespace DGtal
184 
185 // //
187 
188 #endif // !defined CDigitalSurfaceContainer_h
189 
190 #undef CDigitalSurfaceContainer_RECURSES
191 #endif // else defined(CDigitalSurfaceContainer_RECURSES)
DGtal::concepts::CDigitalSurfaceContainer::myX
T myX
Definition: CDigitalSurfaceContainer.h:169
DGtal::concepts::CDigitalSurfaceContainer::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CDigitalSurfaceContainer)
Definition: CDigitalSurfaceContainer.h:143
DGtal::concepts::CDigitalSurfaceContainer::Surfel
T::Surfel Surfel
Definition: CDigitalSurfaceContainer.h:132
boost_concepts::SinglePassIteratorConcept
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/SinglePassIterator.html.
Definition: BoostConcepts.dox:44
DGtal::concepts::CDigitalSurfaceTracker
Aim:
Definition: CDigitalSurfaceTracker.h:85
DGtal::concepts::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition: CCellularGridSpaceND.h:162
DGtal::concepts::CDigitalSurfaceContainer::Size
T::Size Size
Definition: CDigitalSurfaceContainer.h:135
DGtal::concepts::CDigitalSurfaceContainer::myPtrTracker
DigitalSurfaceTracker * myPtrTracker
Definition: CDigitalSurfaceContainer.h:174
DGtal::concepts::CDigitalSurfaceContainer::myKSpace
KSpace myKSpace
Definition: CDigitalSurfaceContainer.h:170
DGtal::Connectedness
Connectedness
Definition: Topology.h:50
DGtal::concepts::CDigitalSurfaceContainer
Aim: The digital surface container concept describes a minimal set of inner types and methods so as t...
Definition: CDigitalSurfaceContainer.h:127
DGtal::concepts::CDigitalSurfaceContainer::DigitalSurfaceTracker
T::DigitalSurfaceTracker DigitalSurfaceTracker
Definition: CDigitalSurfaceContainer.h:134
Size
HalfEdgeDataStructure::Size Size
Definition: testHalfEdgeDataStructure.cpp:50
KSpace
Z3i::KSpace KSpace
Definition: testArithmeticalDSSComputerOnSurfels.cpp:48
Surfel
KSpace::SCell Surfel
Definition: testArithmeticalDSSComputerOnSurfels.cpp:50
DGtal::concepts::CDigitalSurfaceContainer::SurfelConstIterator
T::SurfelConstIterator SurfelConstIterator
Definition: CDigitalSurfaceContainer.h:133
DGtal::concepts::CDigitalSurfaceContainer::checkConstConstraints
void checkConstConstraints() const
Definition: CDigitalSurfaceContainer.h:148
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
boost::CopyConstructible
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
DGtal::concepts::CDigitalSurfaceContainer::mySurfel
Surfel mySurfel
Definition: CDigitalSurfaceContainer.h:171
DGtal::concepts::CDigitalSurfaceContainer::myConnectedness
Connectedness myConnectedness
Definition: CDigitalSurfaceContainer.h:175
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal::concepts::CDigitalSurfaceContainer::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIteratorConcept< SurfelConstIterator >))
DGtal::concepts::CDigitalSurfaceContainer::mySize
Size mySize
Definition: CDigitalSurfaceContainer.h:176
boost_concepts::ReadableIteratorConcept
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/ReadableIterator.html.
Definition: BoostConcepts.dox:29
DGtal::concepts::CDigitalSurfaceContainer::myBool
bool myBool
Definition: CDigitalSurfaceContainer.h:172
DGtal::concepts::CDigitalSurfaceContainer::KSpace
T::KSpace KSpace
Definition: CDigitalSurfaceContainer.h:131
DGtal::concepts::CDigitalSurfaceContainer::mySurfelCIt
SurfelConstIterator mySurfelCIt
Definition: CDigitalSurfaceContainer.h:173