ftp.nice.ch/pub/next/developer/resources/libraries/HashFile.N.bs.tar.gz#/HashFile/HashFile.h

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

/* File: HashFile.h - db(3) to HashTable bridge
 *
 * By: Christopher Lane
 * Symbolic Systems Resources Group
 * Knowledge Systems Laboratory
 * Stanford University
 *
 * Date: 09 November 1992
 *
 * Copyright: 1990, 1991 & 1992 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>

@interface HashFile : HashTable
{
	Database *db;
	Data d;
	char *filename;
	BOOL readOnly;
	NXStream *stream;
	long offset;
}

/* 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;

/* 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;

@end

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