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
36extern NSString * const ProjectNameDidChangeNotification;
37
38extern NSString * const ProjectDocumentErrorDomain;
39enum {
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
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
This class is the principal document class for project files.
Definition ProjectDocument.h:44
NSArray * projectModules
Returns the project modules of the receiver.
Definition ProjectDocument.h:50
NSArray * moduleMenuEntries
An array of menu items of project modules which are to appear in the Modules menu.
Definition ProjectDocument.h:56
id< ProjectType > projectType
Returns the project type object associated currently with the project.
Definition ProjectDocument.h:48
NSString * projectName
Returns the abstract project name.
Definition ProjectDocument.h:46
NSString * projectTypeID
Returns the type ID of the project's project type.
Definition ProjectDocument.h:47
NSString * projectDirectory
Returns a path to where the project's directory is located.
Definition ProjectDocument.h:45
Definition ProjectWindowController.h:40