Files
Sourcetrail/src/lib/settings/SourceGroupSettingsWithIndexedHeaderPaths.cpp
T
mlangkabel dfc6d88432 build: search headers in all source directories
* removed paths in include directives
* changed cmake to provide necessary header search paths
* changed name of version.h to productVersion.h due to name conflict
2018-09-18 19:00:18 +02:00

42 lines
1.4 KiB
C++

#include "SourceGroupSettingsWithIndexedHeaderPaths.h"
#include "ProjectSettings.h"
#include "utility.h"
SourceGroupSettingsWithIndexedHeaderPaths::SourceGroupSettingsWithIndexedHeaderPaths()
: m_indexedHeaderPaths(std::vector<FilePath>())
{
}
bool SourceGroupSettingsWithIndexedHeaderPaths::equals(std::shared_ptr<SourceGroupSettingsWithIndexedHeaderPaths> other) const
{
return (
utility::isPermutation(m_indexedHeaderPaths, other->m_indexedHeaderPaths)
);
}
void SourceGroupSettingsWithIndexedHeaderPaths::load(std::shared_ptr<const ConfigManager> config, const std::string& key)
{
setIndexedHeaderPaths(config->getValuesOrDefaults(key + "/indexed_header_paths/indexed_header_path", std::vector<FilePath>()));
}
void SourceGroupSettingsWithIndexedHeaderPaths::save(std::shared_ptr<ConfigManager> config, const std::string& key)
{
config->setValues(key + "/indexed_header_paths/indexed_header_path", getIndexedHeaderPaths());
}
std::vector<FilePath> SourceGroupSettingsWithIndexedHeaderPaths::getIndexedHeaderPaths() const
{
return m_indexedHeaderPaths;
}
std::vector<FilePath> SourceGroupSettingsWithIndexedHeaderPaths::getIndexedHeaderPathsExpandedAndAbsolute() const
{
return getProjectSettings()->makePathsExpandedAndAbsolute(getIndexedHeaderPaths());
}
void SourceGroupSettingsWithIndexedHeaderPaths::setIndexedHeaderPaths(const std::vector<FilePath>& indexedHeaderPaths)
{
m_indexedHeaderPaths = indexedHeaderPaths;
}