YASK
Yet Another Stencil Kit: a software framework for creating HPC stencil code. Copyright 2014-2023 Intel Corporation.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
yask::command_line_parser::string_list_option Class Reference

A list-of-strings option. More...

#include <yask_common_api.hpp>

+ Inheritance diagram for yask::command_line_parser::string_list_option:

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 &current_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++].
 

Detailed Description

A list-of-strings option.

Strings are separated by commas (without spaces).

Member Function Documentation

◆ print_help()

virtual void yask::command_line_parser::string_list_option::print_help ( std::ostream &  os,
int  width 
) const
overridevirtual

Print help message for a list-of-strings option.

Reimplemented from yask::command_line_parser::option_base.

◆ print_value()

virtual std::ostream & yask::command_line_parser::string_list_option::print_value ( std::ostream &  os) const
inlineoverridevirtual

Print the current value of the strings.

Implements yask::command_line_parser::option_base.

◆ check_arg()

virtual bool yask::command_line_parser::string_list_option::check_arg ( const string_vec args,
int &  argi 
)
overridevirtual

Check for the option and its string-list argument.

Implements yask::command_line_parser::option_base.


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