tfel
Loading...
Searching...
No Matches
tfel::utilities::Argument Struct Reference

class holding a command line argument More...

#include </home/runner/work/tfel/tfel/include/TFEL/Utilities/Argument.hxx>

Public Member Functions

 Argument (std::string)
 Argument (const char *const s)
 Argument (Argument &&) noexcept
 Argument (const Argument &)
Argument & operator= (Argument &&) noexcept
Argument & operator= (const Argument &)
bool hasOption () const noexcept
std::string & as_string () noexcept
 convertion to string
const std::string & as_string () const noexcept
 convertion to string
 operator const std::string & () const noexcept
 convertion to string (return argument's name)
void setOption (const std::string &o)
 set argument option
const std::string & getOption () const noexcept
 ~Argument () noexcept
 destructor

Detailed Description

class holding a command line argument

This class is used internally.

Note
inheriting from std::string shall be forbidden in most cases. Here its does not harm.

Constructor & Destructor Documentation

◆ Argument() [1/2]

tfel::utilities::Argument::Argument ( std::string )
Parameters
s: argument name

◆ Argument() [2/2]

tfel::utilities::Argument::Argument ( const char *const s)
Parameters
s: argument name

Member Function Documentation

◆ getOption()

const std::string & tfel::utilities::Argument::getOption ( ) const
nodiscardnoexcept
Returns
argument option

◆ hasOption()

bool tfel::utilities::Argument::hasOption ( ) const
nodiscardnoexcept
Returns
true if an option was given for this argument

◆ setOption()

void tfel::utilities::Argument::setOption ( const std::string & o)

set argument option

Parameters
o: option

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