47 #ifndef _MIRA_PROGRAMOPTIONS_H_ 48 #define _MIRA_PROGRAMOPTIONS_H_ 51 #include <boost/program_options.hpp> 58 #define MIRA_CMDLINE mira::ProgramOptions::instance() 96 typedef boost::program_options::options_description
Description;
124 ProgramOptions(
int argc,
char** argv,
const std::string& helpCategory =
"");
130 ProgramOptions(
const std::vector<std::string>& args,
const std::string& helpCategory =
"");
137 return mOptionDescriptions;
149 mEnablePositionalArguments =
true;
150 return mPositionalDescriptions;
157 void getOptions(VariableMap& oMap)
const;
175 const std::vector<std::string>&
getArgs()
const 181 void init(
const std::string& helpCategory);
184 Description mOptionDescriptions;
185 PositionalDescription mPositionalDescriptions;
186 bool mEnablePositionalArguments;
187 std::vector<std::string> mArgs;
MIRA_BASE_EXPORT int getWidth()
Returns the number of columns of the console, i.e.
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
VariableMap getOptions() const
Return the option variable map.
Definition: ProgramOptions.h:163
boost::program_options::positional_options_description PositionalDescription
Definition: ProgramOptions.h:97
A singleton class that can be freely configured using policies that control the creation, instantiation, lifetime and thread-safety.
Provided for convenience.
Definition: Singleton.h:580
PositionalDescription & getPositionalDescriptions()
Return the option description map.
Definition: ProgramOptions.h:147
boost::program_options::variables_map VariableMap
Definition: ProgramOptions.h:98
static Description createOptionsDescription(const std::string &name="")
Create empty options description.
Definition: ProgramOptions.h:106
const std::vector< std::string > & getArgs() const
Return the command line arguments as passed in the constructor.
Definition: ProgramOptions.h:175
boost::program_options::options_description Description
Definition: ProgramOptions.h:96
Platform dependent functions to control the console and its settings.
A central singleton class for accessing command line parameters Underlying class is boost::program::o...
Definition: ProgramOptions.h:92
Description & getDescriptions()
Return the option description map.
Definition: ProgramOptions.h:135