vg
tools for working with variation graphs
|
#include <options.hpp>
Public Member Functions | |
virtual | ~BaseOptionGroup ()=default |
virtual bool | parse (int option_id, const char *optarg)=0 |
virtual bool | preset (const BaseValuation &entry)=0 |
virtual bool | set (const BaseValuation &entry)=0 |
virtual bool | query (BaseValuation &entry) const =0 |
virtual void | print_options (ostream &out, OptionFormat format=OptionFormat::CLI) const =0 |
Print all options set, in the given format. More... | |
virtual std::vector< std::pair< std::string, std::string > > | get_help () const =0 |
virtual void | make_long_options (std::vector< struct option > &dest) const =0 |
Add options to non-null-terminated input for getopt_long. More... | |
virtual void | make_short_options (std::string &dest) const =0 |
Add options to string input for getopt_long. More... | |
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... | |
![]() | |
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 void | reset_chain () |
Reset the chain to its initial values. More... | |
virtual bool | tick_chain () |
virtual bool | is_static () const |
Return true if this link never changes. We assume we are static by default. More... | |
virtual TickChainLink & | chain (TickChainLink &next) |
virtual std::function< void(const std::function< void(void)> &)> | get_iterator () |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
virtual bool | tick_along_chain () |
virtual void | reset_along_chain () |
Represents a set of command-line options.
|
virtualdefault |
|
pure virtual |
Get help, in the form of pairs of options and descriptions. Headings are descriptions without options.
Implemented in vg::subcommand::GroupedOptionGroup, and vg::subcommand::OptionGroup< Receiver >.
|
inline |
Allow the user to query an option value by name. Would be simpler if we could override template methods but we can't.
|
pure virtual |
Add options to non-null-terminated input for getopt_long.
Implemented in vg::subcommand::GroupedOptionGroup, and vg::subcommand::OptionGroup< Receiver >.
|
pure virtual |
Add options to string input for getopt_long.
Implemented in vg::subcommand::GroupedOptionGroup, and vg::subcommand::OptionGroup< Receiver >.
|
pure virtual |
Parse the given option ID, with the given value if needed. Return true if we matched the ID, and false otherwise.
Implemented in vg::subcommand::GroupedOptionGroup, and vg::subcommand::OptionGroup< Receiver >.
|
pure virtual |
Apply a preset value to its option. Returns true if it was found, and false otherwies.
Implemented in vg::subcommand::GroupedOptionGroup, and vg::subcommand::OptionGroup< Receiver >.
|
pure virtual |
Print all options set, in the given format.
Implemented in vg::subcommand::GroupedOptionGroup, and vg::subcommand::OptionGroup< Receiver >.
|
pure virtual |
Fill in entry with the value of the correspondign option, if we have that option. If so, return true.
Implemented in vg::subcommand::GroupedOptionGroup, and vg::subcommand::OptionGroup< Receiver >.
|
pure virtual |
Apply a value to its option. Returns true if it was found, and false otherwies.
Implemented in vg::subcommand::GroupedOptionGroup, and vg::subcommand::OptionGroup< Receiver >.
|
inline |
Allow the user to manually set an option value.