MCPcopy Create free account
hub / github.com/KDAB/codebrowser / ProjectManager

Class ProjectManager

generator/projectmanager.h:54–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53
54struct ProjectManager {
55 explicit ProjectManager(std::string outputPrefix, std::string _dataPath)
56 : outputPrefix(std::move(outputPrefix)) , dataPath(std::move(_dataPath))
57 {
58 if (dataPath.empty())
59 dataPath = "../data";
60 }
61
62 void addProject(ProjectInfo info);
63
64 std::vector<ProjectInfo> projects =
65 { {"include", "/usr/include/", ProjectInfo::Internal } };
66
67 std::string outputPrefix;
68 std::string dataPath;
69
70 // the file name need to be canonicalized
71 ProjectInfo *projectForFile(llvm::StringRef filename); // don't keep a cache
72
73 // return true if the filename should be proesseded.
74 // 'project' is the value returned by projectForFile
75 bool shouldProcess(llvm::StringRef filename, ProjectInfo *project);
76
77 std::string includeRecovery(llvm::StringRef includeName, llvm::StringRef from);
78
79private:
80 std::unordered_multimap<std::string, std::string> includeRecoveryCache;
81};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected