ftp.nice.ch/pub/next/unix/database/yooda.1.3.s.tar.gz#/yooda/example/oo7/PartIdSet.h

This is PartIdSet.h in view mode; [Download] [Up]

/********************************************************/
/*                                                      */
/*               OO7 Benchmark                          */
/*                                                      */
/*              COPYRIGHT (C) 1993                      */
/*                                                      */
/*                Michael J. Carey 		        */
/*                David J. DeWitt 		        */
/*                Jeffrey Naughton 		        */
/*               Madison, WI U.S.A.                     */
/*                                                      */
/*	         ALL RIGHTS RESERVED                    */
/*                                                      */
/********************************************************/



#ifndef PARTID_H
#define PARTID_H

#define HashTableSize 511

class Member {
public:
    int		value;
    Member*	next;
};

class PartIdSet {
private:
    Member* hashTable[HashTableSize];
    int     emptySet;






    int hash (int val) 
    { return((unsigned) ((unsigned) val * 12345 + 6789) % HashTableSize); }

public:
    PartIdSet();
    ~PartIdSet() { clear(); };
    void clear();
    void insert(int val);
    int  contains(int val);
    int	 empty() { return(emptySet); };
};

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.