data: Fixes and features for loading Coati into Coati

This change facilitates loading Coati into Coati:
* removed error logs for TokenComponent setting
* fixed edge checks regarding template stuff
* separated CommonSettings to be inherited by Project- and ApplicationSettings for common settings
* pluralized SourcePaths setting in xml to allow for loading multiple directories and single files
* added CompilerFlags section to settings
* passing Compiler arguments to Parser via struct Parser::Arguments
* setting -isystem for all header search paths to avoid distinction between "" and <> headers
* parsing all headers from the SourcePaths, even the ones that are not included
* fixed parsing time measurement and display
* added utility.h file for general utility functionality
This commit is contained in:
Eberhard Graether
2015-03-16 10:07:57 +01:00
parent 0e0553c90b
commit 03cf9eeb5f
44 changed files with 442 additions and 260 deletions
+47
View File
@@ -0,0 +1,47 @@
#include "settings/Settings.h"
#include "utility/file/FileSystem.h"
#include "utility/logging/logging.h"
#include "utility/text/TextAccess.h"
#include "utility/utilityString.h"
Settings::~Settings()
{
}
bool Settings::load(const std::string& filePath)
{
if (FileSystem::exists(filePath))
{
m_config = ConfigManager::createAndLoad(TextAccess::createFromFile(filePath));
return true;
}
else
{
m_config = ConfigManager::createEmpty();
LOG_WARNING("File for Settings not found.");
return false;
}
}
void Settings::save(const std::string& filePath)
{
if (m_config)
{
m_config->save(filePath);
}
else
{
LOG_WARNING("Settings were not saved.");
}
}
void Settings::clear()
{
m_config = ConfigManager::createEmpty();
}
Settings::Settings()
{
clear();
}