2
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3
* http://www.gnu.org/licenses/gpl-3.0.html
6
#ifndef MSVCWORKSPACEBASE_H
7
#define MSVCWORKSPACEBASE_H
9
#include <wx/version.h>
10
#include <wx/arrstr.h>
11
#include <wx/hashmap.h>
15
// common features for MSVC importers, version 6, 7 etc.
16
// note that there's no workspace config in MSVC6...
17
class MSVCWorkspaceBase {
20
virtual ~MSVCWorkspaceBase();
23
// register a new project in the project array
24
virtual void registerProject(const wxString& projectID, cbProject* project);
26
virtual void addDependency(const wxString& projectID, const wxString& dependencyID);
27
// add a workspace config
28
virtual void addWorkspaceConfiguration(const wxString& config);
29
// add a matching between a workspace configuration and a project configuration
30
virtual void addConfigurationMatching(const wxString& projectID, const wxString& workspConfig, const wxString& projConfig);
31
// update cbProjects and cbWorkspace once parsing done
32
virtual void updateProjects();
35
// hash for configurations matchings
36
WX_DECLARE_STRING_HASH_MAP(wxString, ConfigurationMatchings);
37
// project record while parsing
38
struct ProjectRecord {
39
// current project data structure
41
// list of the IDs of projects that the current project depend on
42
wxSortedArrayString _dependencyList;
43
// which project-config each solution-config correspond to
44
ConfigurationMatchings _configurations;
45
// default constructor
46
ProjectRecord() : _project(0) {}
47
// constructor with a project data structure
48
ProjectRecord(cbProject* project) : _project(project) {}
51
// an associative array of project records indexed by project ID which are:
52
// UUIDs in MSVC7, like "{35AFBABB-DF05-43DE-91A7-BB828A874015}" (with brackets, no quotes)
53
// Project names in MSVC6
54
WX_DECLARE_STRING_HASH_MAP(ProjectRecord, HashProjects);
55
// list of projects records
56
HashProjects _projects;
57
// build configurations for the workspace (i.e. solution)
58
wxSortedArrayString _workspaceConfigurations;
61
#endif // MSVCWORKSPACEBASE_H