]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/stack.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: STL stack clone
4 // Author: Lindsay Mathieson
7 // Copyright: (c) 2001 Lindsay Mathieson <lindsay@mathieson.org>
8 // Licence: wxWindows license
9 ///////////////////////////////////////////////////////////////////////////////
14 #include "wx/vector.h"
16 #define WX_DECLARE_STL_STACK(obj, cls)\
17 class cls : public wxVectorBase\
19 WX_DECLARE_STL_VECTORBASE(obj, cls);\
21 void push(const obj& o)\
23 bool rc = Alloc(size() + 1);\
30 RemoveAt(size() - 1);\
35 return *(obj *) GetItem(size() - 1);\
37 const obj& top() const\
39 return *(obj *) GetItem(size() - 1);\
43 #endif // _WX_STACK_H_