Fancy argparser
Single file argument parser for c++
Loading...
Searching...
No Matches
ARGPARSE_NAMESPACE_NAME::ArgumentsObject Class Reference

Class that carries result of real parsing Indicates if parsing is successful and allows to get ArgumentParsed object in that case. More...

#include <argparse.h>

Public Member Functions

bool IsArgValid () const
 Indicates if parsing was successful.
const std::string & GetErrorString ()
 Function to get error message in case of parsing failure.
size_t ParsedArgsCount () const
 I don't know when you could need this info.
ArgumentParsed GetArg (const std::string &name)
 Getter function to get ArgumentParsed object.

Detailed Description

Class that carries result of real parsing Indicates if parsing is successful and allows to get ArgumentParsed object in that case.

In case of parsing failure provides error string for first error.

Definition at line 848 of file argparse.h.

Member Function Documentation

◆ GetArg()

ArgumentParsed ARGPARSE_NAMESPACE_NAME::ArgumentsObject::GetArg ( const std::string & name)
inline

Getter function to get ArgumentParsed object.

Parameters
namename of argument object, could be short name, long name or positional name
Returns
Empty argument if argument with given name does not exist or real result if exists.

Definition at line 875 of file argparse.h.

◆ GetErrorString()

const std::string & ARGPARSE_NAMESPACE_NAME::ArgumentsObject::GetErrorString ( )
inline

Function to get error message in case of parsing failure.

Returns
string with error message

Definition at line 860 of file argparse.h.

◆ IsArgValid()

bool ARGPARSE_NAMESPACE_NAME::ArgumentsObject::IsArgValid ( ) const
inline

Indicates if parsing was successful.

Returns
bool value

Definition at line 853 of file argparse.h.

◆ ParsedArgsCount()

size_t ARGPARSE_NAMESPACE_NAME::ArgumentsObject::ParsedArgsCount ( ) const
inline

I don't know when you could need this info.

Returns
size_t count of successfully parsed arguments

Definition at line 867 of file argparse.h.


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