|
vg
tools for working with variation graphs
|
#include <options.hpp>
Public Member Functions | |
| GroupedOptionGroup ()=default | |
| GroupedOptionGroup (const GroupedOptionGroup &other)=delete | |
| GroupedOptionGroup & | operator= (GroupedOptionGroup &other)=delete |
| GroupedOptionGroup (GroupedOptionGroup &&other)=delete | |
| GroupedOptionGroup & | operator= (GroupedOptionGroup &&other)=delete |
| virtual | ~GroupedOptionGroup ()=default |
| template<typename Receiver > | |
| OptionGroup< Receiver > & | add_group (const std::string &heading) |
| template<typename Receiver > | |
| void | apply (Receiver &receiver) |
| Apply all options that go on an object of this type to the given object. More... | |
| virtual TickChainLink & | chain (TickChainLink &next) |
| Chain through all subgroups. More... | |
| virtual void | reset_chain () |
| Delegate reset to last subgroup. More... | |
| virtual bool | tick_chain () |
| Delegate tick to last subgroup. 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 bool | print_options (ostream &out, OptionFormat format=OptionFormat::CLI) const |
| virtual std::vector< std::pair< std::string, std::string > > | get_help () const |
| virtual void | make_long_options (std::vector< struct option > &dest) const |
| Add options to non-null-terminated input for getopt_long. More... | |
| virtual void | make_short_options (std::string &dest) const |
| Add options 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 | |
| TickChainLink ()=default | |
| TickChainLink (const TickChainLink &other)=delete | |
| TickChainLink (TickChainLink &&other)=delete | |
| TickChainLink & | operator= (const TickChainLink &other)=delete |
| TickChainLink & | operator= (TickChainLink &&other)=delete |
| virtual | ~TickChainLink ()=default |
| virtual bool | is_static () const |
| Return true if this link never changes. We assume we are static by default. More... | |
| virtual std::function< void(const std::function< void(void)> &)> | get_iterator () |
Public Attributes | |
| std::vector< std::unique_ptr< BaseOptionGroup > > | subgroups |
| Holds all the child groups of options. More... | |
Public Attributes inherited from vg::subcommand::TickChainLink | |
| std::function< void(void)> | reset_along_chain_parent |
| This will be called when we want to reset_along_chain what we are chained onto. More... | |
| std::function< bool(void)> | tick_along_chain_parent |
| This will be called when we need to tick_along_chain our parent. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from vg::subcommand::TickChainLink | |
| virtual bool | tick_along_chain () |
| virtual void | reset_along_chain () |
Represents a group of groups of options.
Also doubles as the main parser type; you can make one of these and populate it with subgroups and options, and then use get_help() and print_table() to do help, and make_long_options(), make_short_options(), and parse() to parse with getopt_long(), and then you can apply() the options to objects they eventually belong in.
|
default |
|
delete |
|
delete |
|
virtualdefault |
|
inline |
Create a new child group with a new heading, which we can add options to.
|
inline |
Apply all options that go on an object of this type to the given object.
|
virtual |
Chain through all subgroups.
Reimplemented from vg::subcommand::TickChainLink.
|
virtual |
Get help, in the form of pairs of options and descriptions. Headings are descriptions without options.
Implements vg::subcommand::BaseOptionGroup.
|
virtual |
Add options to non-null-terminated input for getopt_long.
Implements vg::subcommand::BaseOptionGroup.
|
virtual |
Add options to string input for getopt_long.
Implements vg::subcommand::BaseOptionGroup.
|
delete |
|
delete |
|
virtual |
Parse the given option ID, with the given value if needed. Return true if we matched the ID, and false otherwise.
Implements vg::subcommand::BaseOptionGroup.
|
virtual |
Apply a preset value to its option. Returns true if it was found, and false otherwies.
Implements vg::subcommand::BaseOptionGroup.
|
virtual |
Print all options set, in the given format. Returns true if any output was produced.
Implements vg::subcommand::BaseOptionGroup.
|
virtual |
Fill in entry with the value of the correspondign option, if we have that option. If so, return true.
Implements vg::subcommand::BaseOptionGroup.
|
virtual |
Delegate reset to last subgroup.
Reimplemented from vg::subcommand::TickChainLink.
|
virtual |
Apply a value to its option. Returns true if it was found, and false otherwies.
Implements vg::subcommand::BaseOptionGroup.
|
virtual |
Delegate tick to last subgroup.
Reimplemented from vg::subcommand::TickChainLink.
| std::vector<std::unique_ptr<BaseOptionGroup> > vg::subcommand::GroupedOptionGroup::subgroups |
Holds all the child groups of options.
1.8.17