DGtal  0.9.2
CStack.h
1 
17 #pragma once
18 
31 #if defined(CStack_RECURSES)
32 #error Recursive header files inclusion detected in CStack.h
33 #else // defined(CStack_RECURSES)
34 
35 #define CStack_RECURSES
36 
37 #if !defined CStack_h
38 
39 #define CStack_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ConceptUtils.h"
47 
48 namespace DGtal
49 {
50  namespace concepts
51  {
53  // class CStack
90  template <typename T>
92  {
93  // ----------------------- Concept checks ------------------------------
94  public:
95  typedef typename T::value_type Value;
96  typedef typename T::size_type Size;
97 
99  {
101  myX.push( myV );
102  myX.pop();
103 
104  // check const methods.
106  }
108  {
112  }
113  // ------------------------- Private Datas --------------------------------
114  private:
115  T myX; // do not require T to be default constructible.
116  Value myV;
117  Size myS;
118  bool myB;
119 
120  }; // end of concept CStack
121  }//namespace concepts
122 } // namespace DGtal
123 
124 // //
126 
127 #endif // !defined CStack_h
128 
129 #undef CStack_RECURSES
130 #endif // else defined(CStack_RECURSES)
BOOST_CONCEPT_USAGE(CStack)
Definition: CStack.h:98
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition: Boost.dox:32
T::value_type Value
Definition: CStack.h:95
Aim: This concept gathers classes that provide a stack interface.
Definition: CStack.h:91
void checkConstConstraints() const
Definition: CStack.h:107
void sameType(const T &t1, const T &t2)
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
DGtal is the top-level namespace which contains all DGtal functions and types.
T::size_type Size
Definition: CStack.h:96