RSTools 3.1.0
Versatile C++20 utility library
Loading...
Searching...
No Matches
RST::Parser::ParseResult Struct Reference

Result of ArgParser::parse(), true when the arguments are valid. More...

#include <RST/parser/ParseResult.hpp>

Public Member Functions

 operator bool () const noexcept
 
int exitCode () const noexcept
 Exit code for main: 2 for errors, 0 otherwise.
 
void print () const
 Prints the message, to stderr for errors and stdout otherwise.
 

Public Attributes

ParseStatus status = ParseStatus::Ok
 
std::string message
 Text to print for help, version and errors.
 

Detailed Description

Result of ArgParser::parse(), true when the arguments are valid.

Member Function Documentation

◆ operator bool()

RST::Parser::ParseResult::operator bool ( ) const
inlineexplicitnoexcept

◆ exitCode()

int RST::Parser::ParseResult::exitCode ( ) const
inlinenoexcept

Exit code for main: 2 for errors, 0 otherwise.

◆ print()

void RST::Parser::ParseResult::print ( ) const

Prints the message, to stderr for errors and stdout otherwise.

Member Data Documentation

◆ status

ParseStatus RST::Parser::ParseResult::status = ParseStatus::Ok

◆ message

std::string RST::Parser::ParseResult::message

Text to print for help, version and errors.


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