home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / indexing / IXPostingList.h < prev    next >
Text File  |  1992-05-18  |  1KB  |  43 lines

  1. /*
  2. IXPostingList.h
  3. Copyright 1991,NeXT Computer,Inc.
  4. */
  5.  
  6. #import    <objc/List.h>
  7. #import    <remote/transport.h>
  8. #import    "protocols.h"
  9.  
  10. // this class implements a lazy, weighted list of objects, accessible by reading from a record source.
  11.  
  12. @interface IXPostingList: List <IXPostingExchange, NXTransport>
  13. {
  14. @public
  15.     unsigned            maxPointers;
  16.     id <IXRecordReading>    recordSource;
  17.     struct IXPosting        *postingList;
  18. }
  19.  
  20. - (id <IXRecordReading>)source;
  21. - initWithSource:(id <IXRecordReading>)aSource;
  22. - initWithSource:(id <IXRecordReading>)aSource 
  23.     andPostingsIn:(id <IXPostingExchange>)anObject;
  24.  
  25. - addObject:anObject withWeight:(unsigned)weight;
  26. - insertObject:anObject withWeight:(unsigned)weight at:(unsigned)index;
  27. - replaceObjectAt:(unsigned)index with:anObject weight:(unsigned)weight;
  28.  
  29. - (unsigned)indexForHandle:(unsigned)handle;
  30. - (unsigned)handleOfObjectAt:(unsigned)index;
  31. - (unsigned)weightOfObjectAt:(unsigned)index;
  32.  
  33. - addHandle:(unsigned)handle withWeight:(unsigned)weight;
  34. - insertHandle:(unsigned)handle withWeight:(unsigned)weight at:(unsigned)index;
  35. - replaceHandleAt:(unsigned)index 
  36.     with:(unsigned)handle weight:(unsigned)weight;
  37.  
  38. - sortByWeightAscending:(BOOL)boolean;
  39. - sortBySelector:(SEL)selector ascending:(BOOL)boolean;
  40.  
  41. @end
  42.  
  43.