YASK
Yet Another Stencil Kit: a software framework for creating HPC stencil code. Copyright 2014-2023 Intel Corporation.
|
A list-of-strings option. More...
#include <yask_common_api.hpp>
Public Member Functions | |
string_list_option (const std::string &name, const std::string &help_msg, string_vec &val) | |
Constructor allowing any strings. | |
string_list_option (const std::string &name, const std::string &help_msg, const std::set< std::string > &allowed_strs, string_vec &val) | |
Constructor with set of allowed strings. | |
virtual void | print_help (std::ostream &os, int width) const override |
Print help message for a list-of-strings option. | |
virtual std::ostream & | print_value (std::ostream &os) const override |
Print the current value of the strings. | |
virtual bool | check_arg (const string_vec &args, int &argi) override |
Check for the option and its string-list argument. | |
Public Member Functions inherited from yask::command_line_parser::option_base | |
option_base (const std::string &name, const std::string &help_msg, const std::string ¤t_value_prefix=std::string("Current value = "), const std::string &help_line_prefix=std::string(" ")) | |
Constructor. | |
virtual const std::string & | get_name () const |
Get the current option name. | |
virtual const std::string & | get_help () const |
Get the unformatted help string. | |
Additional Inherited Members | |
Protected Member Functions inherited from yask::command_line_parser::option_base | |
virtual void | _print_help (std::ostream &os, const std::string &display_name, int width) const |
Format and print help for option named display_name to os . | |
virtual bool | _is_opt (const string_vec &args, int &argi, const std::string &str) const |
Check for matching option to str at args[argi] . | |
virtual double | _double_val (const string_vec &args, int &argi) |
Get one double value from args[argi++] . | |
virtual idx_t | _idx_val (const string_vec &args, int &argi) |
Get one idx_t value from args[argi++]. | |
virtual std::string | _string_val (const string_vec &args, int &argi) |
Get one string value from args[argi++]. | |
A list-of-strings option.
Strings are separated by commas (without spaces).
|
overridevirtual |
Print help message for a list-of-strings option.
Reimplemented from yask::command_line_parser::option_base.
|
inlineoverridevirtual |
Print the current value of the strings.
Implements yask::command_line_parser::option_base.
|
overridevirtual |
Check for the option and its string-list argument.
Implements yask::command_line_parser::option_base.