From 74588c84f483b26e9c60d3192f3ef2938ca29403 Mon Sep 17 00:00:00 2001 From: gereon Date: Thu, 13 Dec 2012 16:50:03 +0100 Subject: [PATCH] removed helpConfigfile (as we don't distinguish anymore between cli and configfile options) added docu on how to call registerModule() --- src/mrmc.cpp | 5 ----- src/utility/settings.cpp | 15 +-------------- src/utility/settings.h | 11 ++++++----- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/src/mrmc.cpp b/src/mrmc.cpp index 6d777c517..42a954cef 100644 --- a/src/mrmc.cpp +++ b/src/mrmc.cpp @@ -87,11 +87,6 @@ int main(const int argc, const char* argv[]) { delete s; return 0; } - if (s->isSet("help-config")) { - std::cout << mrmc::settings::helpConfigfile; - delete s; - return 0; - } if (s->isSet("test-prctl")) { mrmc::parser::PRCTLParser parser(s->getString("test-prctl").c_str()); delete s; diff --git a/src/utility/settings.cpp b/src/utility/settings.cpp index c7135539f..748bc931a 100644 --- a/src/utility/settings.cpp +++ b/src/utility/settings.cpp @@ -88,7 +88,7 @@ Settings::Settings(const int argc, const char* argv[], const char* filename) } // Stop if help is set - if ((this->vm.count("help") > 0) || (this->vm.count("help-config") > 0)) + if (this->vm.count("help") > 0) { return; } @@ -142,7 +142,6 @@ void Settings::initDescriptions() Settings::desc->add_options() ("help,h", "produce help message") ("verbose,v", "be verbose") - ("help-config", "produce help message about config file") ("configfile,c", bpo::value(), "name of config file") ("test-prctl", bpo::value(), "name of prctl file") ("trafile", bpo::value()->required(), "name of the .tra file") @@ -216,17 +215,5 @@ std::ostream& help(std::ostream& os) return os; } -/*! - * Print a list of available options for the config file. - * - * Use it like this: - * @code std::cout << mrmc::settings::helpConfigfile; @endcode - */ -std::ostream& helpConfigfile(std::ostream& os) -{ - os << *(mrmc::settings::Settings::desc) << std::endl;; - return os; -} - } // namespace settings } // namespace mrmc diff --git a/src/utility/settings.h b/src/utility/settings.h index 901e58a8b..842074655 100644 --- a/src/utility/settings.h +++ b/src/utility/settings.h @@ -73,6 +73,12 @@ namespace settings { /*! * @brief Register a new module. * + * A new settings module can be registered via + * @code + * mrmc::settings::Settings::registerModule(); + * @endcode + * This has to be done before any parsing takes place, i.e. before newInstance() is called. + * * This function implicitly defines the following interface for any SettingsModule: * @code * static std::string getModuleName(); @@ -176,11 +182,6 @@ namespace settings { */ std::ostream& help(std::ostream& os); - /*! - * @brief Print help for config file options. - */ - std::ostream& helpConfigfile(std::ostream& os); - /*! * @brief Return current instance. *