DGtal  1.5.beta
CSinglePassRangeWithWritableIterator.h
1 
17 #pragma once
18 
30 #if defined(CSinglePassRangeWithWritableIterator_RECURSES)
31 #error Recursive header files inclusion detected in CSinglePassRangeWithWritableIterator.h
32 #else // defined(CSinglePassRangeWithWritableIterator_RECURSES)
34 #define CSinglePassRangeWithWritableIterator_RECURSES
35 
36 #if !defined CSinglePassRangeWithWritableIterator_h
38 #define CSinglePassRangeWithWritableIterator_h
39 
41 // Inclusions
42 #include <iostream>
43 #include "DGtal/base/Common.h"
44 #include "DGtal/base/CConstSinglePassRange.h"
46 
47 namespace DGtal
48 {
49 
50  namespace concepts
51  {
52 
54  // class CSinglePassRangeWithWritableIterator
86  template <typename T, typename Value>
88  {
89  // ----------------------- Concept checks ------------------------------
90  public:
91  // 1. define first provided types (i.e. inner types), like
92  typedef typename T::OutputIterator OutputIterator;
93 
94  // possibly check these types so as to satisfy a concept with
96 
98  {
99  concepts::ConceptUtils::sameType( myOutput, myX.outputIterator( ) );
100  }
101  // ------------------------- Private Datas --------------------------------
102  private:
103  T myX; // do not require T to be default constructible.
105 
106  // ------------------------- Internals ------------------------------------
107  private:
108 
109  }; // end of concept CSinglePassRangeWithWritableIterator
110 
111  } // namespace concepts
112 
113 } // namespace DGtal
114 
115 // //
117 
118 #endif // !defined CSinglePassRangeWithWritableIterator_h
119 
120 #undef CSinglePassRangeWithWritableIterator_RECURSES
121 #endif // else defined(CSinglePassRangeWithWritableIterator_RECURSES)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the concept describing a const single pass range.
Aim: refined concept of const single pass range which require that an output iterator exists.
BOOST_CONCEPT_ASSERT((boost::OutputIterator< OutputIterator, Value >))
Go to http://www.sgi.com/tech/stl/OutputIterator.html.
Definition: Boost.dox:38