Next: conditions root, Previous: conditions descriptors, Up: conditions [Contents][Index]
All the following definitions are accessible from the header file ccexceptions.h.
Type of structure representing an exceptional–condition object. It has the following public fields:
cce_descriptor_t const * descriptorPointer to the descriptor of the exceptional–condition object–type.
Initialise the core fields of an already allocated condition object. The argument D must be a pointer to the descriptor: it is stored in the object referenced by C. This function is usually called from a type–specific constructor function.
Usually we do not need to call this function directly; rather, we should use
cce_condition_delete().
Traverse, from leaf to root, the hierarchy of descriptors for the type of the exceptional–condition
object referenced by C: apply to C the final functions referenced by the
descriptors’ functions tables. The finalisation functions are applied from leaf to root.
Apply cce_condition_final() to C; then apply to C the delete function
referenced by the descriptor’s functions table.
Apply to C the static_message function referenced by its descriptor’s functions
table.
Determine if an object is of a selected object–type. Return true if the object referenced by
C is an instance of the type whose descriptor is referenced by D, or an instance of a
type that is an ancestor of such descriptor; otherwise return false.
This generic macro dispatches its expansion according to its argument’s type:
cce_location_t: retrieve a pointer to the associated condition object
and cast it to a pointer to cce_condition_t.
cce_condition_t.
This generic macro performs compile–time type–checking so that the cast operation is applied only on values of suitable types; we can apply this macro to pointers to all the types defined by CCExceptions for which it makes sense.
This macro allows us to compare pointers without raising a warning:
cce_condition_errno_t * A = ...; cce_condition_t * B = ...; /* This raises a warning: */ A == B; /* This does not raise a warning: */ cce_condition(A) == cce_condition(B);
Next: conditions root, Previous: conditions descriptors, Up: conditions [Contents][Index]
This document describes version 0.9.0-devel.3 of CCExceptions.