-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathPath.cpp
More file actions
49 lines (38 loc) · 967 Bytes
/
Path.cpp
File metadata and controls
49 lines (38 loc) · 967 Bytes
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
#include "Path.h"
namespace Path
{
std::string MasterDirectory = "H:\\cyan";
std::string Combine(std::vector<std::string> strs)
{
if (strs.size() < 1)
return "";
std::string combined = strs[0];
for (int i = 1; i < strs.size(); i++)
combined += "\\" + strs[i];
return combined;
}
std::string Get(std::string name)
{
return Combine({ MasterDirectory, name });
}
std::string Get(std::string name, std::string type)
{
return Combine({ MasterDirectory, name + "." + type });
}
std::string ConfigDirectory()
{
return Combine({ MasterDirectory, "configs" });
}
std::string GetConfig(std::string name)
{
return Combine({ MasterDirectory, "configs", name });
}
std::string GetConfig(std::string name, std::string type)
{
return Combine({ MasterDirectory, "configs", name + "." + type });
}
std::string GetXMLConfig(std::string name)
{
return GetConfig(name, "xml");
}
}