DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CSegment.h
1 
17 #pragma once
18 
31 #if defined(CSegment_RECURSES)
32 #error Recursive header files inclusion detected in CSegment.h
33 #else // defined(CSegment_RECURSES)
34 
35 #define CSegment_RECURSES
36 
37 #if !defined CSegment_h
38 
39 #define CSegment_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "boost/concept_check.hpp"
46 #include "DGtal/base/ConceptUtils.h"
48 
49 namespace DGtal
50 {
51 
53  // class CSegment
125  template <typename T>
126  struct CSegment : boost::DefaultConstructible<T>, boost::CopyConstructible<T>, boost::Assignable<T>, boost::EqualityComparable<T>
127  {
128  // ----------------------- Concept checks ------------------------------
129  public:
130  // Inner types
131  typedef typename T::ConstIterator ConstIterator;
132  //Uncomment if all iterators have been cleaned
133  //BOOST_CONCEPT_ASSERT(( boost::BidirectionalIterator<T> ));
134 
135  // Methods
137  {
138  ConceptUtils::sameType( it, myX.begin() );
139  ConceptUtils::sameType( it, myX.end() );
140  }
141  // ------------------------- Private Datas --------------------------------
142  private:
143  T myX; // only if T is default constructible.
145 
146  // ------------------------- Internals ------------------------------------
147  private:
148 
149  }; // end of concept CSegment
150 
151 } // namespace DGtal
152 
153 // //
155 
156 #endif // !defined CSegment_h
157 
158 #undef CSegment_RECURSES
159 #endif // else defined(CSegment_RECURSES)