54 oc.
addDescription(
"random",
"Random Number",
"Initialises the random number generator with the current system time");
58 oc.
addDescription(
"seed",
"Random Number",
"Initialises the random number generator with the given value");
68 which->seed((
unsigned long)time(0));
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
static void insertRandOptions()
Initialises the given options container with random number options.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
static std::mt19937 myRandomNumberGenerator
the random number generator to use
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
static void initRand(std::mt19937 *which=0, const bool random=false, const int seed=23423)
Initialises the random number generator with hardware randomness or seed.
A storage for options typed value containers)
static void initRandGlobal(std::mt19937 *which=0)
Reads the given random number options and initialises the random number generator in accordance...
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.