home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / btree / IXStoreDirectory.h < prev    next >
Text File  |  1992-03-26  |  2KB  |  76 lines

  1. /*
  2. IXStoreDirectory.h
  3. Copyright 1991, NeXT Computer, Inc.
  4. */
  5.  
  6. #import    <objc/Object.h>
  7. #import    <store/IXStoreFile.h>
  8.  
  9. #ifndef    RELEASE_2
  10. @class IXBTreeCursor;
  11. #endif    RELEASE_2
  12.  
  13. // this class implements a simple directory for managing store clients.
  14.  
  15. #ifndef    RELEASE_2
  16. @interface IXStoreDirectory: Object <IXBlockAndStoreAccess, IXNameAndFileAccess>
  17. #else    RELEASE_2
  18. @interface IXStoreDirectory: Object
  19. #endif    RELEASE_2
  20. {
  21.     BOOL        _freeStore;
  22.     char        *_handleName;
  23.     unsigned        _blockHandle;
  24.     IXStore        *_store;
  25. #ifndef    RELEASE_2
  26.     IXBTreeCursor       *_btreeCursor;
  27. #else    RELEASE_2
  28.     id                  _btreeCursor;
  29. #endif    RELEASE_2
  30. }
  31.  
  32. // supplied class must be store client
  33. - addEntryNamed:(const char *)aName ofClass:aClass;
  34. - addEntryNamed:(const char *)aName ofClass:aClass 
  35.     atBlock:(unsigned)aHandle;
  36. - addEntryNamed:(const char *)aName forObject:anObject;
  37.  
  38. - (const char **)entries; // caller must free the array of entry names
  39.  
  40. - reset; // removes all entries
  41. - removeName:(const char *)aName; // removes, but doesn't free entry
  42.  
  43. - empty; // frees all entries
  44. - freeEntryNamed:(const char *)aName; // removes entry and frees from store
  45.  
  46. - (BOOL)hasEntryNamed:(const char *)aName;
  47. - openEntryNamed:(const char *)aName;
  48.  
  49. - getBlock:(unsigned *)aBlock ofEntryNamed:(const char *)aName;
  50. - getClass:(Class *)aClass ofEntryNamed:(const char *)aName;
  51.  
  52. #ifdef    RELEASE_2
  53. // @pr1ol IXBlockAndStoreAccess
  54.  
  55. + freeFromBlock:(unsigned)aHandle inStore:(id)aStore;
  56. - freeFromStore;
  57.  
  58. - initInStore:(id)aStore;
  59. - initFromBlock:(unsigned)aHandle inStore:(id)aStore;
  60.  
  61. - getBlock:(unsigned *)aHandle andStore:(id *)aStore;
  62.  
  63. // @protocol IXNameAndFileAccess
  64.  
  65. + freeFromName:(const char *)aName inFile:(const char *)aFile;
  66.  
  67. - initWithName:(const char *)aName inFile:(const char *)aFile;
  68. - initFromName:(const char *)aName inFile:(const char *)aFile 
  69.     forWriting:(BOOL)writingFlag;
  70.  
  71. - getName:(const char **)aName andFile:(const char **)aFile;
  72. #endif    RELEASE_2
  73.  
  74. @end
  75.  
  76.