Class Options

Class Documentation

class mimir::Options

Helper class for program options.

This class holds the implementation of program options and arguments.

Public Functions

Options(const std::string &program_descriptor)

Constructor for mimir options.

Parameters

program_descriptor[in] String to print to the user on the command line.

bool parse(int argc, char *argv[])

Parse input arguments.

Parses program arguments into variables.

Parameters
  • argc[in] Number of arguments passed from main()

  • argv[in] Aarguments passed from main()

Returns

bool Whether parsing was successful.

Public Members

std::string filename

YAML config filename.

std::uint16_t severity

Print severity.

std::uint16_t log_severity

Log file severity. (NOTE: unused.)

Protected Static Functions

template<typename T>
static inline std::function<void(T)> check_range(char const *const opt_name, const T &min, const T &max)

Helper function for checking a range.

Private Functions

std::string make_usage_string(const std::string &program_name, const boost::program_options::options_description &desc, boost::program_options::positional_options_description &p)

Prints a usage string in case of help or wrong use.

Private Members

const std::string m_progDesc

Program description string.