00001 /*--License:
00002 Kyra Sprite Engine
00003 Copyright Lee Thomason (Grinning Lizard Software) 2001-2002
00004 www.grinninglizard.com/kyra
00005 www.sourceforge.net/projects/kyra
00006
00007 This program is free software; you can redistribute it and/or
00008 modify it under the terms of the GNU General Public License
00009 as published by the Free Software Foundation; either version 2
00010 of the License, or (at your option) any later version.
00011
00012 This program is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015 GNU General Public License for more details.
00016
00017 You should have received a copy of the GNU General Public License
00018 along with this program; if not, write to the Free Software
00019 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020
00021 The full text of the license can be found in license.txt
00022 */
00023
00024 #ifndef GLFIXED_SET_INCLUDED
00025 #define GLFIXED_SET_INCLUDED
00026
00027 #include "gllist.h"
00028
00029 // An odd class. A set of sequential integers starting with 0.
00030 class GlIntArraySet
00031 {
00032 public:
00033 GlIntArraySet( int maxSize, bool startOn );
00034 ~GlIntArraySet();
00035
00036 bool Empty() { return root == 0; }
00037
00038 void Push( int data );
00039 void Pop( int data );
00040 bool Find( int data ) { return array[data].data; }
00041
00042 private:
00043 int maxSize;
00044 GlSListNode<bool>* array;
00045 GlSListNode<bool>* root;
00046 };
00047
00048 #endif
00049
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001