ProjectManager  0.2
ProjectDocument.h
1 /*
2  ProjectDocument.h
3 
4  Interface declaration of the ProjectDocument class for the
5  ProjectManager application.
6 
7  Copyright (C) 2005, 2006 Saso Kiselkov
8 
9  This program is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23 
24 #import <AppKit/NSDocument.h>
25 
26 @class NSString,
27  NSArray,
28  NSMutableArray,
29  NSMutableDictionary,
30  NSError;
31 
33 
34 @protocol ProjectType, ProjectModule;
35 
36 extern NSString * const ProjectNameDidChangeNotification;
37 
38 extern NSString * const ProjectDocumentErrorDomain;
39 enum {
40  ProjectNameInvalidError
41 };
42 
43 @interface ProjectDocument : NSDocument
44 {
45  NSString * projectDirectory;
46  NSString * projectName;
47  NSString * projectTypeID;
48  id <ProjectType> projectType;
49 
50  NSArray * projectModules;
51 
56  NSArray * moduleMenuEntries;
57 
59 }
60 
61 + (BOOL) validateProjectName: (NSString *) aProjectName
62  error: (NSError **) error;
63 
64 - (NSArray *) projectMenuEntries;
65 
66 - (NSString *) projectName;
67 - (void) setProjectName: (NSString *) aName;
68 
69 - (NSString *) projectDirectory;
70 - (void) setProjectName: (NSString *) projectName;
71 
72 - (NSString *) projectTypeID;
73 - (id <ProjectType>) projectType;
74 
75 - (NSArray *) projectModules;
76 - (id <ProjectModule>) projectModuleWithName: (NSString *) moduleName;
77 
78 - (void) setCurrentProjectModule: (id <ProjectModule>) aModule;
79 - (id <ProjectModule>) currentProjectModule;
80 
81 - (BOOL) openFile: (NSString *) aPath inCodeEditorOnLine: (int) aLine;
82 
83 - (void) logMessage: (NSString *) aMessage;
84 
85 @end
ProjectWindowController
Definition: ProjectWindowController.h:39
+[ProjectDocument validateProjectName:error:]
BOOL validateProjectName:error:(NSString *aProjectName,[error] NSError **error)
Checks whether a given string is a valid project name.
Definition: ProjectDocument.m:196
ProjectTemplateDescription::parent
ProjectTypeDescription * parent
Returns the parent type description which contains this template description.
Definition: ProjectTemplateDescription.h:36
ProjectTypeLoader
Definition: ProjectTypeLoader.h:31
ProjectDocument::projectType
id< ProjectType > projectType
Returns the project type object associated currently with the project.
Definition: ProjectDocument.h:48
ProjectDocument
Definition: ProjectDocument.h:43
ProjectTypeDescription
The description of a project type.
Definition: ProjectTypeDescription.h:31
ProjectModule-p
This protocol declares methods which project modules must implement.
Definition: ProjectModule.h:44
ProjectDocument::moduleMenuEntries
NSArray * moduleMenuEntries
An array of menu items of project modules which are to appear in the Modules menu.
Definition: ProjectDocument.h:56
ProjectDocument::projectDirectory
NSString * projectDirectory
Returns a path to where the project's directory is located.
Definition: ProjectDocument.h:45
ProjectTemplateDescription::name
NSString * name
Returns the receiver's template's name.
Definition: ProjectTemplateDescription.h:33
-[ProjectTypeDescription name]
NSString * name()
Returns the name of the receiver's project type.
Definition: ProjectTypeDescription.m:70
ProjectDocument::projectTypeID
NSString * projectTypeID
Returns the type ID of the project's project type.
Definition: ProjectDocument.h:47
ProjectDocument::projectModules
NSArray * projectModules
Returns the project modules of the receiver.
Definition: ProjectDocument.h:50
+[ProjectTypeLoader shared]
id shared()
Returns a shared instance of a ProjectTypeLoader.
Definition: ProjectTypeLoader.m:38
-[ProjectTypeDescription projectType]
Class projectType()
Returns the class from which this type description has been generated.
Definition: ProjectTypeDescription.m:127
ProjectType-p
This protocol is adopted by project type support objects.
Definition: ProjectType.h:40
ProjectDocument::projectName
NSString * projectName
Returns the abstract project name.
Definition: ProjectDocument.h:46
ProjectTemplateDescription
A project template description.
Definition: ProjectTemplateDescription.h:31
ProjectCreator
Definition: ProjectCreator.h:39