DGtal  1.3.beta
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.
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)
DGtal::concepts::CStack::checkConstConstraints
void checkConstConstraints() const
Definition: CStack.h:107
DGtal::concepts::CStack::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CStack)
Definition: CStack.h:98
DGtal::concepts::CStack::myX
T myX
Definition: CStack.h:115
DGtal::concepts::CStack::myV
Value myV
Definition: CStack.h:116
DGtal::concepts::CStack::Value
T::value_type Value
Definition: CStack.h:95
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
boost::CopyConstructible
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal::concepts::CStack::myS
Size myS
Definition: CStack.h:117
DGtal::concepts::CStack::Size
T::size_type Size
Definition: CStack.h:96
DGtal::concepts::CStack
Aim: This concept gathers classes that provide a stack interface.
Definition: CStack.h:91
boost::Assignable
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition: Boost.dox:32
DGtal::concepts::CStack::myB
bool myB
Definition: CStack.h:118