vg
tools for working with variation graphs
Loading...
Searching...
No Matches
vg::subcommand::RangeArgSpec< T, Receiver > Struct Template Reference

#include <options.hpp>

Inheritance diagram for vg::subcommand::RangeArgSpec< T, Receiver >:
vg::subcommand::ValueArgSpec< T, Receiver, Range< T > > vg::subcommand::ArgSpec< T, Receiver > vg::subcommand::BaseArgSpec< Receiver > vg::subcommand::TickChainLink

Public Types

using Holder = Range<T>

Public Member Functions

virtual ~RangeArgSpec ()=default
virtual bool is_static () const
 Return true if this link never changes. We assume we are static by default.
virtual TickChainLink & chain (TickChainLink &next)
Public Member Functions inherited from vg::subcommand::ValueArgSpec< T, Receiver, Range< T > >
 ValueArgSpec (const std::string &option, char short_option, T Receiver::*dest, const T &default_value, const std::string &help, const ValidatorFunction< T > &validator)
 Make an option with a long and short option name.
virtual ~ValueArgSpec ()=default
virtual void set_value (const T &replacement)
 Allow setting our stored value.
virtual T get_value () const
 And getting our current effective value.
virtual bool was_set () const
 Return true if a value has been set from parsing or a preset.
virtual void parse (const char *optarg)
virtual void apply (Receiver &receiver) const
 Apply the value to the right field of the given object.
virtual void print_metavar (ostream &out, const char *sep="") const
 Print value metavar placeholder to the given stream after the given separator.
virtual bool print_value (ostream &out, const char *sep="") const
virtual void print_default (ostream &out) const
 Print default value to the given stream, if appropriate.
virtual struct option get_option_struct () const
 Get the getopt structure for this option. Option must outlive it and not move.
Public Member Functions inherited from vg::subcommand::ArgSpec< T, Receiver >
 ArgSpec (const std::string &option, char short_option, T Receiver::*dest, const T &default_value, const std::string &help, const ValidatorFunction< T > &validator)
 Make an option with a long and short option name.
 ArgSpec (const std::string &option, T Receiver::*dest, const T &default_value, const std::string &help, const ValidatorFunction< T > &validator)
 Make an option with a long option name only.
virtual ~ArgSpec ()=default
virtual void preset (const BaseValuation &entry)
virtual void set (const BaseValuation &entry)
virtual void query (BaseValuation &entry) const
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.
 BaseArgSpec (const std::string &option, const std::string &help)
 Make an option with a long option name only.
virtual ~BaseArgSpec ()=default
virtual bool print (ostream &out, const char *before="", OptionFormat format=OptionFormat::CLI) const

Additional Inherited Members

Public Attributes inherited from vg::subcommand::ValueArgSpec< T, Receiver, Range< T > >
Range< T > value
bool value_set
Public Attributes inherited from vg::subcommand::ArgSpec< T, Receiver >
T Receiver::* dest
 Field in the receiving type we set.
T default_value
 Original default value.
ValidatorFunction< T > validator
 Function to check value with.
Public Attributes inherited from vg::subcommand::BaseArgSpec< Receiver >
std::string option
 Name of the option (long opt).
std::string help
 Help for the option.
char short_option
 Character of the option (short opt), or 0.
int option_id
 Int value to represent the option.

Detailed Description

template<typename T, typename Receiver>
struct vg::subcommand::RangeArgSpec< T, Receiver >

Definition structure for value-having options that can run through a range.

Member Typedef Documentation

◆ Holder

template<typename T, typename Receiver>
using vg::subcommand::RangeArgSpec< T, Receiver >::Holder = Range<T>

Constructor & Destructor Documentation

◆ ~RangeArgSpec()

template<typename T, typename Receiver>
virtual vg::subcommand::RangeArgSpec< T, Receiver >::~RangeArgSpec ( )
virtualdefault

Member Function Documentation

◆ chain()

template<typename T, typename Receiver>
virtual TickChainLink & vg::subcommand::RangeArgSpec< T, Receiver >::chain ( TickChainLink & next)
inlinevirtual

Add a thing to the chain after us. Return that thing.

Reimplemented from vg::subcommand::TickChainLink.

◆ is_static()

template<typename T, typename Receiver>
virtual bool vg::subcommand::RangeArgSpec< T, Receiver >::is_static ( ) const
inlinevirtual

Return true if this link never changes. We assume we are static by default.

Reimplemented from vg::subcommand::TickChainLink.


The documentation for this struct was generated from the following file: