|
ChainCLI
A modern C++20 command-line interface library
|
Base class for typed command-line arguments. More...
#include <argument.h>
Public Member Functions | |
| std::type_index | getType () const |
| Get the type of the argument. | |
| virtual std::any | parseToValue (const std::string &input) const =0 |
| Parse the input string to the argument's value type. | |
Protected Member Functions | |
| TypedArgumentBase (std::type_index t) | |
Protected Attributes | |
| const std::type_index | type |
Base class for typed command-line arguments.
|
inline |
Get the type of the argument.
|
pure virtual |
Parse the input string to the argument's value type.
| input | The input string to parse. |
Implemented in cli::commands::OptionArgument< T >, and cli::commands::PositionalArgument< T >.