Ignore:
Timestamp:
May 19, 2008, 5:10:15 PM (16 years ago)
Author:
dai_9181
Message:

・PROJECTINFO構造体を廃止し、Projectクラスを採用した。
・ProjectInfoをprojectInfoにリネーム

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/abdev/include/ProjectManager/ProjectManager.h

    r615 r618  
    11#pragma once
    22
    3 struct PROJECTINFO{
     3
     4namespace ActiveBasic{ namespace IDE{
     5
     6class Project
     7{
     8public:
    49    DWORD dwModuleType;
    510
     
    3944    _int8 ModifuOfResource;
    4045    _int8 modify;
    41 };
    42 
    43 namespace ActiveBasic{ namespace IDE{
    44 
    45 class Project
    46 {
    47     std::string name;
    48     ActiveBasic::Common::TargetModuleType::EnumType moduleType;
    49 public:
    50     void Open( const std::string &projectFileName );
    51     void Close() const;
    52     void Save() const;
    53 };
    54 typedef std::vector<Project *> Projects;
    55 
    56 class ProjectManager
    57 {
    58     Projects projects;
    59     Project *pCurrentProject;
    60 public:
    61     ProjectManager()
    62         : pCurrentProject( NULL )
    63     {
    64     }
    65     ~ProjectManager()
    66     {
    67         if( IsOpenedProject() )
    68         {
    69             throw;
    70         }
    71     }
    72     const Project &GetCurrentProject() const
    73     {
    74         return *pCurrentProject;
    75     }
    76     Project &GetCurrentProject()
    77     {
    78         return *pCurrentProject;
    79     }
    8046
    8147    bool IsOpenedProject() const
    8248    {
    83         return !projects.empty();
     49        return ( name[0] != '\0' );
    8450    }
    85     void OpenProject( const std::string &projectFileName );
    86     void CloseProject( const std::string &projectName );
    87 
    88     void CloseAllProjects();
    8951};
    9052
     
    9254}}
    9355
    94 extern ActiveBasic::IDE::ProjectManager projectManager;
    95 extern PROJECTINFO ProjectInfo;
     56extern ActiveBasic::IDE::Project projectInfo;
Note: See TracChangeset for help on using the changeset viewer.