home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Headers / misckit / MiscSortedList.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-12  |  1.2 KB  |  55 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. - unsort;
  40.  
  41. /* Access instance variables methods */
  42.  
  43. - (BOOL)ignoreCase;
  44. - (BOOL)sorted;
  45. - (BOOL)sortEnabled;
  46. - (int)sortOrder;
  47.  
  48. /* Setting instance variables methods */
  49.  
  50. - setIgnoreCase:(BOOL)flag;
  51. - setSortEnabled:(BOOL)flag;
  52. - setSortOrder:(int)order;
  53.  
  54. @end
  55.