//======================================================================== // // GList.h // // Copyright 2001-2002 Glyph & Cog, LLC // //======================================================================== #ifndef GLIST_H #define GLIST_H #include #ifdef USE_GCC_PRAGMAS #pragma interface #endif #include "gtypes.h" //------------------------------------------------------------------------ // GList //------------------------------------------------------------------------ class GList { public: // Create an empty list. GList(); // Create an empty list with space for elements. GList(int sizeA); // Destructor - does not free pointed-to objects. ~GList(); //----- general // Get the number of elements. int getLength() { return length; } //----- ordered list support // Return the th element. // Assumes 0 <= i < length. void *get(int i) { return data[i]; } // Append an element to the end of the list. void append(void *p); // Append another list to