-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildsManager.hpp
More file actions
51 lines (39 loc) · 1.62 KB
/
Copy pathBuildsManager.hpp
File metadata and controls
51 lines (39 loc) · 1.62 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
#ifndef RUNCPP2_BUILDS_MANAGER_HPP
#define RUNCPP2_BUILDS_MANAGER_HPP
#include "ghc/filesystem.hpp"
#include <unordered_map>
#if INTERNAL_RUNCPP2_UNIT_TESTS
class BuildsManagerAccessor;
#endif
namespace runcpp2
{
class BuildsManager
{
#if INTERNAL_RUNCPP2_UNIT_TESTS
friend class ::BuildsManagerAccessor;
#endif
private:
ghc::filesystem::path ConfigDirectory;
std::unordered_map<std::string, std::string> Mappings;
std::unordered_map<std::string, std::string> ReverseMappings;
ghc::filesystem::path BuildDirectory;
ghc::filesystem::path MappingsFile;
bool Initialized;
bool ParseMappings(const std::string& mappingsContent);
std::string ProcessPath(const std::string& path);
public:
BuildsManager(const ghc::filesystem::path& configDirectory);
BuildsManager(const BuildsManager& other);
BuildsManager& operator=(const BuildsManager& other);
~BuildsManager();
bool Initialize();
bool CreateBuildMapping(const ghc::filesystem::path& scriptPath);
bool RemoveBuildMapping(const ghc::filesystem::path& scriptPath);
bool HasBuildMapping(const ghc::filesystem::path& scriptPath);
bool GetBuildMapping( const ghc::filesystem::path& scriptPath,
ghc::filesystem::path& outPath);
bool RemoveAllBuildsMappings();
bool SaveBuildsMappings();
};
}
#endif