|
vg
tools for working with variation graphs
|
Classes | |
| struct | ArgSpec |
| struct | BaseArgSpec |
| struct | BaseOptionGroup |
| struct | BaseValuation |
| struct | FlagArgSpec |
| struct | GroupedOptionGroup |
| struct | OptionGroup |
| struct | Preset |
| struct | RangeArgSpec |
| class | Subcommand |
| struct | TickChainLink |
| struct | Valuation |
| struct | ValueArgSpec |
Typedefs | |
| template<typename T > | |
| using | ValidatorFunction = std::function< void(const T &)> |
| Function type used to validate arguments. Throw std::domain_error if not allowed, explaining why. More... | |
Enumerations | |
| enum | OptionFormat { OptionFormat::SLUG, OptionFormat::JSON, OptionFormat::CLI } |
| Represents a pringing format for options. More... | |
| enum | CommandCategory { PIPELINE, TOOLKIT, WIDGET, DEVELOPMENT, DEPRECATED } |
Functions | |
| int | get_option_id () |
| Get a new unique option ID. More... | |
| template<> | |
| const char * | get_metavar< size_t > () |
| template<> | |
| const char * | get_metavar< int > () |
| template<> | |
| const char * | get_metavar< int8_t > () |
| template<> | |
| const char * | get_metavar< bool > () |
| template<> | |
| const char * | get_metavar< double > () |
| template<> | |
| const char * | get_metavar< std::string > () |
| void | print_table (const std::vector< std::pair< std::string, std::string >> &rows, ostream &out) |
| template<typename T > | |
| const char * | get_metavar () |
| std::ostream & | operator<< (std::ostream &out, const CommandCategory &category) |
| Define a way to print the titles of the different categories. More... | |
Variables | |
| const ValidatorFunction< double > | double_is_positive |
| Validate that a double is positive, or throw std::domain_error. More... | |
| const ValidatorFunction< double > | double_is_nonnegative |
| Validate that a double is not negative, or throw std::domain_error. More... | |
| const ValidatorFunction< double > | double_is_fraction |
| Validate that a double is a fraction between 0 and 1, inclusive, or throw std::domain_error. More... | |
| const ValidatorFunction< size_t > | size_t_is_nonzero |
| Validate that a size_t is not zero, or throw std::domain_error. More... | |
| const ValidatorFunction< size_t > | size_t_is_positive |
| Validate that a size_t is positive, or throw std::domain_error;. More... | |
| const ValidatorFunction< int > | int_is_nonnegative |
| Validate that an int is not negative, or throw std::domain_error;. More... | |
| using vg::subcommand::ValidatorFunction = typedef std::function<void(const T&)> |
Function type used to validate arguments. Throw std::domain_error if not allowed, explaining why.
Defines what kind of command each subcommand is.
|
strong |
| const char* vg::subcommand::get_metavar | ( | ) |
Get a string "metavar" placeholder for a command line option, appropriate to its type.
| const char * vg::subcommand::get_metavar< bool > | ( | ) |
| const char * vg::subcommand::get_metavar< double > | ( | ) |
| const char * vg::subcommand::get_metavar< int > | ( | ) |
| const char * vg::subcommand::get_metavar< int8_t > | ( | ) |
| const char * vg::subcommand::get_metavar< size_t > | ( | ) |
| const char * vg::subcommand::get_metavar< std::string > | ( | ) |
| int vg::subcommand::get_option_id | ( | ) |
Get a new unique option ID.
| std::ostream & vg::subcommand::operator<< | ( | std::ostream & | out, |
| const CommandCategory & | category | ||
| ) |
Define a way to print the titles of the different categories.
| void vg::subcommand::print_table | ( | const std::vector< std::pair< std::string, std::string >> & | rows, |
| ostream & | out | ||
| ) |
Print a table of rows, with each column starting at the same character on the line.
Prints the help from get_help() on an option parsing group in a nice way.
| const ValidatorFunction< double > vg::subcommand::double_is_fraction |
Validate that a double is a fraction between 0 and 1, inclusive, or throw std::domain_error.
| const ValidatorFunction< double > vg::subcommand::double_is_nonnegative |
Validate that a double is not negative, or throw std::domain_error.
| const ValidatorFunction< double > vg::subcommand::double_is_positive |
Validate that a double is positive, or throw std::domain_error.
| const ValidatorFunction< int > vg::subcommand::int_is_nonnegative |
Validate that an int is not negative, or throw std::domain_error;.
| const ValidatorFunction< size_t > vg::subcommand::size_t_is_nonzero |
Validate that a size_t is not zero, or throw std::domain_error.
| const ValidatorFunction< size_t > vg::subcommand::size_t_is_positive |
Validate that a size_t is positive, or throw std::domain_error;.
1.8.17