logic: reduce access to filesystem while indexing

* use canonical filepath cache in cxx indexer
* made constructors of FilePath explicit
* use FilePath at more places instead of string
* forward declares FilePath wherever possible
This commit is contained in:
malte_langkabel
2017-05-04 10:55:16 +02:00
parent 55d3f9c189
commit 054b8fab17
156 changed files with 656 additions and 444 deletions
+5 -4
View File
@@ -1,5 +1,6 @@
#include "utility/utilityMaven.h"
#include "utility/file/FilePath.h"
#include "utility/text/TextAccess.h"
#include "utility/utilityApp.h"
#include "utility/utilityString.h"
@@ -61,12 +62,12 @@ namespace utility
for (std::string value: utility::getValuesOfAllXmlElementsOnPath(xmlAccess, utility::createVectorFromElements<std::string>("project", "build", "directory")))
{
uncheckedDirectories.push_back(FilePath(value).concat("generated-sources"));
uncheckedDirectories.push_back(FilePath(value).concat(FilePath("generated-sources")));
}
for (std::string value: utility::getValuesOfAllXmlElementsOnPath(xmlAccess, utility::createVectorFromElements<std::string>("projects", "project", "build", "directory")))
{
uncheckedDirectories.push_back(FilePath(value).concat("generated-sources"));
uncheckedDirectories.push_back(FilePath(value).concat(FilePath("generated-sources")));
}
if (addTestDirectories)
@@ -82,12 +83,12 @@ namespace utility
for (std::string value: utility::getValuesOfAllXmlElementsOnPath(xmlAccess, utility::createVectorFromElements<std::string>("project", "build", "directory")))
{
uncheckedDirectories.push_back(FilePath(value).concat("generated-test-sources"));
uncheckedDirectories.push_back(FilePath(value).concat(FilePath("generated-test-sources")));
}
for (std::string value: utility::getValuesOfAllXmlElementsOnPath(xmlAccess, utility::createVectorFromElements<std::string>("projects", "project", "build", "directory")))
{
uncheckedDirectories.push_back(FilePath(value).concat("generated-test-sources"));
uncheckedDirectories.push_back(FilePath(value).concat(FilePath("generated-test-sources")));
}
}
+3 -1
View File
@@ -1,7 +1,9 @@
#ifndef UTILITY_MAVEN_H
#define UTILITY_MAVEN_H
#include "utility/file/FilePath.h"
#include <vector>
class FilePath;
namespace utility
{