YesChief!
C++ argv parser
Loading...
Searching...
No Matches
yeschief::CLIResults Class Referencefinal

#include <yeschief.h>

Public Member Functions

 CLIResults (const std::map< std::string, std::any > &values)
 
auto get (const std::string &option) const -> std::optional< std::any >
 

Detailed Description

Contains options values collected by parsing argv

Constructor & Destructor Documentation

◆ CLIResults()

yeschief::CLIResults::CLIResults ( const std::map< std::string, std::any > & values)
explicit
Parameters
valuesValues for each given option

Member Function Documentation

◆ get()

auto yeschief::CLIResults::get ( const std::string & option) const -> std::optional< std::any >
nodiscard

Returns value set by the user for a specific option. If the user doesn't have set the option, then it returns std::nullopt

Parameters
optionName of the option
Returns
Value of the option or std::nullopt if option has no value

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