logic: improved include detection
* also search for include paths of include directives extracted from header search paths * extracted logic to gather unsolved includes * extracted some code to filetree class
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef FILE_TREE_H
|
||||
#define FILE_TREE_H
|
||||
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "utility/file/FilePath.h"
|
||||
|
||||
class FileTree
|
||||
{
|
||||
public:
|
||||
FileTree(const FilePath& rootPath);
|
||||
|
||||
FilePath getAbsoluteRootPathForRelativeFilePath(const FilePath& relativeFilePath);
|
||||
std::vector<FilePath> getAbsoluteRootPathsForRelativeFilePath(const FilePath& relativeFilePath);
|
||||
|
||||
private:
|
||||
std::vector<FilePath> doGetAbsoluteRootPathsForRelativeFilePath(const FilePath& relativeFilePath, bool allowMultipleResults);
|
||||
|
||||
FilePath m_rootPath;
|
||||
std::unordered_map<std::string, std::set<FilePath>> m_files;
|
||||
};
|
||||
|
||||
#endif // FILE_TREE_H
|
||||
Reference in New Issue
Block a user