-
Notifications
You must be signed in to change notification settings - Fork 0
/
Project.h
80 lines (63 loc) · 1.5 KB
/
Project.h
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
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef JET_PROJECT_HEADER
#define JET_PROJECT_HEADER
#include <string>
#include <vector>
#include <fstream>
#include <map>
namespace Jet
{
std::string GetNameFromPath(const std::string& path);
class Source;
class JetProject
{
public:
struct Element;
struct Document
{
std::map<std::string, Element*> sections;
};
struct Element
{
std::map<std::string, std::vector<std::string>*> children;
};
private:
bool opened, is_executable;
JetProject()
{
document = 0;
opened = false;
version = "0.0.0";//default version for if one is not specified
}
bool _Load(const std::string& projectdir);
std::vector<std::string> resolved_deps;
public:
Document* document;
std::string path;
std::string project_name;
std::string version;
std::vector<std::string> files;
std::vector<std::string> dependencies;//jet libraries we want to use
std::vector<std::string> libs;//libraries to link to
std::vector<std::string> headers;//headers to convert and add to the project
std::map<std::string, bool> defines;//conditional compilation
~JetProject()
{
delete[] this->document;
}
struct BuildConfig
{
std::string name;
std::string prebuild, postbuild;
std::string options;
};
std::vector<BuildConfig> configurations;
bool IsExecutable()
{
return this->is_executable;
}
std::map<std::string, Source*> GetSources();
static JetProject* Load(const std::string& projectdir);
const std::vector<std::string>& ResolveDependencies();
};
}
#endif