Euphoria
|
eu::core::argparse::ArgumentNoValue Struct Reference
a argument with no value, probably either a –set-true or a void function like –help More...
#include <argparse.h>
Inheritance diagram for eu::core::argparse::ArgumentNoValue:
Public Types | |
using | CallbackFunction = std::function< ParseResult(Runner *)> |
Public Member Functions | |
ArgumentNoValue (CallbackFunction cb) | |
bool | have_nargs () override |
std::optional< std::string > | get_second_line () override |
ParseResult | parse_arguments (Runner *runner, const std::string &name, ParserBase *caller) override |
Public Member Functions inherited from eu::core::argparse::Argument | |
Argument ()=default | |
virtual | ~Argument ()=default |
Argument (const Argument &)=delete | |
Argument (Argument &&)=delete | |
void | operator= (const Argument &)=delete |
void | operator= (Argument &&)=delete |
Argument & | set_nargs (const std::string &na) |
Argument & | set_help (const std::string &h) |
Argument & | set_allow_before_positionals () |
Public Attributes | |
CallbackFunction | callback_function |
Public Attributes inherited from eu::core::argparse::Argument | |
std::string | help |
std::string | nargs |
bool | allow_before_positionals = false |
std::string | default_value |
Detailed Description
a argument with no value, probably either a –set-true or a void function like –help
Definition at line 253 of file argparse.h.
Member Typedef Documentation
◆ CallbackFunction
using eu::core::argparse::ArgumentNoValue::CallbackFunction = std::function<ParseResult (Runner*)> |
Definition at line 255 of file argparse.h.
Constructor & Destructor Documentation
◆ ArgumentNoValue()
|
explicit |
Definition at line 332 of file argparse.cc.
Member Function Documentation
◆ get_second_line()
|
overridevirtual |
Implements eu::core::argparse::Argument.
Definition at line 346 of file argparse.cc.
◆ have_nargs()
|
overridevirtual |
Implements eu::core::argparse::Argument.
Definition at line 339 of file argparse.cc.
◆ parse_arguments()
|
overridevirtual |
Implements eu::core::argparse::Argument.
Definition at line 354 of file argparse.cc.
Member Data Documentation
◆ callback_function
CallbackFunction eu::core::argparse::ArgumentNoValue::callback_function |
Definition at line 257 of file argparse.h.
The documentation for this struct was generated from the following files:
- libs/core/src/core/argparse.h
- libs/core/src/core/argparse.cc