|
virtual | ~OptionGroup ()=default |
|
| OptionGroup (const std::string &heading) |
| Make an option group woith the given heading. More...
|
|
virtual TickChainLink & | chain (TickChainLink &next) |
| Chain through all options. More...
|
|
template<typename T , typename Spec = ValueArgSpec<T, Receiver>> |
void | add_option (const std::string &name, char short_option, T Receiver::*dest, T default_value, const std::string &help, const ValidatorFunction< T > &validator=[](const T &ignored) {}) |
| Add a new option that goes to the given field, with the given default. More...
|
|
template<typename T , typename Spec = ValueArgSpec<T, Receiver>> |
void | add_option (const std::string &name, T Receiver::*dest, T default_value, const std::string &help, const ValidatorFunction< T > &validator=[](const T &ignored) {}) |
| Add a new option that goes to the given field, with the given default. More...
|
|
template<typename T > |
void | add_range (const std::string &name, char short_option, T Receiver::*dest, T default_value, const std::string &help, const ValidatorFunction< T > &validator=[](const T &ignored) {}) |
| Add a new option that handles range values. More...
|
|
template<typename T > |
void | add_range (const std::string &name, T Receiver::*dest, T default_value, const std::string &help, const ValidatorFunction< T > &validator=[](const T &ignored) {}) |
| Add a new option that handles range values. More...
|
|
void | add_flag (const std::string &name, char short_option, bool Receiver::*dest, bool default_value, const std::string &help, const ValidatorFunction< bool > &validator=[](const bool &ignored) {}) |
| Add a new option that is a boolean flag. More...
|
|
void | add_flag (const std::string &name, bool Receiver::*dest, bool default_value, const std::string &help, const ValidatorFunction< bool > &validator=[](const bool &ignored) {}) |
| Add a new option that is a boolean flag. More...
|
|
virtual bool | parse (int option_id, const char *optarg) |
|
virtual bool | preset (const BaseValuation &entry) |
|
virtual bool | set (const BaseValuation &entry) |
|
virtual bool | query (BaseValuation &entry) const |
|
virtual void | print_options (ostream &out, bool slug=false) const |
| Print all options set, one per line. More...
|
|
void | apply (Receiver &receiver) const |
| Apply all flags to the receiver. More...
|
|
virtual std::vector< std::pair< std::string, std::string > > | get_help () const |
|
virtual void | make_long_options (std::vector< struct option > &dest) const |
| Add to non-null-terminated input for getopt_long. More...
|
|
virtual void | make_short_options (std::string &dest) const |
| Add to string input for getopt_long. More...
|
|
Public Member Functions inherited from vg::subcommand::BaseOptionGroup |
virtual | ~BaseOptionGroup ()=default |
|
template<typename T > |
T | get_option_value (const std::string &option) const |
|
template<typename T > |
void | set_option_value (const std::string &option, const T &value) |
| Allow the user to manually set an option value. More...
|
|
Public Member Functions inherited from vg::subcommand::TickChainLink |
virtual void | reset_chain () |
| Reset the chain to its initial values. More...
|
|
virtual bool | tick_chain () |
|
virtual std::function< void(const std::function< void(void)> &)> | get_iterator () |
|
template<typename Receiver>
struct vg::subcommand::OptionGroup< Receiver >
Represents a set of command-line options that can be applied to an object. Internal values can be ranges that can be ticked. Comes with a heading.