Browse Source

removed helpConfigfile (as we don't distinguish anymore between cli and configfile options)

added docu on how to call registerModule()
tempestpy_adaptions
gereon 12 years ago
parent
commit
74588c84f4
  1. 5
      src/mrmc.cpp
  2. 15
      src/utility/settings.cpp
  3. 11
      src/utility/settings.h

5
src/mrmc.cpp

@ -87,11 +87,6 @@ int main(const int argc, const char* argv[]) {
delete s; delete s;
return 0; return 0;
} }
if (s->isSet("help-config")) {
std::cout << mrmc::settings::helpConfigfile;
delete s;
return 0;
}
if (s->isSet("test-prctl")) { if (s->isSet("test-prctl")) {
mrmc::parser::PRCTLParser parser(s->getString("test-prctl").c_str()); mrmc::parser::PRCTLParser parser(s->getString("test-prctl").c_str());
delete s; delete s;

15
src/utility/settings.cpp

@ -88,7 +88,7 @@ Settings::Settings(const int argc, const char* argv[], const char* filename)
} }
// Stop if help is set // Stop if help is set
if ((this->vm.count("help") > 0) || (this->vm.count("help-config") > 0))
if (this->vm.count("help") > 0)
{ {
return; return;
} }
@ -142,7 +142,6 @@ void Settings::initDescriptions()
Settings::desc->add_options() Settings::desc->add_options()
("help,h", "produce help message") ("help,h", "produce help message")
("verbose,v", "be verbose") ("verbose,v", "be verbose")
("help-config", "produce help message about config file")
("configfile,c", bpo::value<std::string>(), "name of config file") ("configfile,c", bpo::value<std::string>(), "name of config file")
("test-prctl", bpo::value<std::string>(), "name of prctl file") ("test-prctl", bpo::value<std::string>(), "name of prctl file")
("trafile", bpo::value<std::string>()->required(), "name of the .tra file") ("trafile", bpo::value<std::string>()->required(), "name of the .tra file")
@ -216,17 +215,5 @@ std::ostream& help(std::ostream& os)
return 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 settings
} // namespace mrmc } // namespace mrmc

11
src/utility/settings.h

@ -73,6 +73,12 @@ namespace settings {
/*! /*!
* @brief Register a new module. * @brief Register a new module.
* *
* A new settings module can be registered via
* @code
* mrmc::settings::Settings::registerModule<mrmc::ModuleClass>();
* @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: * This function implicitly defines the following interface for any SettingsModule:
* @code * @code
* static std::string getModuleName(); * static std::string getModuleName();
@ -176,11 +182,6 @@ namespace settings {
*/ */
std::ostream& help(std::ostream& os); std::ostream& help(std::ostream& os);
/*!
* @brief Print help for config file options.
*/
std::ostream& helpConfigfile(std::ostream& os);
/*! /*!
* @brief Return current instance. * @brief Return current instance.
* *

Loading…
Cancel
Save