DGtal  1.5.beta
CBackInsertable.h
1 
17 #pragma once
18 
31 #if defined(CBackInsertable_RECURSES)
32 #error Recursive header files inclusion detected in CBackInsertable.h
33 #else // defined(CBackInsertable_RECURSES)
35 #define CBackInsertable_RECURSES
36 
37 #if !defined CBackInsertable_h
39 #define CBackInsertable_h
40 
42 // Inclusions
43 #include "DGtal/base/Common.h"
45 
46 namespace DGtal
47 {
48 
49  namespace concepts
50  {
51 
53  // class CBackInsertable
93  template <typename T>
95  {
96  // ----------------------- Concept checks ------------------------------
97  public:
98  typedef typename T::value_type value_type;
100  {
101  myX.push_back( myV );
103  }
105  {
106  }
107  // ------------------------- Private Datas --------------------------------
108  private:
109  T myX; // do not require T to be default constructible.
111 
112  // ------------------------- Internals ------------------------------------
113  private:
114 
115  }; // end of concept CBackInsertable
116 
117  } // namespace concepts
118 
119 } // namespace DGtal
120 
121 // //
123 
124 #endif // !defined CBackInsertable_h
125 
126 #undef CBackInsertable_RECURSES
127 #endif // else defined(CBackInsertable_RECURSES)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Represents types for which a std::back_insert_iterator can be constructed with std::back_inserte...