Euphoria
eu::core::argparse::Argument Struct Referenceabstract

base class for argument More...

#include <argparse.h>

Inheritance diagram for eu::core::argparse::Argument:
eu::core::argparse::ArgumentNoValue eu::core::argparse::MultiArgument eu::core::argparse::SingleArgument

Public Member Functions

 Argument ()=default
 
virtual ~Argument ()=default
 
 Argument (const Argument &)=delete
 
 Argument (Argument &&)=delete
 
void operator= (const Argument &)=delete
 
void operator= (Argument &&)=delete
 
Argumentset_nargs (const std::string &na)
 
Argumentset_help (const std::string &h)
 
Argumentset_allow_before_positionals ()
 
virtual std::optional< std::string > get_second_line ()=0
 
virtual bool have_nargs ()=0
 
virtual ParseResult parse_arguments (Runner *runner, const std::string &name, ParserBase *caller)=0
 

Public Attributes

std::string help
 
std::string nargs
 
bool allow_before_positionals = false
 
std::string default_value
 

Detailed Description

base class for argument

Definition at line 198 of file argparse.h.

Constructor & Destructor Documentation

◆ Argument() [1/3]

eu::core::argparse::Argument::Argument ( )
default

◆ ~Argument()

virtual eu::core::argparse::Argument::~Argument ( )
virtualdefault

◆ Argument() [2/3]

eu::core::argparse::Argument::Argument ( const Argument )
delete

◆ Argument() [3/3]

eu::core::argparse::Argument::Argument ( Argument &&  )
delete

Member Function Documentation

◆ get_second_line()

virtual std::optional<std::string> eu::core::argparse::Argument::get_second_line ( )
pure virtual

◆ have_nargs()

virtual bool eu::core::argparse::Argument::have_nargs ( )
pure virtual

◆ operator=() [1/2]

void eu::core::argparse::Argument::operator= ( Argument &&  )
delete

◆ operator=() [2/2]

void eu::core::argparse::Argument::operator= ( const Argument )
delete

◆ parse_arguments()

virtual ParseResult eu::core::argparse::Argument::parse_arguments ( Runner runner,
const std::string &  name,
ParserBase caller 
)
pure virtual

◆ set_allow_before_positionals()

Argument & eu::core::argparse::Argument::set_allow_before_positionals ( )

Definition at line 318 of file argparse.cc.

◆ set_help()

Argument & eu::core::argparse::Argument::set_help ( const std::string &  h)

Definition at line 310 of file argparse.cc.

◆ set_nargs()

Argument & eu::core::argparse::Argument::set_nargs ( const std::string &  na)

Definition at line 302 of file argparse.cc.

Member Data Documentation

◆ allow_before_positionals

bool eu::core::argparse::Argument::allow_before_positionals = false

Definition at line 202 of file argparse.h.

◆ default_value

std::string eu::core::argparse::Argument::default_value

Definition at line 205 of file argparse.h.

◆ help

std::string eu::core::argparse::Argument::help

Definition at line 200 of file argparse.h.

◆ nargs

std::string eu::core::argparse::Argument::nargs

Definition at line 201 of file argparse.h.


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