DGtal 1.4.0
Loading...
Searching...
No Matches
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)
35#define CStack_RECURSES
36
37#if !defined CStack_h
39#define CStack_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/base/ConceptUtils.h"
47
48namespace 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 }
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)
void sameType(const T &, const T &)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: This concept gathers classes that provide a stack interface.
Definition CStack.h:92
T::size_type Size
Definition CStack.h:96
void checkConstConstraints() const
Definition CStack.h:107
T::value_type Value
Definition CStack.h:95
BOOST_CONCEPT_USAGE(CStack)
Definition CStack.h:98
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition Boost.dox:32
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition Boost.dox:34