KHolidays Library
35 #ifndef BISON_STACK_HH
36 # define BISON_STACK_HH
42 template <
class T,
class S = std::deque<T> >
48 typedef typename S::reverse_iterator iterator;
49 typedef typename S::const_reverse_iterator const_iterator;
55 stack (
unsigned int n) : seq_ (n)
61 operator [] (
unsigned int i)
68 operator [] (
unsigned int i)
const
82 pop (
unsigned int n = 1)
95 inline const_iterator begin ()
const {
return seq_.rbegin (); }
96 inline const_iterator end ()
const {
return seq_.rend (); }
104 template <
class T,
class S = stack<T> >
109 slice (
const S& stack,
110 unsigned int range) : stack_ (stack),
117 operator [] (
unsigned int i)
const
119 return stack_[range_ - i];
129 #endif // not BISON_STACK_HH
Present a slice of the top of a stack.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:06 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.