tlx
Loading...
Searching...
No Matches
CmdlineParser::ArgumentBytes32 Class Referencefinal

specialization of argument for SI/IEC suffixes byte size options or parameters More...

Inheritance diagram for CmdlineParser::ArgumentBytes32:
CmdlineParser::Argument

Public Member Functions

 ArgumentBytes32 (char key, const std::string &longkey, const std::string &keytype, const std::string &desc, bool required, std::uint32_t &dest)
 contructor filling most attributes
 
const char * type_name () const final
 return formatted type name to user
 
bool process (int &argc, const char *const *&argv) final
 parse byte size using SI/IEC parser.
 
void print_value (std::ostream &os) const final
 format value to ostream
 
- 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
 
virtual ~Argument ()=default
 empty virtual destructor
 
std::string param_text () const
 return 'longkey [keytype]'
 
std::string option_text () const
 return '-s, –longkey [keytype]'
 

Protected Attributes

std::uint32_t & dest_
 

Additional Inherited Members

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

Detailed Description

specialization of argument for SI/IEC suffixes byte size options or parameters

Definition at line 302 of file cmdline_parser.cpp.

Constructor & Destructor Documentation

◆ ArgumentBytes32()

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

contructor filling most attributes

Definition at line 310 of file cmdline_parser.cpp.

Member Function Documentation

◆ print_value()

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

format value to ostream

Implements CmdlineParser::Argument.

Definition at line 333 of file cmdline_parser.cpp.

◆ process()

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

parse byte size using SI/IEC parser.

Implements CmdlineParser::Argument.

Definition at line 318 of file cmdline_parser.cpp.

◆ type_name()

const char * type_name ( ) const
inlinefinalvirtual

return formatted type name to user

Implements CmdlineParser::Argument.

Definition at line 315 of file cmdline_parser.cpp.

Member Data Documentation

◆ dest_

std::uint32_t& dest_
protected

Definition at line 306 of file cmdline_parser.cpp.


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