Loading source from the menu using Project->New resulted in nothing being loaded because no extensions are set.
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#include "settings/ProjectSettings.h"
|
|
|
|
std::shared_ptr<ProjectSettings> ProjectSettings::s_instance;
|
|
|
|
std::shared_ptr<ProjectSettings> ProjectSettings::getInstance()
|
|
{
|
|
if (!s_instance)
|
|
{
|
|
s_instance = std::shared_ptr<ProjectSettings>(new ProjectSettings());
|
|
}
|
|
|
|
return s_instance;
|
|
}
|
|
|
|
ProjectSettings::ProjectSettings()
|
|
{
|
|
}
|
|
|
|
ProjectSettings::~ProjectSettings()
|
|
{
|
|
}
|
|
|
|
std::vector<std::string> ProjectSettings::getSourcePaths() const
|
|
{
|
|
std::vector<std::string> defaultValues;
|
|
return getValues("source/SourcePaths/SourcePath", defaultValues);
|
|
}
|
|
|
|
bool ProjectSettings::setSourcePaths(const std::vector<std::string>& sourcePaths)
|
|
{
|
|
return setValues("source/SourcePaths/SourcePath", sourcePaths);
|
|
}
|
|
|
|
std::vector<std::string> ProjectSettings::getHeaderExtensions() const
|
|
{
|
|
std::vector<std::string> defaultValues;
|
|
defaultValues.push_back(".h");
|
|
return getValues("source/Extensions/HeaderExtensions", defaultValues);
|
|
}
|
|
|
|
std::vector<std::string> ProjectSettings::getSourceExtensions() const
|
|
{
|
|
std::vector<std::string> defaultValues;
|
|
defaultValues.push_back(".cpp");
|
|
return getValues("source/Extensions/SourceExtensions", defaultValues);
|
|
}
|