CPGen
C++ project generator
Loading...
Searching...
No Matches
ModuleResolver.hpp
Go to the documentation of this file.
1#pragma once
2
15#include <filesystem>
16#include <nlohmann/json.hpp>
17#include <string>
18#include <vector>
19
39public:
45
61 std::pair<ResolvedModule, std::vector<TargetInjection>>
62 resolveModule(const std::string &module_name);
63
64private:
69 void resolvePaths();
70
78 static std::pair<ResolvedModule, std::vector<TargetInjection>>
79 loadModule(const std::filesystem::path &path);
80
87 static std::vector<TargetInjection>
88 readInjection(const nlohmann::json &json_obj);
89
90 std::vector<std::filesystem::path>
91 m_resolved_paths;
92};
Output types produced by the resolver pipeline.
Resolves module names to their fully parsed ResolvedModule descriptors.
Definition ModuleResolver.hpp:38
ModuleResolver()
Constructs a ModuleResolver and resolves template search paths.
Definition ModuleResolver.cpp:12
std::pair< ResolvedModule, std::vector< TargetInjection > > resolveModule(const std::string &module_name)
Locate and parse a module by name.
Definition ModuleResolver.cpp:15