Very Simple Cross-Platform Library
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
hu::varadiistvan::scpl::io::Failable Class Reference

#include <Failable.h>

Inheritance diagram for hu::varadiistvan::scpl::io::Failable:
hu::varadiistvan::scpl::io::BlockingStream hu::varadiistvan::scpl::io::BufferedStream hu::varadiistvan::scpl::io::WaitableEvent hu::varadiistvan::scpl::io::Waiter hu::varadiistvan::scpl::io::DataStream hu::varadiistvan::scpl::io::LocalClientSocket hu::varadiistvan::scpl::io::LocalSocket hu::varadiistvan::scpl::io::TCPClientSocket hu::varadiistvan::scpl::io::TCPSocket

Public Member Functions

 Failable ()
 
bool failed () const
 
errorCode_t getErrorCode () const
 
void repair ()
 

Protected Member Functions

void setErrorCode (errorCode_t ec)
 

Private Attributes

errorCode_t errorCode
 

Detailed Description

An object whose instances can fail, and the reason of the failure is indicated by an integral error code.

Definition at line 45 of file Failable.h.

Constructor & Destructor Documentation

◆ Failable()

hu::varadiistvan::scpl::io::Failable::Failable ( )
inline

Construct the object and initialize the error code to indicate no error.

Definition at line 115 of file Failable.h.

Member Function Documentation

◆ failed()

bool hu::varadiistvan::scpl::io::Failable::failed ( ) const
inline

Indicate if the object has failed.

Definition at line 122 of file Failable.h.

◆ getErrorCode()

errorCode_t hu::varadiistvan::scpl::io::Failable::getErrorCode ( ) const
inline

Get the error code.

Definition at line 129 of file Failable.h.

◆ repair()

void hu::varadiistvan::scpl::io::Failable::repair ( )
inline

Discard the error code.

Definition at line 136 of file Failable.h.

◆ setErrorCode()

void hu::varadiistvan::scpl::io::Failable::setErrorCode ( errorCode_t  ec)
inlineprotected

Set the error code.

Definition at line 143 of file Failable.h.

Member Data Documentation

◆ errorCode

errorCode_t hu::varadiistvan::scpl::io::Failable::errorCode
private

The error code.

Definition at line 51 of file Failable.h.


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