diff options
Diffstat (limited to 'src/mongo/util/options_parser/options_parser.h')
-rw-r--r-- | src/mongo/util/options_parser/options_parser.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/util/options_parser/options_parser.h b/src/mongo/util/options_parser/options_parser.h index 26954debb59..a5beab53d97 100644 --- a/src/mongo/util/options_parser/options_parser.h +++ b/src/mongo/util/options_parser/options_parser.h @@ -110,6 +110,15 @@ public: const std::map<std::string, std::string>& env, Environment*); + /** Handles parsing of a YAML or INI formatted string. The + * OptionSection be a description of the allowed options. This function populates the + * given Environment with the results but does not call validate on the Environment. + */ + Status runConfigFile(const OptionSection&, + const std::string& config, + const std::map<std::string, std::string>& env, + Environment*); + private: /** Handles parsing of the command line and adds the results to the given Environment */ Status parseCommandLine(const OptionSection&, @@ -120,6 +129,10 @@ private: * */ Status parseINIConfigFile(const OptionSection&, const std::string& config, Environment*); + /** Handles parsing of either YAML or INI config and adds the results to the given Environment + */ + Status parseConfigFile(const OptionSection&, const std::string& argv, Environment*); + /** Gets defaults from the OptionSection and adds them to the given Environment */ Status addDefaultValues(const OptionSection&, Environment*); |