Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

status Class Reference

List of all members.

Detailed Description

A tuple comprising a boolean "good" flag, and a human-readable string that is a reason for failure (or success; but usually failure).


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 & Destructor Documentation

status::status bool    ok,
string    err = string()
 

Constructor. Uses a default success or failure string if err is empty.

status::status string    err
 

Constructor for failure state.

status::status const char *    err
 

Constructor for failure state.


Member Function Documentation

string status::as_string   const
 

Returns the status as a string.

status status::bad string    err = string() [static]
 

Returns a "bad" status object.

status status::good   [static]
 

Returns a "good" status object.

status::operator const void *   const
 

Returns a non-null pointer if and only if the status is "good." Useful for casting to a boolean.

status status::syserr string    err = string() [static]
 

Returns a "bad" status object using the error code contained in errno, and optionally a further description, as the failure reason.

status status::syserr int    errcode,
string    err = string()
[static]
 

Returns a "bad" status object using the system error code err, and optionally a further description, as the failure reason.


The documentation for this class was generated from the following file:
Generated on Fri Dec 20 13:35:10 2002 for NMSTL