Basic type and macros for handling command-line options. More...
#include "scope.h"
Go to the source code of this file.
Classes | |
class | ledger::option_error |
class | ledger::option_t< T > |
Namespaces | |
namespace | ledger |
Macros | |
#define | BEGIN(type, name) struct name ## option_t : public option_t<type> |
#define | COPY_OPT(name, other) name ## handler(other.name ## handler) |
#define | CTOR(type, name) name ## option_t() : option_t<type>(#name) |
#define | CTOR_(type, name, base) name ## option_t() : option_t<type>(#name), base |
#define | DECL1(type, name, vartype, var, value) |
#define | DO() virtual void handler_thunk(const optional<string>& whence) |
#define | DO_(var) |
#define | END(name) name ## handler |
#define | HANDLED(name) HANDLER(name) |
#define | HANDLER(name) name ## handler |
#define | MAKE_OPT_FUNCTOR(type, x) expr_t::op_t::wrap_functor(bind(&option_t<type>::operator(), x, _1)) |
#define | MAKE_OPT_HANDLER(type, x) expr_t::op_t::wrap_functor(bind(&option_t<type>::handler, x, _1)) |
#define | OPT(name) |
#define | OPT_(name) |
#define | OPT_ALT(name, alt) |
#define | OPT_CH(name) |
#define | OPTION(type, name) |
#define | OPTION_(type, name, body) |
#define | OPTION__(type, name, body) |
#define | OTHER(name) |
Functions | |
bool | ledger::is_eq (const char *p, const char *n) |
strings_list | ledger::process_arguments (strings_list args, scope_t &scope) |
void | ledger::process_environment (const char **envp, const string &tag, scope_t &scope) |
bool | ledger::process_option (const string &whence, const string &name, scope_t &scope, const char *arg, const string &varname) |
Basic type and macros for handling command-line options.
Definition in file option.h.
#define BEGIN | ( | type, | |
name ) struct name ## option_t : public option_t<type> |
#define COPY_OPT | ( | name, | |
other ) name ## handler(other.name ## handler) |
#define CTOR | ( | type, | |
name ) name ## option_t() : option_t<type>(#name) |
#define CTOR_ | ( | type, | |
name, | |||
base ) name ## option_t() : option_t<type>(#name), base |
#define DECL1 | ( | type, | |
name, | |||
vartype, | |||
var, | |||
value ) |
#define DO | ( | ) | virtual void handler_thunk(const optional<string>& whence) |
#define DO_ | ( | var | ) |
#define HANDLED | ( | name | ) | HANDLER(name) |
Definition at line 264 of file option.h.
Referenced by ledger::report_t::report_format(), and ledger::report_t::what_to_keep().
#define HANDLER | ( | name | ) | name ## handler |
Definition at line 263 of file option.h.
Referenced by ledger::report_t::report_format(), ledger::report_t::report_options(), and ledger::session_t::report_options().
#define MAKE_OPT_FUNCTOR | ( | type, | |
x ) expr_t::op_t::wrap_functor(bind(&option_t<type>::operator(), x, _1)) |
#define MAKE_OPT_HANDLER | ( | type, | |
x ) expr_t::op_t::wrap_functor(bind(&option_t<type>::handler, x, _1)) |
#define OPT | ( | name | ) |
#define OPT_ | ( | name | ) |
#define OPT_ALT | ( | name, | |
alt ) |
#define OPT_CH | ( | name | ) |
#define OPTION | ( | type, | |
name ) |
#define OPTION_ | ( | type, | |
name, | |||
body ) |
#define OPTION__ | ( | type, | |
name, | |||
body ) |