fab
130
API Documentation
|
base class for something that does have a failed/good state. More...
#include <failable.hxx>
Public Member Functions | |
bool | isGood () const |
fine | |
int | print (char *sz, unsigned size) const |
int | iErr () |
error code | |
const char * | szErr () |
error text | |
bool | isFail () const |
last op failed, but object is uncorrupted | |
bool | isBad () const |
last op failed, object is corrupted | |
bool | operator! () const |
true if failed More... | |
operator const void * () const | |
zero if failed More... | |
Failable & | setFailed (const char *sz, int i=0) |
set 'this' failed, record a string and an integer for failure identification More... | |
Failable & | setBad (const char *sz, int i=0) |
set this bad, record a string and an integer for failure identification | |
Failable & | clear () |
user clear of failed/bad state | |
Failable (const char *sz, int i) | |
Protected Types | |
enum | StatE { E_OK, E_FAIL = 001, E_BAD = 002, E_NEXT = 004 } |
Protected Member Functions | |
Failable & | setStat (StatE eStat, const char *sz, int i) |
Failable & | setStat (const Failable &fa) |
bool | entry () |
resets the failed state. More... | |
Protected Attributes | |
enum Failable::StatE | _eStat |
Friends | |
std::ostream & | operator<< (std::ostream &, const Failable &) |
base class for something that does have a failed/good state.
|
protected |
resets the failed state.
returns !good
|
inline |
|
inline |
|
inline |
set 'this' failed, record a string and an integer for failure identification