source: dev/trunk/ab5.0/abdev/abdev/include/ProjectManager.h@ 609

Last change on this file since 609 was 609, checked in by dai_9181, 16 years ago

ProjectInfo構造体のpWindowInfoメンバをwindowInfosメンバに置き換えた。

File size: 893 bytes
Line 
1#pragma once
2
3namespace ActiveBasic{ namespace IDE{
4
5class Project
6{
7 std::string name;
8 ActiveBasic::Common::TargetModuleType::EnumType moduleType;
9public:
10 void Open( const std::string &projectFileName );
11 void Close() const;
12 void Save() const;
13};
14typedef std::vector<Project *> Projects;
15
16class ProjectManager
17{
18 Projects projects;
19 Project *pCurrentProject;
20public:
21 ProjectManager()
22 : pCurrentProject( NULL )
23 {
24 }
25 ~ProjectManager()
26 {
27 if( IsOpenedProject() )
28 {
29 throw;
30 }
31 }
32 const Project &GetCurrentProject() const
33 {
34 return *pCurrentProject;
35 }
36 Project &GetCurrentProject()
37 {
38 return *pCurrentProject;
39 }
40
41 bool IsOpenedProject() const
42 {
43 return !projects.empty();
44 }
45 void OpenProject( const std::string &projectFileName );
46 void CloseProject( const std::string &projectName );
47
48 void CloseAllProjects();
49};
50
51
52}}
Note: See TracBrowser for help on using the repository browser.