home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / ProjectBuilder.framework / Versions / A / Headers / PBProject.h < prev    next >
Encoding:
Text File  |  1997-03-14  |  5.3 KB  |  158 lines

  1. // PBProject.h
  2. // Copyright 1992-1997 Apple Computer, Inc.
  3.  
  4. // NOTE: This API is tentative and is subject to change in future releases.
  5. //   No assurance is provided that backward compatibility will be kept.
  6.  
  7. #import <Foundation/Foundation.h>
  8. #import <ProjectBuilder/PBSystem.h>
  9.  
  10. typedef int ProjectMutationBits;
  11. @class PBProjectType;
  12.  
  13. @interface PBProject : NSObject 
  14. {
  15.     NSMutableDictionary * dict;
  16.     NSString * projectDir;
  17.     NSString * languageDirCache;
  18.     NSMutableArray * subprojects;
  19.     PBProject * superProject;
  20.     NSString * canonicalFile;
  21.     NSDate * fileModTime;
  22.     ProjectMutationBits    touched;
  23.     NSMutableString *errorMessage;
  24. }
  25. + (PBProject *) parse: (NSString *) pathName;
  26. + (Class)arrayClass;
  27. + (Class)dictionaryClass;
  28.  
  29. - (BOOL) checkDictionary;
  30. - (BOOL) unparse;
  31. - (NSString *) errorMessage;
  32.  
  33. - (id)copyWithZone:(NSZone *)zone;; //produces immutable copy!
  34.  
  35. - (void)setObject: (id)anObject forKey: (NSString *)key;
  36. - (id)objectForKey: (NSString *)key;
  37. - (void)removeObjectForKey:(NSString *)aKey;
  38. - (void)renameProject:(NSString *)pathName;
  39.  
  40. - (NSString *) canonicalFile;
  41. - (PBProjectType *) projectType;
  42. - (NSString *) projectTypeName;
  43. - (NSString *) projectName;
  44. - (NSString *) projectDir;
  45. - (NSString *) languageDir; 
  46. - (NSString *) languageName;
  47. - (NSString *) appIconFileForOSType: (int) anOS;
  48. - (NSString *) appHelpFileForOSType: (int) anOS;
  49. - (NSString *) bundleExtension;
  50. - (NSMutableArray *) docExtensionsForOSType: (int) anOSType;
  51. - (NSString *) versionNb;
  52. - (NSString *) applicationClass;// depricated API, use principalClass
  53. - (NSString *) principalClass;
  54. - (NSString *) mainNibFileForOSType: (int) anOSType;
  55.  
  56. - (NSString *) projectVersion;
  57. - (void)setProjectVersion:(NSString *)version;
  58.  
  59. - (NSString *) shouldGenerateMain;
  60. - (void)setShouldGenerateMain: (NSString *) shouldI;
  61.  
  62. - (void) setTouched: (ProjectMutationBits) touch;
  63. - (ProjectMutationBits) touched;
  64.  
  65. - (NSDictionary *) filesTable;
  66. - (NSMutableArray *) fileListForKey:(NSString *)aKey create:(BOOL)createIt;
  67. - (NSMutableArray *) fileListForKey:(NSString *)aKey;  // creates an empty one if nil
  68. - (NSString *) keyForFile:(NSString *)aFile;
  69.     /* If nil is returned, there is no such file in project. Otherwise the key
  70.      * associated to the category the file lies in is returned.
  71.      */
  72.      
  73. - (NSArray *)otherLinkedOFiles;
  74. - (void)addSystemExtensions:(NSString *)ext;
  75. - (NSArray *)systemExtensions;
  76.  
  77. - (void)setVersionNb:(NSString *)vn;
  78. - (void)setProjectType:(NSString *)type; 
  79. - (void)setProjectDir:(NSString *)dir;
  80. - (void)setProjectName:(NSString *)name;
  81. - (void)setLanguageName:(NSString *)l;
  82. - (void)setAppIconFile: (NSString *)iconFile forOSType: (int) anOS;
  83. - (void)setAppHelpFile: (NSString *)helpFile forOSType: (int) anOS;
  84. - (void)setMainNibFile: (NSString *) mainNib forOSType: (int) anOS;
  85. - (void)setApplicationClass:(NSString *)appClass; // old; do not use;
  86. - (void)setPrincipalClass:(NSString *)pClass;
  87. - (void)setBundleExtension:(NSString *)ext;
  88.  
  89. // For all the following 'aFile' is a fileName not a full pathName
  90. - (void)addFile:(NSString *)aFile key:(NSString *)aKey;
  91. - (void)addFileToFront:(NSString *)aFile key:(NSString *)aKey;
  92. - (void)removeFile:(NSString *)aFile key:(NSString *)aKey;
  93. - (NSDictionary *)localFiles;
  94. - (BOOL)isLocalizable:(NSString *)aFile;
  95. - (void)makeFile:(NSString *)aFile localizable:(BOOL)loc;
  96.  
  97. - (NSString *)buildDir;
  98. - (NSArray *) parseSubprojects;
  99. - (PBProject *)parseSubproject: (NSString *)subKey;
  100. - (BOOL)isPublic:(NSString *)aFile;
  101. - (void)makeFile:(NSString *)aFile public:(BOOL)isPublic;
  102. - (NSArray *)subprojects;
  103. - (PBProject *)superProject;
  104. - (PBProject *)rootProject;
  105. - (PBProject *)nonAggregateRootProject;
  106.  
  107. - (NSString *) lookupMakeVariable: (NSString *) makeVariable;
  108. - setMakeVariable: (NSString *) makeVariable toValue: (NSString *) value;
  109. - (NSDictionary *) makeEnvironment;  
  110. @end
  111.  
  112.  
  113. // Values that can be used in ProjectMutationBits
  114.  
  115. #define TOUCHED_NOTHING        (0)
  116. #define TOUCHED_EVERYTHING    (1 << 0)
  117. #define TOUCHED_PROJECT_NAME    (1 << 1)
  118. #define TOUCHED_LANGUAGE    (1 << 2)
  119. #define TOUCHED_PROJECT_TYPE    (1 << 3)
  120. #define TOUCHED_INSTALL_DIR    (1 << 4)
  121. #define TOUCHED_ICON_NAMES    (1 << 5)
  122. #define TOUCHED_FILES        (1 << 6)
  123. #define TOUCHED_MAINNIB        (1 << 7)
  124. #define TOUCHED_APPCLASS    (1 << 8) // use TOUCH_PRINCIPALCLASS
  125. #define TOUCHED_PRINCIPALCLASS    (1 << 8)
  126. #define TOUCHED_TARGETS        (1 << 9)
  127. #define TOUCHED_PB_PROJECT    (1 << 10)
  128. #define TOUCHED_SYST_EXT    (1 << 11)
  129. #define TOUCHED_EXTENSION    (1 << 12)
  130. #define TOUCHED_PATHS        (1 << 13)
  131.  
  132. // Project File Keys
  133. PB_EXTERN NSString *PB_ClassesKey;
  134. PB_EXTERN NSString *PB_HeadersKey;
  135. PB_EXTERN NSString *PB_OtherSourcesKey;
  136. PB_EXTERN NSString *PB_OtherResourcesKey;
  137. PB_EXTERN NSString *PB_SupportingFilesKey;
  138. PB_EXTERN NSString *PB_ProjectHeadersKey;
  139. PB_EXTERN NSString *PB_PublicHeadersKey;
  140. PB_EXTERN NSString *PB_PrecompiledHeadersKey;
  141. PB_EXTERN NSString *PB_SubprojectsKey;
  142. PB_EXTERN NSString *PB_InterfacesKey;
  143. PB_EXTERN NSString *PB_ImagesKey;
  144. PB_EXTERN NSString *PB_LocalizableFilesKey;
  145. PB_EXTERN NSString *PB_FrameworksKey;
  146. PB_EXTERN NSString *PB_OtherLibsKey;
  147. PB_EXTERN NSString *PB_NonProjectFilesKey;
  148.  
  149. @interface NSArray (Extra)
  150. - (id) deepMutableNotifyingCopy;    // uses MutableNotifyingArrays
  151. - (id) deepNSMutableCopy;         // uses NSMutableArrays
  152. @end
  153.  
  154. @interface NSDictionary (Extra)
  155. - (id) deepMutableNotifyingCopy;    // uses MutableNotifyingDictionarys
  156. - (id) deepNSMutableCopy;         // uses NSMutableDictionarys
  157. @end
  158.