This is HashFile.h in view mode; [Download] [Up]
/* File: HashFile.h - db(3) to HashTable bridge
*
* By: Christopher Lane <lane@camis.stanford.edu>
* Symbolic Systems Resources Group
* Knowledge Systems Laboratory
* Stanford University
*
* Date: 26 July 1994
*
* Copyright: 1990, 1991, 1992 & 1994 by The Leland Stanford Junior University.
* This program may be distributed without restriction for non-commercial use.
*/
#import <stdio.h>
#import <db/db.h>
#import <objc/HashTable.h>
#define HASHFILE_UNCACHED (-1)
@interface HashFile : HashTable
{
Database *db;
Data d;
char *filename;
BOOL readOnly, cached;
NXStream *stream;
long offset;
HashTable *table; /* use new table instead of self due to rehash */
}
/* Class */
+ (BOOL) isHashFile:(const char *) name;
/* Initialize */
- initFromFile:(const char *) name;
- initFromFile:(const char *) name keyDesc:(const char *) aKeyDesc;
- initFromFile:(const char *) name keyDesc:(const char *) aKeyDesc valueDesc:(const char *) aValueDesc;
- initFromFile:(const char *) name keyDesc:(const char *) aKeyDesc valueDesc:(const char *) aValueDesc capacity:(unsigned) aCapacity;
/* Free */
- free;
//- freeObjects;
//- freeKeys:(void (*) (void *)) keyFunc values:(void (*) (void *)) valueFunc;
- empty;
/* Copy */
//- copy;
//- copyFromZone:(NXZone *) zone;
/* Manipulate */
- (unsigned) count;
- (BOOL) isKey:(const void *) aKey;
- (void *) valueForKey:(const void *) aKey;
- (void *) insertKey:(const void *) aKey value:(void *) aValue;
- (void *) removeKey:(const void *) aKey;
/* Iterate */
- (NXHashState) initState;
- (BOOL) nextState:(NXHashState *) aState key:(const void **) aKey value:(void **) aValue;
/* Archive */
//- write:(NXTypedStream *) stream;
//- read:(NXTypedStream *) stream;
/* Internal */
- (void) _keyCvtIn:(const void *) aKey;
- (void) _valueCvtIn:(const void *) aValue;
- (void) _datumCvtIn:(Datum *) aDatum from:(const void *) aBuffer using:(const char *) aDesc;
- (void *) _keyCvtOut;
- (void *) _valueCvtOut;
- (void *) _datumCvtOut:(Datum *) aDatum using:(const char *) aDesc;
- _conditionalFree:(const void **) aPointer desc:(const char *) aDesc;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.