ProjectManager  0.2
ProjectDocument.h
00001 /*
00002     ProjectDocument.h
00003 
00004     Interface declaration of the ProjectDocument class for the
00005     ProjectManager application.
00006 
00007     Copyright (C) 2005, 2006  Saso Kiselkov
00008 
00009     This program is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013 
00014     This program is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018 
00019     You should have received a copy of the GNU General Public License
00020     along with this program; if not, write to the Free Software
00021     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00022 */
00023 
00024 #import <AppKit/NSDocument.h>
00025 
00026 @class NSString,
00027        NSArray,
00028        NSMutableArray,
00029        NSMutableDictionary,
00030        NSError;
00031 
00032 @class ProjectWindowController;
00033 
00034 @protocol ProjectType, ProjectModule;
00035 
00036 extern NSString * const ProjectNameDidChangeNotification;
00037 
00038 extern NSString * const ProjectDocumentErrorDomain;
00039 enum {
00040   ProjectNameInvalidError
00041 };
00042 
00043 @interface ProjectDocument : NSDocument
00044 {
00045   NSString * projectDirectory;
00046   NSString * projectName;
00047   NSString * projectTypeID;
00048   id <ProjectType> projectType;
00049 
00050   NSArray * projectModules;
00051 
00056   NSArray * moduleMenuEntries;
00057 
00058   ProjectWindowController * wc;
00059 }
00060 
00061 + (BOOL) validateProjectName: (NSString *) aProjectName
00062                        error: (NSError **) error;
00063 
00064 - (NSArray *) projectMenuEntries;
00065 
00066 - (NSString *) projectName;
00067 - (void) setProjectName: (NSString *) aName;
00068 
00069 - (NSString *) projectDirectory;
00070 - (void) setProjectName: (NSString *) projectName;
00071 
00072 - (NSString *) projectTypeID;
00073 - (id <ProjectType>) projectType;
00074 
00075 - (NSArray *) projectModules;
00076 - (id <ProjectModule>) projectModuleWithName: (NSString *) moduleName;
00077 
00078 - (void) setCurrentProjectModule: (id <ProjectModule>) aModule;
00079 - (id <ProjectModule>) currentProjectModule;
00080 
00081 - (BOOL) openFile: (NSString *) aPath inCodeEditorOnLine: (int) aLine;
00082 
00083 - (void) logMessage: (NSString *) aMessage;
00084 
00085 @end