Public Methods | |
Status (bool ok, string err=string()) | |
Constructor. Uses a default success or failure string if err is empty. | |
Status (string err) | |
Constructor for failure state. | |
Status (const char *err) | |
Constructor for failure state. | |
operator const void * () const | |
Returns a non-null pointer if and only if the Status is "good." Useful for casting to a boolean. | |
string | as_string () const |
Returns the Status as a string. | |
Static Public Methods | |
Status | good () |
Returns a "good" Status object. | |
Status | bad (string err=string()) |
Returns a "bad" Status object. | |
Status | syserr (int errcode, string err=string()) |
Returns a "bad" Status object using the system error code err, and optionally a further description, as the failure reason. | |
Status | syserr (string err=string()) |
Returns a "bad" Status object using the error code contained in errno, and optionally a further description, as the failure reason. |
|
Constructor. Uses a default success or failure string if err is empty.
|
|
Constructor for failure state.
|
|
Constructor for failure state.
|
|
Returns the Status as a string.
|
|
Returns a "bad" Status object.
|
|
Returns a "good" Status object.
|
|
Returns a non-null pointer if and only if the Status is "good." Useful for casting to a boolean.
|
|
Returns a "bad" Status object using the error code contained in errno, and optionally a further description, as the failure reason.
|
|
Returns a "bad" Status object using the system error code err, and optionally a further description, as the failure reason.
|