BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_PARAM_COMMAND_LINE_OPTIONS_H_
16 #define CORE_PARAM_COMMAND_LINE_OPTIONS_H_
21 #define CXXOPTS_VECTOR_DELIMITER '\n'
31 #include "bdm_version.h"
45 void AddOption(
const std::string& opt, std::string def,
46 const std::string& description =
"",
47 std::string group =
"Simulation") {
48 AddOption(std::move(group))(opt, description,
49 cxxopts::value<T>()->default_value(def));
56 bool IsSet(std::string option);
59 T
Get(
const std::string& val) {
67 friend std::ostream&
operator<<(std::ostream& os,
73 cxxopts::OptionAdder
AddOption(std::string group =
"Simulation");
100 #endif // CORE_PARAM_COMMAND_LINE_OPTIONS_H_
cxxopts::Options options_
bool IsSet(std::string option)
Check if the argument for the specified option was set.
std::string GetSimulationName() const
Return the simulation name that was parsed from argv[0].
void AddOption(const std::string &opt, std::string def, const std::string &description="", std::string group="Simulation")
Add an extra command line option.
cxxopts::ParseResult * parser_
T Get(const std::string &val)
CommandLineOptions(int argc, const char **argv)
void Parse()
Parse the options with the given command line arguments.
void ExtractSimulationName(const char *path)
friend std::ostream & operator<<(std::ostream &os, const CommandLineOptions &clo)
void HandleCoreOptions()
Takes care of core options.
Class to contain and parse command line options.