Class Arg
Defined in File arg.hpp
-
class Arg
Class for holding the argument information.
Public Functions
-
inline explicit Arg(const std::string &name)
Construct a new Arg object.
- Parameters:
name – The name of the argument.
- ~Arg() = default
-
template<typename ArgT>
inline Arg &operator=(const ArgT &value) Define the assignment operator.
- Template Parameters:
- Parameters:
- Returns:
ArgT – The type of the argument.
value – The value of the argument.
The reference to the argument.
-
template<typename ArgT>
inline Arg &&operator=(ArgT &&value) Define the assignment operator.
- Template Parameters:
- Parameters:
- Returns:
ArgT – The type of the argument.
value – The value of the argument.
The reference to the argument.
-
inline const std::string &name() const
Get the name of the argument.
- Returns:
The name of the argument.
-
inline const ArgType &arg_type() const
Get the type of the argument.
- Returns:
The type of the argument.
-
inline bool has_value() const
Check whether the argument contains a value.
- Returns:
true if the argument contains a value.
-
inline std::any &value()
Get the value of the argument.
- Returns:
The reference to the value of the argument.
-
inline explicit Arg(const std::string &name)