|
vg
tools for working with variation graphs
|
#include <options.hpp>
Public Member Functions | |
| NegationFlagArgSpec (const std::string &option, const std::string &help, FlagArgSpec< Receiver > *primary) | |
| virtual | ~NegationFlagArgSpec ()=default |
| virtual void | parse (const char *optarg) |
| virtual void | preset (const BaseValuation &entry) |
| virtual void | set (const BaseValuation &entry) |
| virtual void | query (BaseValuation &entry) const |
| virtual void | apply (Receiver &receiver) const |
| Apply the value to the right field of the given object. More... | |
| virtual bool | print_value (ostream &out, const char *sep="") const |
| virtual void | print_metavar (ostream &out, const char *sep="") const |
| Print value metavar placeholder to the given stream after the given separator. More... | |
| virtual void | print_default (ostream &out) const |
| Print default value to the given stream, if appropriate. More... | |
| virtual bool | print (ostream &out, const char *before="", OptionFormat format=OptionFormat::CLI) const |
| virtual struct option | get_option_struct () const |
| Get the getopt structure for this option. Option must outlive it and not move. More... | |
Public Member Functions inherited from vg::subcommand::BaseArgSpec< Receiver > | |
| BaseArgSpec (const std::string &option, char short_option, const std::string &help) | |
| Make an option with a long and short option name. More... | |
| BaseArgSpec (const std::string &option, const std::string &help) | |
| Make an option with a long option name only. More... | |
| virtual | ~BaseArgSpec ()=default |
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 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 () |
Public Attributes | |
| FlagArgSpec< Receiver > * | primary |
| The primary flag whose storage we manipulate. More... | |
Public Attributes inherited from vg::subcommand::BaseArgSpec< Receiver > | |
| std::string | option |
| Name of the option (long opt) More... | |
| std::string | help |
| Help for the option. More... | |
| char | short_option |
| Character of the option (short opt), or 0. More... | |
| int | option_id |
| Int value to represent the option. 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 () |
Definition structure for the negation counterpart of a flag (e.g. –no-XXX for –XXX, or –XXX for –no-XXX). Has its own option name, ID, and help text, but uses the primary FlagArgSpec's storage when parsed.
|
inline |
|
virtualdefault |
|
inlinevirtual |
Apply the value to the right field of the given object.
Implements vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Get the getopt structure for this option. Option must outlive it and not move.
Implements vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Parse the argument's value from the command line. Throws std::domain_error if validation fails.
Implements vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Apply a preset item, or fail if it doesn't match. The preset value will sit under any parsed value but above the default.
Implements vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Print when the negation is in effect (value was explicitly set back to default by the user).
Reimplemented from vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Print default value to the given stream, if appropriate.
Implements vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Print value metavar placeholder to the given stream after the given separator.
Implements vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Print value to the given stream after the given separator. Returns true if any output was produced.
Implements vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Put our current effective value into the given BaseValuation, which must be for the right option and have the right type.
Implements vg::subcommand::BaseArgSpec< Receiver >.
|
inlinevirtual |
Apply a valuation, or fail if it doesn't match. The value will replace any parsed value! Validation will not be run!
Implements vg::subcommand::BaseArgSpec< Receiver >.
| FlagArgSpec<Receiver>* vg::subcommand::NegationFlagArgSpec< Receiver >::primary |
The primary flag whose storage we manipulate.
1.9.1