/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/stack.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/stack.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 977 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/stack.h
3 // Purpose: STL stack clone
4 // Author: Lindsay Mathieson
5 // Modified by:
6 // Created: 30.07.2001
7 // Copyright: (c) 2001 Lindsay Mathieson <lindsay@mathieson.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_STACK_H_
12 #define _WX_STACK_H_
13
14 #include "wx/vector.h"
15
16 #define WX_DECLARE_STACK(obj, cls)\
17 class cls : public wxVectorBase\
18 {\
19 WX_DECLARE_VECTORBASE(obj, cls);\
20 public:\
21 void push(const obj& o)\
22 {\
23 bool rc = Alloc(size() + 1);\
24 wxASSERT(rc);\
25 Append(new obj(o));\
26 };\
27 \
28 void pop()\
29 {\
30 RemoveAt(size() - 1);\
31 };\
32 \
33 obj& top()\
34 {\
35 return *(obj *) GetItem(size() - 1);\
36 };\
37 const obj& top() const\
38 {\
39 return *(obj *) GetItem(size() - 1);\
40 };\
41 }
42
43 #endif // _WX_STACK_H_
44

  ViewVC Help
Powered by ViewVC 1.1.22