about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-06-07T14·49+0200
committerEelco Dolstra <edolstra@gmail.com>2017-06-07T14·49+0200
commitaa952d5f0bc623a1584f2d589209f586e594c75f (patch)
tree685780bc5155600f5f27f04c09302e2644236cad /src/libutil
parentb8283773bd64d7da6859ed520ee19867742a03ba (diff)
nix: Add --help-config flag
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/args.hh2
-rw-r--r--src/libutil/config.hh10
2 files changed, 10 insertions, 2 deletions
diff --git a/src/libutil/args.hh b/src/libutil/args.hh
index ac12f8be633a..f70bb7823dc0 100644
--- a/src/libutil/args.hh
+++ b/src/libutil/args.hh
@@ -41,7 +41,7 @@ protected:
 
     virtual bool processFlag(Strings::iterator & pos, Strings::iterator end);
 
-    void printFlags(std::ostream & out);
+    virtual void printFlags(std::ostream & out);
 
     /* Positional arguments. */
     struct ExpectedArg
diff --git a/src/libutil/config.hh b/src/libutil/config.hh
index 2ca643fe0e71..994eab911707 100644
--- a/src/libutil/config.hh
+++ b/src/libutil/config.hh
@@ -31,6 +31,8 @@ class Config
 {
     friend class AbstractSetting;
 
+public:
+
     struct SettingData
     {
         bool isAlias;
@@ -40,7 +42,11 @@ class Config
         { }
     };
 
-    std::map<std::string, SettingData> _settings;
+    typedef std::map<std::string, SettingData> Settings;
+
+private:
+
+    Settings _settings;
 
     StringMap initials;
 
@@ -58,6 +64,8 @@ public:
 
     StringMap getSettings(bool overridenOnly = false);
 
+    const Settings & _getSettings() { return _settings; }
+
     void applyConfigFile(const Path & path, bool fatal = false);
 
     void resetOverriden();