home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / btree / IXPostingSet.h < prev    next >
Text File  |  1993-08-15  |  2KB  |  60 lines

  1. /*
  2. IXPostingSet.h
  3. Copyright 1991,NeXT Computer,Inc.
  4. */
  5.  
  6. #import    <objc/Object.h>
  7. #import "protocols.h"
  8.  
  9. // This class implements a dynamic array of postings, sorted by handle.  Its 
  10. // primary use is for combining sets of postings - i.e., performing set union, 
  11. // intersection and subtraction.
  12.  
  13. #ifdef    NX_COMPILER_RELEASE_3_0
  14. #import <remote/transport.h>
  15. typedef id <IXPostingExchange> IXPostingExchangeType;
  16. @interface IXPostingSet: Object <NXTransport, IXPostingExchange, IXPostingOperations>
  17. #else    NX_COMPILER_RELEASE_3_0
  18. typedef id IXPostingExchangeType;
  19. @interface IXPostingSet: Object
  20. #endif    NX_COMPILER_RELEASE_3_0
  21. {
  22. @public
  23.     unsigned        thisElement;
  24.     unsigned         numElements;
  25.     unsigned         maxElements;
  26.     struct IXPosting    *postings;
  27. }
  28.  
  29. // These two methods initialize the posting set with existing postings.  The
  30. // first method takes the postings from an object that conforms to the posting 
  31. // exchange protocol.  The second one takes the postings from the caller.
  32.  
  33. - initWithPostingsIn:(IXPostingExchangeType)anObject;
  34. - initCount:(unsigned)theCount andPostings:(const IXPosting *)thePostings;
  35.  
  36. // These methods perform set union, intersection and subtraction between the 
  37. // posting set and an object that conforms to the posting exchange protocol, 
  38. // leaving the result in the posting set.  These are commonly used to refine or 
  39. // expand query results on a posting cursor.
  40.  
  41. - formUnionWithPostingsIn:(IXPostingExchangeType)anObject;
  42. - formIntersectionWithPostingsIn:(IXPostingExchangeType)anObject;
  43. - subtractPostingsIn:(IXPostingExchangeType)anObject;
  44.  
  45. // This method sets the posting set to a specific position or element.  The 
  46. // numbering starts with zero.  The count is returned by the count method.
  47.  
  48. - (unsigned)setPosition:(unsigned)aPosition;
  49.  
  50. - setCount:(unsigned)theCount // sets the postings without copying.
  51.     andPostings:(IXPosting *)thePostings byCopy:(BOOL)aBoolean;
  52.  
  53. // The posting set can be archived to and unarchived from a typed stream.  It 
  54. // can also be passed between processes using the distributed object substrate.
  55.  
  56. - read:(NXTypedStream *)typedStream;
  57. - write:(NXTypedStream *)typedStream;
  58.  
  59. @end
  60.