vg
tools for working with variation graphs
|
#include <option.hpp>
Public Member Functions | |
virtual const string & | get_long_option () const =0 |
virtual const string & | get_short_options () const =0 |
virtual const string & | get_description () const =0 |
virtual string | get_default_value () const =0 |
virtual bool | has_argument () const =0 |
virtual void | parse ()=0 |
virtual void | parse (const string &arg)=0 |
virtual | ~OptionInterface ()=default |
All of the option templates inherit from this base class, which the command- line parser uses to feed them strings.
|
virtualdefault |
Everyone needs a virtual destructor!
|
pure virtual |
Get the default value as a string. May be generated on the fly.
Implemented in vg::BaseOption< Value, Parser >.
|
pure virtual |
Get the description, like "number of foos to bar per frobnitz".
Implemented in vg::BaseOption< Value, Parser >.
|
pure virtual |
Get the long option text without –, like "foos-to-bar".
Implemented in vg::BaseOption< Value, Parser >.
|
pure virtual |
Gets a list of short option characters that the option wants, in priority order. If none of these are available, the option will be automatically assigned some other free character.
Implemented in vg::BaseOption< Value, Parser >.
|
pure virtual |
Returns true if the option takes an argument, and false otherwise.
Implemented in vg::BaseOption< Value, Parser >.
|
pure virtual |
Called for no-argument options when the parser encounters them.
Implemented in vg::BaseOption< Value, Parser >, vg::BaseOption< vector< Item >, Parser >, and vg::BaseOption< Value, OptionValueParser< Value > >.
|
pure virtual |
Called for argument-having options when the parser encounters them. The passed reference is only valid during the function call, so the option should make a copy.
Implemented in vg::BaseOption< Value, Parser >, vg::BaseOption< vector< Item >, Parser >, and vg::BaseOption< Value, OptionValueParser< Value > >.