tlx
CmdlineParser::ArgumentDouble Struct Referencefinal

specialization of argument for double options or parameters More...

Inheritance diagram for CmdlineParser::ArgumentDouble:
CmdlineParser::Argument

Public Member Functions

 ArgumentDouble (char key, const std::string &longkey, const std::string &keytype, const std::string &desc, bool required, double &dest)
 contructor filling most attributes More...
 
const char * type_name () const final
 return formatted type name to user More...
 
bool process (int &argc, const char *const *&argv) final
 parse unsigned integer using sscanf. More...
 
void print_value (std::ostream &os) const final
 format value to ostream More...
 
- Public Member Functions inherited from CmdlineParser::Argument
 Argument (char key, const std::string &longkey, const std::string &keytype, const std::string &desc, bool required)
 contructor filling most attributes More...
 
virtual ~Argument ()=default
 empty virtual destructor More...
 
std::string param_text () const
 return 'longkey [keytype]' More...
 
std::string option_text () const
 return '-s, –longkey [keytype]' More...
 

Public Attributes

double & dest_
 
- Public Attributes inherited from CmdlineParser::Argument
char key_
 single letter short option, or 0 is none More...
 
std::string longkey_
 long option key or name for parameters More...
 
std::string keytype_
 option type description, e.g. "<#>" to indicate numbers More...
 
std::string desc_
 longer description, which will be wrapped More...
 
bool required_
 required, process() fails if the option/parameter is not found. More...
 
bool found_
 found during processing of command line More...
 
bool repeated_
 repeated argument, i.e. std::vector<std::string> More...
 

Detailed Description

specialization of argument for double options or parameters

Definition at line 244 of file cmdline_parser.cpp.

Constructor & Destructor Documentation

ArgumentDouble ( char  key,
const std::string &  longkey,
const std::string &  keytype,
const std::string &  desc,
bool  required,
double &  dest 
)
inline

contructor filling most attributes

Definition at line 248 of file cmdline_parser.cpp.

Member Function Documentation

void print_value ( std::ostream &  os) const
inlinefinalvirtual

format value to ostream

Implements CmdlineParser::Argument.

Definition at line 270 of file cmdline_parser.cpp.

bool process ( int &  argc,
const char *const *&  argv 
)
inlinefinalvirtual

parse unsigned integer using sscanf.

Implements CmdlineParser::Argument.

Definition at line 256 of file cmdline_parser.cpp.

const char* type_name ( ) const
inlinefinalvirtual

return formatted type name to user

Implements CmdlineParser::Argument.

Definition at line 253 of file cmdline_parser.cpp.

Member Data Documentation

double& dest_

Definition at line 245 of file cmdline_parser.cpp.


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