home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextLibrary / Frameworks / NEXTIME.framework / Versions / A / Headers / NTComponent.h < prev    next >
Encoding:
Text File  |  1995-08-30  |  1.6 KB  |  67 lines

  1. /*
  2.  *  NTComponent.h
  3.  *     Copyright 1992, NeXT Computer, Inc.
  4.  *    
  5.  *    In-core representation of a potentially loadable object
  6.  *    and it's properties
  7.  *
  8.  *    17 Sept 1992 mpaque Created.
  9.  */
  10. #import <Foundation/NSObject.h>
  11. #import <Foundation/NSArray.h>
  12. #import <Foundation/NSString.h>
  13. #import <Foundation/NSBundle.h>
  14. #import <Foundation/NSDictionary.h>
  15. #import "NTValueDictionary.h"
  16.  
  17. @protocol NTComponent <NSObject>
  18. // The NTComponent class provides a way for an instance to find it's
  19. // class's component, for access to component resources.
  20.  
  21. // Given a principal class, return the component
  22. + componentForClass:class;
  23.  
  24. // Given a directory, build a list of components for the
  25. // bundle in the directory.
  26. + (NSArray *)newForDirectory:(NSString *)fullpath;
  27.  
  28. // Access to NTComponent contents
  29. - (NSBundle *)bundle;
  30. - (bycopy NSDictionary *)dictionary;
  31. - principalClass;
  32. - classNamed:(NSString *)classname;
  33.  
  34. // Construction of instances from the classes within the component
  35. - newInstance;
  36. - newInstanceFromClassNamed:(in NSString *)classname;
  37.  
  38. @end
  39.  
  40. @class NSLock;
  41.  
  42. @interface NTComponent:NSObject <NTComponent>
  43. {
  44. @private
  45.     NSLock *        instLock;
  46.     unsigned        refcount;
  47.     id            bundle;        // Private subclass of NXBundle
  48.     NSMutableDictionary *    dictionary;
  49.     Class            _principalClass;
  50.     struct mach_header *    _mach_header;
  51.     BOOL            _codeLoaded;
  52. }
  53.  
  54. + (void)initialize;
  55.  
  56. // Initialize and return a list of components from a bundle directory
  57. + (NSArray *)newForDirectory:(NSString *)fullpath;
  58.  
  59. // designated initializer
  60. - initWithDictionary    :(NSDictionary *)dictionary
  61.     forBundle    :(NSBundle *)bundle;
  62. - (struct mach_header *)machHeader;
  63.  
  64.  
  65. @end
  66.  
  67.