QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
QETResult Class Reference

#include <qetresult.h>

Collaboration diagram for QETResult:
Collaboration graph

Public Member Functions

 QETResult ()
 
 QETResult (const QString &error_message, bool=false)
 
virtual ~QETResult ()
 
bool isOk () const
 
void setResult (bool)
 
QString errorMessage () const
 
void setErrorMessage (const QString &)
 

Private Attributes

bool result_
 Embedded boolean value.
 
QString error_message_
 Embedded error message, typically used to explain what failed to users.
 

Detailed Description

This class represents the result of a lambda operation. Technically, it is a mere boolean+error message pair.

Constructor & Destructor Documentation

◆ QETResult() [1/2]

QETResult::QETResult ( )

Construct a default "true" QET result without an error message.

◆ QETResult() [2/2]

QETResult::QETResult ( const QString &  error_message,
bool  result = false 
)

Construct a QET result embedding error_message and result (defaults to false).

◆ ~QETResult()

QETResult::~QETResult ( )
virtual

Destructor

Member Function Documentation

◆ errorMessage()

QString QETResult::errorMessage ( ) const
Returns
the error message embedded within this result.
Here is the caller graph for this function:

◆ isOk()

bool QETResult::isOk ( ) const
Returns
the boolean value embedded within this result.
Here is the caller graph for this function:

◆ setErrorMessage()

void QETResult::setErrorMessage ( const QString &  error_message)

Embed error_message wihthin this result.

◆ setResult()

void QETResult::setResult ( bool  result)

Embed result.

Member Data Documentation

◆ error_message_

QString QETResult::error_message_
private

Embedded error message, typically used to explain what failed to users.

◆ result_

bool QETResult::result_
private

Embedded boolean value.


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