DGtal 1.3.0
Loading...
Searching...
No Matches
BackInsertionSequenceToStackAdapter.h
1
17#pragma once
18
31#if defined(BackInsertionSequenceToStackAdapter_RECURSES)
32#error Recursive header files inclusion detected in BackInsertionSequenceToStackAdapter.h
33#else // defined(BackInsertionSequenceToStackAdapter_RECURSES)
35#define BackInsertionSequenceToStackAdapter_RECURSES
36
37#if !defined BackInsertionSequenceToStackAdapter_h
39#define BackInsertionSequenceToStackAdapter_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/base/Alias.h"
47
48namespace DGtal
49{
50
52 // template class BackInsertionSequenceToStackAdapter
61 template <typename TSequence>
63 {
64
65 // ----------------------- Inner types ------------------------------------
66 public:
67
71 typedef TSequence Container;
73
77 typedef typename Container::value_type value_type;
81 typedef typename Container::value_type Value;
82
86 typedef typename Container::size_type size_type;
90 typedef typename Container::size_type Size;
91
92
93 // ----------------------- Standard services ------------------------------
94 public:
95
101
106 Size size() const;
107
112 bool empty() const;
113
129 const Value& top() const;
130
137 void push(const Value& aValue);
138
144 void pop();
145
146 // ----------------------- Interface --------------------------------------
147 public:
148
153 void selfDisplay ( std::ostream & out ) const;
154
159 bool isValid() const;
160
161 // ------------------------- Private Datas --------------------------------
162 private:
167
168
169
170 }; // end of class BackInsertionSequenceToStackAdapter
171
172
179 template <typename TSequence>
180 std::ostream&
181 operator<< ( std::ostream & out, const BackInsertionSequenceToStackAdapter<TSequence> & object );
182
189 template <typename TSequence>
191 backStack ( TSequence& aSequence );
192
193} // namespace DGtal
194
195
197// Includes inline functions.
198#include "DGtal/base/BackInsertionSequenceToStackAdapter.ih"
199
200// //
202
203#endif // !defined BackInsertionSequenceToStackAdapter_h
204
205#undef BackInsertionSequenceToStackAdapter_RECURSES
206#endif // else defined(BackInsertionSequenceToStackAdapter_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: Alias.h:183
Aim: This class implements a dynamic adapter to an instance of a model of back insertion sequence in ...
BackInsertionSequenceToStackAdapter(Alias< Container > aContainer)
BOOST_CONCEPT_ASSERT((boost::BackInsertionSequence< Container >))
void selfDisplay(std::ostream &out) const
DGtal is the top-level namespace which contains all DGtal functions and types.
BackInsertionSequenceToStackAdapter< TSequence > backStack(TSequence &aSequence)
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Go to http://www.sgi.com/tech/stl/BackInsertionSequence.html.
Definition: Boost.dox:134