home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / MiscKit / Headers / misckit / MiscSortedList.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-23  |  1.2 KB  |  54 lines

  1. //
  2. //    MiscSortedList.h -- MiscList subclass which keeps elements in sorted order
  3. //        Written by Doug McClure Copyright (c) 1994 by Doug McClure.
  4. //                Version 1.0.  All rights reserved.
  5. //
  6. //        This notice may not be removed from this source code.
  7. //
  8. //    This object is included in the MiscKit by permission from the author
  9. //    and its use is governed by the MiscKit license, found in the file
  10. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  11. //    for a list of all applicable permissions and restrictions.
  12. //    
  13.  
  14.  
  15. #import <appkit/appkit.h>
  16. #import <misckit/MiscProtocols.h>
  17. #import <misckit/MiscList.h>
  18.  
  19. #ifndef Misc_ASCENDING
  20. #define Misc_ASCENDING    1
  21. #define Misc_DESCENDING    (-1)
  22. #endif
  23.  
  24. @interface MiscSortedList : MiscList
  25. {
  26.   BOOL ignoreCase;
  27.   int sortOrder;
  28.  
  29. @private
  30.   BOOL sorted;
  31.   BOOL sortEnabled;
  32. }
  33.  
  34. /* New inserting and sorting methods */
  35.  
  36. - (int)compare:objectA to:objectB caseCheck:(BOOL)flag;
  37. - insertObjectBySort:anObject;
  38. - sort;
  39.  
  40. /* Access instance variables methods */
  41.  
  42. - (BOOL)ignoreCase;
  43. - (BOOL)sorted;
  44. - (BOOL)sortEnabled;
  45. - (int)sortOrder;
  46.  
  47. /* Setting instance variables methods */
  48.  
  49. - setIgnoreCase:(BOOL)flag;
  50. - setSortEnabled:(BOOL)flag;
  51. - setSortOrder:(int)order;
  52.  
  53. @end
  54.