ftp.nice.ch/pub/next/developer/languages/c/gcc.2.7.2.2.I.b.tar.gz#/lib/gcc-lib/i386-next-nextstep3/2.7.2.2.f.2/include/indexing/protocols.h

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

/*
protocols.h
Copyright 1991,NeXT Computer,Inc.
*/

#import	<objc/Object.h>
#import	<btree/protocols.h>

@class NXData, IXAttributeBinder;

@protocol IXRecordReading

- (unsigned)count;
- readRecord:(unsigned)record fromZone:(NXZone *)zone;
- readRecord:(unsigned)record; /* default malloc zone*/

@end

@protocol IXRecordWriting <IXRecordReading>

- empty;

- (unsigned)addRecord:anObject;
- replaceRecord:(unsigned)record with:anObject;
- removeRecord:(unsigned)record;

@end

/* This protocol controls the activation and passivation of objects.  By */
/* default, all objects respond to source:didReadRecord: with nil, through a */
/* category of Object.  This causes passivation with typed stream archiving.  */
/* For a much faster passivation mechanism, this method may return an object */
/* to be passivated; if self is returned, the receiver is passivated quickly.*/

@protocol IXRecordTranscription

- finishReading;
- source:aSource willWriteRecord:(unsigned)record;
- source:aSource didReadRecord:(unsigned)record;

@end

@protocol IXAttributeBinding

/* Returns the receiver's attribute binder, if it maintains one.*/
- (IXAttributeBinder *)attributeBinder;

/* Returns the receiver's bindings.  The sender owns the object returned.*/
- (IXAttributeBinder *)provideBindings;

@end

/* These methods evaluate the named instance variable for the specified record. */
/* NO is returned if the named instance variable does not exist.*/

@protocol IXTransientAccess

- (BOOL)getOpaqueValue:(NXData **)value 
    ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getIntValue:(int *)value 
    ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getFloatValue:(float *)value 
    ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getDoubleValue:(double *)value 
    ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getStringValue:(char **)value 
    ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getStringValue:(char **)value inLength:(unsigned)length 
    ofIvar:(const char *)name forRecord:(unsigned)record;
- (BOOL)getObjectValue:(Object **)value 
    ofIvar:(const char *)name forRecord:(unsigned)record;

@end

/* These methods evaluate the supplied selector for the specified record. */
/* NO is returned if the object does not respond to the supplied selector.*/

@protocol IXTransientMessaging

- (BOOL)getIntValue:(int *)value 
    ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getFloatValue:(float *)value
    ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getDoubleValue:(double *)value 
    ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getStringValue:(char **)value 
    ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getStringValue:(char **)value inLength:(unsigned)length 
    ofMessage:(SEL)selector forRecord:(unsigned)record;
- (BOOL)getObjectValue:(Object **)value 
    ofMessage:(SEL)selector forRecord:(unsigned)record;

@end

/* The following protocols are obselete, and may be not be defined in future */
/* releases.  The methods are now declared by the classes that implement them.*/

@protocol IXRecordDiscarding

- clean;
- discardRecord:(unsigned)record;
- reclaimRecord:(unsigned)record;

@end

@protocol IXBlobWriting

- (BOOL)getValue:(void **)value andLength:(unsigned *)length 
    ofBlob:(const char *)name forRecord:(unsigned)record;
- (BOOL)setValue:(const void *)value andLength:(unsigned)length 
    ofBlob:(const char *)name forRecord:(unsigned)record;

@end

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