-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIncludeManager.hpp
More file actions
48 lines (36 loc) · 1.41 KB
/
Copy pathIncludeManager.hpp
File metadata and controls
48 lines (36 loc) · 1.41 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
#ifndef RUNCPP2_INCLUDE_MANAGER_HPP
#define RUNCPP2_INCLUDE_MANAGER_HPP
#if !defined(NOMINMAX)
#define NOMINMAX 1
#endif
#include "ghc/filesystem.hpp"
#include <unordered_map>
#include <vector>
#if INTERNAL_RUNCPP2_UNIT_TESTS
class IncludeManagerAccessor;
#endif
namespace runcpp2
{
class IncludeManager
{
public:
IncludeManager() = default;
~IncludeManager() = default;
bool Initialize(const ghc::filesystem::path& buildDir);
bool WriteIncludeRecord(const ghc::filesystem::path& sourceFile,
const std::vector<ghc::filesystem::path>& includes);
bool ReadIncludeRecord( const ghc::filesystem::path& sourceFile,
std::vector<ghc::filesystem::path>& outIncludes,
ghc::filesystem::file_time_type& outRecordTime);
bool NeedsUpdate( const ghc::filesystem::path& sourceFile,
const std::vector<ghc::filesystem::path>& includes,
const ghc::filesystem::file_time_type& recordTime) const;
private:
#if INTERNAL_RUNCPP2_UNIT_TESTS
friend class ::IncludeManagerAccessor;
#endif
ghc::filesystem::path GetRecordPath(const ghc::filesystem::path& sourceFile) const;
ghc::filesystem::path IncludeRecordDir;
};
}
#endif