aboutsummaryrefslogtreecommitdiff
path: root/src/Conf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Conf.cpp')
-rw-r--r--src/Conf.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp
index d6aee2c..6d5834e 100644
--- a/src/Conf.cpp
+++ b/src/Conf.cpp
@@ -341,6 +341,27 @@ namespace sibs
case OPT_LEV_RELEASE: return "release";
}
}
+
+ bool SibsConfig::isDefined(const std::string &name) const
+ {
+ return defines.find(name) != defines.end();
+ }
+
+ bool SibsConfig::define(const std::string &name, const std::string &value)
+ {
+ if(isDefined(name))
+ return false;
+ else
+ {
+ defines[name] = value;
+ return true;
+ }
+ }
+
+ const std::unordered_map<std::string, std::string>& SibsConfig::getDefines() const
+ {
+ return defines;
+ }
void SibsConfig::processObject(StringView name)
{
@@ -495,4 +516,4 @@ namespace sibs
{
finishedProcessing = true;
}
-} \ No newline at end of file
+}