13 std::string escaped =
replaceAll(name,
" ",
"-");
33 cloned.palettes = palettes.
clone();
38 palettes.
insert(name, palette);
43 palette = palettes[name];
64 void savePalettes(
Config& config);
65 void saveGui(
Config& config);
67 void loadPalettes(
Config& config);
68 void loadGui(
Config& config);
Helper functions to check the internal consistency of the code.
Interface for the configuration files storing job data.
#define NAMESPACE_SPH_END
NAMESPACE_SPH_BEGIN std::string getIdentifier(const std::string &name)
std::string replaceAll(const std::string &source, const std::string &old, const std::string &s)
Replaces all occurences of string with a new string.
std::string lowercase(const std::string &s)
Converts all uppercase characters to their lowercase variants. Other characters are unchanged.
Provides functionality for reading and writing configuration files.
INLINE bool contains(const TKey &key) const
Returns true if the map contains element of given key.
INLINE TValue & insert(const TKey &key, const TValue &value)
Adds a new element into the map or sets new value of element with the same key.
Represents a color palette, used for mapping arbitrary number to a color.
bool getPalette(const std::string &name, Palette &palette) const
const GuiSettings & getGuiSettings() const
void load(Config &config)
GuiSettings & getGuiSettings()
static Project & getInstance()
void save(Config &config)
void setPalette(const std::string &name, const Palette &palette)