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

IXPostingCursor



Inherits From: IXBTreeCursor : Object
Conforms To: IXPostingExchange
IXPostingOperations
IXCursorPositioning (IXBTreeCursor)
Declared In: btree/IXPostingCursor.h



Class Description

IXPostingCursor is a subclass of IXBTreeCursor that treats the values in its IXBTree as sets of postings, which are weighted references to data.  This class is primarily intended for maintaining inversions for databases.  An IXPostingCursor can be positioned in an IXBTree to find a set of postings, and from there the postings can be manipulated: each posting in the set can be examined, postings can be added to or removed from the set of postings, or the set can be completely emptied.  An IXPostingCursor can exchange its postings with any object that conforms to the IXPostingExchange protocol, including instances of IXPostingList and IXPostingSet.

IXPostingCursor is very efficient in the storage of postings.  Weights are stored only when needed; if all of the postings for a given key have zero weight, then only the handles are stored.  An IXPostingCursor with unweighted postings consumes half the storage of an IXPostingCursor with weighted postings.  Similarly, until 32-bit quantities are needed for  handles or weights, they're stored as 16-bit quantities on a per-key basis, and promoted as needed.  In addition, IXPostingCursor uses the range-oriented methods of IXBTreeCursor to read or write as little data as possible when manipulating posting sets.

Because of these efficiency measures, which modify the raw data stored in the IXBTree, you should never use IXBTreeCursor methods to directly access the data handled by an IXPostingCursor.  Specifically, you should never use the readValue:, readRange:ofLength:atOffset:, writeValue:andLength:, or writeRange:andLength:atOffset: methods.

For more information on basic cursoring techniques, see the IXCursorPositioning protocol specification.  For more information on manipulating postings, see the IXPostingExchange and IXPostingOperations protocol specifications.



Instance Variables

None declared in this class.



Adopted Protocols

IXPostingExchange setCount:andPostings:
getCount:andPostings:
IXPostingOperations addHandle:withWeight:
removeHandle:
count
empty
setFirstHandle
setNextHandle
setHandle:
getHandle:andWeight:



Instance Methods

None declared in this class.