]> git.donarmstrong.com Git - lilypond.git/blob - flower/sstack.hh
fa21392de040ae61ce8a44fa91bd8f676efb1a5e
[lilypond.git] / flower / sstack.hh
1 /*
2   sstack.hh -- part of Flower lib
3
4   (c) 1996 Han-Wen Nienhuys
5 */
6
7 #ifndef SSTACK_HH
8 #define SSTACK_HH
9
10 #include "vray.hh"
11
12 /// A simple stack based on svec.
13 template<class T>
14 struct sstack : svec<T> { 
15     T top() { return last(); }
16     T pop() {
17         assert(!empty());
18         T l = last();
19         svec<T>::pop();
20         return l;
21     }
22     void push(T l) { add(l); }
23 };
24 /**
25   Same as for #svec# goes here.
26 */
27
28
29 #endif // SSTACK_HH
30