-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProjectCompare.hpp
More file actions
67 lines (52 loc) · 2.19 KB
/
ProjectCompare.hpp
File metadata and controls
67 lines (52 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
////////////////////////////////////////////////////////////////////////////////
//! \file ProjectCompare.hpp
//! \brief The functions used to perform the project comparison.
//! \author Chris Oldwood
// Check for previous inclusion
#ifndef PROJECTCOMPARE_HPP
#define PROJECTCOMPARE_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <WCL/Path.hpp>
#include "ProjectFile.hpp"
#include "ToolSetting.hpp"
#include <set>
#include <map>
////////////////////////////////////////////////////////////////////////////////
// Type aliases.
//! A collection of filenames.
typedef std::vector<tstring> FileList;
//! A collection of vc++ projects.
typedef std::vector<ProjectFile> Projects;
//! A project setting value.
typedef Core::SharedPtr<tstring> ValuePtr;
//! The collection of project values.
typedef std::vector<ValuePtr> Values;
//! The map of configuration name to project values.
typedef std::map<tstring, Values> ConfigValues;
//! The map of setting name to configurations.
typedef std::map<tstring, ConfigValues> ConfigSettings;
//! The map of tool name to settings.
typedef std::map<tstring, ConfigSettings> ProjectSettings;
//! The row of project setting values.
typedef std::vector<tstring> Row;
//! The row smart-pointer type.
typedef Core::SharedPtr<Row> RowPtr;
//! The table of project settings.
typedef std::vector<RowPtr> Table;
//! A set of tool settings.
typedef std::set<ToolSetting> ToolSettings;
////////////////////////////////////////////////////////////////////////////////
// Functions.
// Find project files in a folder and its children.
bool findProjectFiles(const tstring& folder, FileList& files); // throw (Win32Exception)
// Read in all the project files.
bool readProjectFiles(Projects& projects);
// Parse the project files into a single structure.
bool parseProjectFiles(const Projects& projects, ProjectSettings& settings);
// Convert the raw project settings data to the table output format.
void listSettings(const Projects& projects, const ProjectSettings& settings, Table& results);
// Compare the project settings data and output a table of the differences.
void compareSettings(const Projects& projects, const ProjectSettings& settings, Table& results);
#endif // PROJECTCOMPARE_HPP