Copyright ©1995 by NeXT Computer, Inc.  All Rights Reserved.

IXRecordWriting



Adopted By: IXRecordManager
Incorporates: IXRecordReading
Declared In: indexing/protocols.h



Protocol Description

The IXRecordWriting protocol defines methods for storing Objective C objects in an object acting as an repository.  The stored objects are called records, and are identified by unsigned integers called handles.  IXRecordManager implements this protocol, along with IXRecordTranscription, in order to store objects.



Method Types

Manipulating records by handle addRecord:
replaceRecord:with:
removeRecord:
Emptying a record repository empty



Instance Methods

addRecord:
(unsigned int)addRecord:anObject

Adds anObject as a record to the repository, and returns the handle assigned to that record.

See also:  removeRecord:, replaceRecord:with:



empty
empty

Removes all records from the repository.  Returns self.

See also:  removeRecord:, clean (IXRecordManager class)



removeRecord:
removeRecord:(unsigned int)aHandle

Removes the record identified by aHandle from the repository.  The record is physically destroyed;  you can use discardRecord: with the IXRecordManager class if your code may need to retrieve the record again later.  Returns self, or nil if the record doesn't exist.

See also:  discardRecord: (IXRecordManager), empty, addRecord:



replaceRecord:with:
replaceRecord:(unsigned int)aHandle with:anObject

Overwrites the record identified by aHandle by storing anObject at that handle.  aHandle will then refer to anObject;  the original record is physically destroyed.  Returns nil if the record identified by aHandle doesn't exist, or if anObject is nil. Otherwise returns self.

See also:  addRecord: