home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
store
/
IXStoreBlock.h
< prev
next >
Wrap
Text File
|
1992-04-28
|
2KB
|
69 lines
/*
IXStoreBlock.h
Copyright 1991, NeXT Computer, Inc.
*/
#import "protocols.h"
#import "IXStore.h"
#ifndef RELEASE_2
#import <machkit/reference.h>
#else RELEASE_2
#import "reference.h"
#endif RELEASE_2
#import <objc/Object.h>
extern unsigned
IXWriteRootObjectToStore(IXStore *aStore,
unsigned aHandle, id anObject);
extern id
IXReadObjectFromStore(IXStore *aStore,
unsigned aHandle, NXZone *aZone);
#ifndef RELEASE_2
@interface IXStoreBlock: Object <NXReference,IXBlockAndStoreAccess>
#else RELEASE_2
@interface IXStoreBlock: Object
#endif RELEASE_2
{
unsigned _references;
@public
IXStore *store;
unsigned handle;
unsigned blockSize;
}
- (unsigned)copyAtOffset:(unsigned)offset forLength:(unsigned)length;
- close; // makes block available to other contexts
// opens for writing; shadows region if transactions enabled
- (void *)openAtOffset:(unsigned)offset forLength:(unsigned)length;
// opens for reading; opened region not shadowed
- (void *)readAtOffset:(unsigned)offset forLength:(unsigned)length;
- (unsigned)size; // locks and determines the size of the block
- resizeTo:(unsigned)size; // resizes the block; the block may move
- readObject; // opens typed stream on block and calls NXReadObject()
- writeObject:anObject; // calls NXWriteRootObject(), copies archive to block
#ifdef RELEASE_2
// @protocol NXReference
- (unsigned) references;
- addReference;
// @protocol IXBlockAndStoreAccess
+ freeFromBlock:(unsigned)aHandle inStore:(id)aStore;
- initInStore:(id)aStore;
- initFromBlock:(unsigned)aHandle inStore:(id)aStore;
- freeFromStore;
- getBlock:(unsigned *)aHandle andStore:(id *)aStore;
#endif RELEASE_2
@end