|
|
/* garbage.h - This file is part of Kalamaris Copyright (C) 2000 Antonio Larrosa Jimenez Kalamaris' homepage : http://www.arrakis.es/~rlarrosa/kalamaris.html This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send comments and bug fixes to Antonio Larrosa <larrosa@kde.org> ***************************************************************************/ #ifndef _GARBAGE_H #define _GARBAGE_H #include <qlist.h> //#include "vartype.h" //#include "map.h" class T; class Map; /** * This class is only used as a namespace for some static methods that * implement garbage collection, which is used to be able to return * references to types in the T operators. * * The Map garbage collection is not used currently, but I've just * implemented it in case it's neccesary in the future (also, it would * have make easier to read some code which is already written and I * don't have time to change). */ class Garbage { protected: static QList <T> m_TGarbage[128]; static QList <Map> m_MapGarbage[128]; static int m_current; public: static void collect(void); static void throwT(const T *t); static void throwMap(const Map *t); static int setCurrent(int current); static void push(void); static void pop(void); }; #endif
Generated by: antlarr@terminus on Wed May 31 08:19:51 2000, using kdoc 2.0a22. |