DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CSinglePassOutputRange.h
1 
17 #pragma once
18 
30 #if defined(CSinglePassOutputRange_RECURSES)
31 #error Recursive header files inclusion detected in CSinglePassOutputRange.h
32 #else // defined(CSinglePassOutputRange_RECURSES)
33 
34 #define CSinglePassOutputRange_RECURSES
35 
36 #if !defined CSinglePassOutputRange_h
37 
38 #define CSinglePassOutputRange_h
39 
41 // Inclusions
42 #include <iostream>
43 #include "DGtal/base/Common.h"
45 
46 namespace DGtal
47 {
48 
50  // class CSinglePassOutputRange
87  template <typename T, typename Value>
89  {
90  // ----------------------- Concept checks ------------------------------
91  public:
92  // 1. define first provided types (i.e. inner types), like
93  typedef typename T::OutputIterator OutputIterator;
94 
95  // possibly check these types so as to satisfy a concept with
96  BOOST_CONCEPT_ASSERT(( boost::OutputIterator<OutputIterator,Value> ));
97 
99  {
100  ConceptUtils::sameType( myOutput, myX.outputIterator( ) );
101  }
102  // ------------------------- Private Datas --------------------------------
103  private:
104  T myX; // do not require T to be default constructible.
106 
107  // ------------------------- Internals ------------------------------------
108  private:
109 
110  }; // end of concept CSinglePassOutputRange
111 
112 } // namespace DGtal
113 
114 // //
116 
117 #endif // !defined CSinglePassOutputRange_h
118 
119 #undef CSinglePassOutputRange_RECURSES
120 #endif // else defined(CSinglePassOutputRange_RECURSES)