RADLib
RADical C++ application framework
RADCLI::ParseResult Class Reference

Parsed command-line result. More...

#include <RADCLI.h>

Public Member Functions

bool ok () const
 Returns true when parsing succeeded. More...
 
const std::string & error () const
 Returns parser error text. More...
 
bool has (const std::string &name) const
 Returns true when option was explicitly provided. More...
 
std::string value (const std::string &name, const std::string &defaultValue={}) const
 Returns option value or defaultValue. More...
 
const std::vector< std::string > & positionals () const
 Returns positional arguments. More...
 

Friends

class CommandLineParser
 

Detailed Description

Parsed command-line result.

Member Function Documentation

◆ error()

const std::string& RADCLI::ParseResult::error ( ) const

Returns parser error text.

◆ has()

bool RADCLI::ParseResult::has ( const std::string &  name) const

Returns true when option was explicitly provided.

◆ ok()

bool RADCLI::ParseResult::ok ( ) const

Returns true when parsing succeeded.

◆ positionals()

const std::vector<std::string>& RADCLI::ParseResult::positionals ( ) const

Returns positional arguments.

◆ value()

std::string RADCLI::ParseResult::value ( const std::string &  name,
const std::string &  defaultValue = {} 
) const

Returns option value or defaultValue.

Friends And Related Function Documentation

◆ CommandLineParser

friend class CommandLineParser
friend

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