Xbase Class Library  2.0.0
xstack.h
Go to the documentation of this file.
1 /* $Id: xstack.h,v 1.5 2000/11/10 19:04:17 dbryson Exp $
2 
3  Xbase project source code
4 
5  This file conatains a header file for the xbStack object which
6  is used for handling expressions.
7 
8  Copyright (C) 1997 Startech, Gary A. Kunkel
9 
10  This library is free software; you can redistribute it and/or
11  modify it under the terms of the GNU Lesser General Public
12  License as published by the Free Software Foundation; either
13  version 2.1 of the License, or (at your option) any later version.
14 
15  This library is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with this library; if not, write to the Free Software
22  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 
24  Contact:
25 
26  Mail:
27 
28  Technology Associates, Inc.
29  XBase Project
30  1455 Deming Way #11
31  Sparks, NV 89434
32  USA
33 
34  Email:
35 
36  xbase@techass.com
37 
38  See our website at:
39 
40  xdb.sourceforge.net
41 
42 
43  V 1.0 10/10/97 - Initial release of software
44  V 1.5 1/2/97 - Added memo field support
45  V 1.6a 4/1/98 - Added expression support
46  V 1.6b 4/8/98 - Numeric index keys
47 */
48 
52 #ifndef __XB_STACK_H__
53 #define __XB_STACK_H__
54 
55 #ifdef __GNUG__
56 #pragma interface
57 #endif
58 
59 #include <xbase/xtypes.h>
60 
62 
68  void * UserPtr;
69 };
70 
72 
76 
77  public:
78  xbStack( void );
79  void InitStack( void );
80  void * Pop( void );
81  xbShort Push( void * );
83 
85  xbShort GetStackDepth( void ) { return StackDepth; }
86  void DumpStack( void );
87 
88  protected:
92  xbStackElement * Free; /* points to free stack items */
93  xbStackElement * GetStackElement( void );
94  void FreeStackElement( xbStackElement * );
95 };
96 
97 #endif // __XB_STACK_H__
xbShort StackDepth
Definition: xstack.h:89
xbStackElement * Previous
Definition: xstack.h:66
xbStackElement struct
Definition: xstack.h:65
#define XBDLLEXPORT
Definition: xbase.h:101
xbStackElement * Next
Definition: xstack.h:67
xbStackElement * First
Definition: xstack.h:90
short int xbShort
xbShort type
Definition: xtypes.h:65
void * UserPtr
Definition: xstack.h:68
xbShort GetStackDepth(void)
Short description.
Definition: xstack.h:85
xbStack class
Definition: xstack.h:75
xbStackElement * Free
Definition: xstack.h:92
xbStackElement * Last
Definition: xstack.h:91