class::api::WorkObject

class api::WorkObject
  : public api::ApiObject

The WorkObject is the base object for all work classes in the Stratify API.

It is a simple object that allows the inheriting class to set an error or halt the program if it encouters a fatal problem.

It is used as the base of objects that make system calls so that the error generated by the system can be reported through the object.

See also: api::InfoObject

Members

WorkObject()
void clear_error_number() const
void clear_result() const
int error_number() const
const Result & result() const
int return_value() const
static void exit_fatal(

const char * message
)

protected void set_error_number(

int value
) const

protected int set_error_number_if_error(

int result
) const

protected void * set_error_number_if_null(

void * ret
) const

protected void set_error_number_to_errno() const
enum @0

Details

WorkObject()

void clear_error_number() const

void clear_result() const

Clears the current result.


int error_number() const

Returns the error number.

If the error number is zero. There is no error.

If the error number is greater than zero. It indicates an error indicator from the standard C library (such as ENOENT).

If the error number is zero or less, it refers to a StratifyAPI defined error like ERROR_NONE.


const Result & result() const

Returns a referenct to the result of the last operation.


int return_value() const

Returns the return value of the last operation.


static void exit_fatal(

const char * message
)


protected void set_error_number(

int value
) const


protected int set_error_number_if_error(

int result
) const


protected void * set_error_number_if_null(

void * ret
) const


protected void set_error_number_to_errno() const

enum @0
  • ERROR_NONE No Errors

X

Thanks for Coming!

Subscribe to news and updates