 
#ifndef ghash_DEFINED
#define ghash_DEFINED 1
 
#ifndef class_DEFINED
#include <class.h>
#endif /* class_DEFINED */
/* 
 * This file was generated by the Andrew class system preprocessor.
 * Don't make changes to this file as it is created from ghash.ch and will be
 * overwritten.  Make changes to ghash.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from ghash.ch.
 */ 
 
/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
*/


 

/* A hash table
 *
 */

#define ghash_BUCKETS 32






/* 
 * End of information copied from ghash.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
/* ghash has no super class */ 
 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for ghash 
 */ 
struct ghash { 
    struct {
	struct basicobject_methods *ghash_methods;
    } header;
    struct glist *buckets[ghash_BUCKETS];
    procedure hash;
    procedure freeVal, freeKey;
    procedure copyVal, copyKey;
    procedure compKey;

};

 
/* 
 * End of data structure for ghash.
 */ 
 

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef ghash_PROGRAMMERVERSION
#define ghash_PROGRAMMERVERSION 1
#endif /* ghash_PROGRAMMERVERSION */

#ifdef ghash_VERSION
#undef ghash_VERSION
#endif /* ghash_VERSION */
#define ghash_VERSION ((((ghash_PROGRAMMERVERSION << 16) ^ (8 << 8) ^ sizeof(struct ghash)) & 0x7ffff) + 0x80000 + (2 << 20))


#endif /* class_StaticInfoOnly */
#define ghash_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *ghash__GetClassInfo(); \
 extern struct classheader *ghash_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, ghash_classheader_StaticExport->name, ghash__GetClassInfo, NULL, ghash_classheader_StaticExport->namekey); } 
 
#define ghash_StaticLoad()  \
    { \
    ghash_StaticLoadOnlyThisClass();  \
    } 
 
#define ghash_StaticEntry  {ghash_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader ghash_classheader = {
    ghash_VERSION,
    "ghash",
    "ghash",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define ghash_CLASSPROCEDURES (ghash_classheader.classprocedures)
int ghash_classref_;
#endif /* class_StaticInfoOnly */

#endif /* ghash_DEFINED */

#if !defined(ghash_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_ghash) && !defined(class_StaticEntriesOnly)
#define ghash_ROUTINESDEFINED

#define ghash_Lookup(self,key) \
    ((* ((char * (*)())((self)->header.ghash_methods->routines[0]))) (self,key))
#define ghash_LookupKey(self,key) \
    ((* ((char * (*)())((self)->header.ghash_methods->routines[1]))) (self,key))
#define ghash_Store(self,key,value) \
    ((* ((boolean (*)())((self)->header.ghash_methods->routines[2]))) (self,key,value))
#define ghash_Delete(self,key) \
    ((* ((char * (*)())((self)->header.ghash_methods->routines[3]))) (self,key))
#define ghash_Rename(self,key,new) \
    ((* ((char * (*)())((self)->header.ghash_methods->routines[4]))) (self,key,new))
#define ghash_Clear(self) \
    ((* ((void (*)())((self)->header.ghash_methods->routines[5]))) (self))
#define ghash_Enumerate(self,proc,rock) \
    ((* ((char * (*)())((self)->header.ghash_methods->routines[6]))) (self,proc,rock))
#define ghash_Debug(self) \
    ((* ((void (*)())((self)->header.ghash_methods->routines[7]))) (self))
#define ghash_SetHash(self,fn) \
 ((self)->hash = ((procedure)fn))
#define ghash_SetFreeVal(self,fn) \
 ((self)->freeVal = ((procedure)fn))
#define ghash_SetFreeKey(self,fn) \
 ((self)->freeKey = ((procedure)fn))
#define ghash_SetCopyKey(self,fn) \
 ((self)->copyKey = ((procedure)fn))
#define ghash_SetCopyVal(self,fn) \
 ((self)->copyVal = ((procedure)fn))
#define ghash_SetCompareKey(self,fn) \
 ((self)->compKey = ((procedure)fn))
#define ghash_GetFreeVal(self) \
 ((self)->freeVal)
#define ghash_GetFreeKey(self) \
 ((self)->freeKey)
#define ghash_GetCopyKey(self) \
 ((char *(*)())(self)->copyKey)
#define ghash_GetCopyVal(self) \
 ((char *(*)())(self)->copyVal)
#define ghash_GetCompareKey(self) \
 ((int (*)())(self)->compKey)

#define ghash_NewFromObject(self) \
    ((* ((struct ghash * (*)())((self)->header.ghash_methods->info->procs->routines[0]))) (&ghash_classheader, (self)->header.ghash_methods->info->versionnumber))
#define ghash_New() \
    (*((struct ghash * (*)()) (ghash_CLASSPROCEDURES->routines[0])))(&ghash_classheader,ghash_VERSION)
#define ghash_Initialize(self) \
    (*((void (*)()) (ghash_CLASSPROCEDURES->routines[2])))(&ghash_classheader,self, ghash_VERSION)

#define ghash_Destroy(self) \
    ((* ((void (*)()) ((self)->header.ghash_methods->info->procs->routines[1]))) (&ghash_classheader, self))
#define ghash_Finalize(self) \
    (*((void (*)()) (ghash_CLASSPROCEDURES->routines[3])))(&ghash_classheader,self)

#define ghash_InitializeObject(self) \
    (*((boolean (*)()) (ghash_CLASSPROCEDURES->routines[5])))(&ghash_classheader,self)
#define ghash_FinalizeObject(self) \
    (*((void (*)()) (ghash_CLASSPROCEDURES->routines[6])))(&ghash_classheader,self)
#define ghash_InitializeClass() \
    (*((boolean (*)()) (ghash_CLASSPROCEDURES->routines[7])))(&ghash_classheader)


#endif /* !defined(ghash_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_ghash ) && !defined(class_StaticEntriesOnly)*/

