C++ Run-time Library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
fletcher::Status Struct Reference

Status return value of all Fletcher run-time functions. More...

#include <status.h>

Public Member Functions

 Status (const fstatus_t val, std::string msg)
 Construct a new status.
 
 Status (const fstatus_t val=FLETCHER_STATUS_ERROR)
 
bool ok () const
 Return true if the status is OK.
 
void ewf (const std::string &msg="") const
 Exit the program on a failure status, with some message. If no message is supplied, use the status message.
 
bool operator== (const Status &rhs) const
 Compare raw status values for equality.
 

Static Public Member Functions

static Status OK ()
 Return an OK status.
 
static Status ERROR (std::string msg="")
 Return an ERROR status with some message.
 

Public Attributes

fstatus_t val = FLETCHER_STATUS_ERROR
 The raw status value.
 
std::string message
 Optional message.
 

Detailed Description

Status return value of all Fletcher run-time functions.

Definition at line 25 of file status.h.

Constructor & Destructor Documentation

◆ Status() [1/2]

fletcher::Status::Status ( const fstatus_t  val,
std::string  msg 
)
inlineexplicit

Construct a new status.

Definition at line 32 of file status.h.

◆ Status() [2/2]

fletcher::Status::Status ( const fstatus_t  val = FLETCHER_STATUS_ERROR)
inlineexplicit

Definition at line 33 of file status.h.

Member Function Documentation

◆ ERROR()

static Status fletcher::Status::ERROR ( std::string  msg = "")
inlinestatic

Return an ERROR status with some message.

Definition at line 59 of file status.h.

◆ ewf()

void fletcher::Status::ewf ( const std::string &  msg = "") const
inline

Exit the program on a failure status, with some message. If no message is supplied, use the status message.

Definition at line 39 of file status.h.

◆ OK()

static Status fletcher::Status::OK ( )
inlinestatic

Return an OK status.

Definition at line 56 of file status.h.

◆ ok()

bool fletcher::Status::ok ( ) const
inline

Return true if the status is OK.

Definition at line 36 of file status.h.

◆ operator==()

bool fletcher::Status::operator== ( const Status rhs) const
inline

Compare raw status values for equality.

Definition at line 51 of file status.h.

Member Data Documentation

◆ message

std::string fletcher::Status::message

Optional message.

Definition at line 29 of file status.h.

◆ val

fstatus_t fletcher::Status::val = FLETCHER_STATUS_ERROR

The raw status value.

Definition at line 27 of file status.h.


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