Program configuration (command line options and/or configuration file). More...
#include <Configuration.hpp>
Public Member Functions | |
Configuration (const std::string &shortdesc, const std::string &desc) | |
Configuration & | add (const std::string &name, char letter, const std::string &desc, const Atom::Type type, const Atom &value) |
Add a configuration option. | |
void | print_usage (const std::string &program, std::ostream &os) |
void | parse (int argc, char **argv) throw (CommandLineError) |
Parse command line arguments. | |
void | print (std::ostream &os, const std::string mime_type="text/plain") const |
const Raul::Atom & | option (const std::string &long_name) |
Program configuration (command line options and/or configuration file).
Configuration & Raul::Configuration::add | ( | const std::string & | name, | |
char | letter, | |||
const std::string & | desc, | |||
const Atom::Type | type, | |||
const Atom & | value | |||
) |
Add a configuration option.
name | Long name (without leading "--") | |
letter | Short name (without leading "-") | |
desc | Description | |
type | Type (Atom::BOOL for flags) | |
value | Default value |
References Raul::Atom::type().
void Raul::Configuration::parse | ( | int | argc, | |
char ** | argv | |||
) | throw (CommandLineError) |
Parse command line arguments.