ui: prefill headers from compilation database

dialog for selecting header paths from compilation database
This commit is contained in:
Andreas Stallinger
2016-08-31 14:37:28 +02:00
parent d2de395ed5
commit 251eab6e9e
19 changed files with 337 additions and 27 deletions
+31
View File
@@ -0,0 +1,31 @@
#ifndef UTILITY_COMPLIATION_DATABASE_H
#define UTILITY_COMPLIATION_DATABASE_H
#include <vector>
#include "utility/file/FilePath.h"
namespace utility
{
class CompilationDatabase
{
public:
CompilationDatabase(std::string filename);
std::vector<FilePath> getAllHeaderPaths();
std::vector<FilePath> getHeaderPaths();
std::vector<FilePath> getSystemHeaderPaths();
std::vector<FilePath> getFrameworkHeaderPaths();
private:
std::string m_filename;
std::vector<FilePath> m_headers;
std::vector<FilePath> m_systemHeaders;
std::vector<FilePath> m_frameworkHeaders;
void getHeaders();
};
}
#endif // UTILITY_COMPLIATION_DATABASE_H
+7
View File
@@ -32,6 +32,13 @@ FilePath::FilePath(const boost::filesystem::path& filePath)
{
}
FilePath::FilePath(const std::string& filePath, const std::string& base)
: m_path(boost::filesystem::absolute(filePath, base))
, m_exists(false)
, m_checkedExists(false)
{
}
boost::filesystem::path FilePath::path() const
{
return m_path;
+1
View File
@@ -12,6 +12,7 @@ public:
FilePath(const char* filePath);
FilePath(const std::string& filePath);
FilePath(const boost::filesystem::path& filePath);
FilePath(const std::string& filePath, const std::string& base);
boost::filesystem::path path() const;