Next: conditions unknown, Previous: conditions objects, Up: conditions [Contents][Index]
The root exceptional–condition object–type descriptor has the only purpose of being the root
of the descriptors tree; there should be no exceptional–condition objects having this as
descriptor. The root descriptor has parent field set to NULL; this must be the
only descriptor with such a property.
All the following definitions are accessible from the header file ccexceptions.h.
Structure type representing the root exceptional–condition object–type descriptor, the root of the descriptors hierarchy tree. This descriptor has a single instance built into the library. It has the following public fields:
cce_descriptor_t descriptorCore values of the exceptional–condition object–type descriptor.
Structure type representing the root exceptional–condition object; this struct
type must never be instantiated. It has the following public fields:
cce_condition_t conditionCore values of the exceptional–condition object.
Return true if the object referenced by C is derived from the root type; otherwise
return false. With a correctly built conditions hierarchy: this function always returns
true.
When deriving a subtype from cce_condition_root_t we need the
following functions.
Mutate the exceptional–condition object–type descriptor referenced by D so that its parent
is the descriptor of cce_descriptor_root_t. We should call this function
in the initialisation module of the derived type.
Initialise an already allocated exceptional–condition object. We should call this function from the initialisation function of the derived type.
To define a subtype of cce_condition_root_t we can copy the code in the files:
condition-subtyping-root.c condition-subtyping-root-header.h condition-subtyping-root-body.c
under the tests directory of the source distribution; the code defines a new
exceptional–condition object–type my_condition_root_subtype_t.
Next: conditions unknown, Previous: conditions objects, Up: conditions [Contents][Index]
This document describes version 0.9.0-devel.3 of CCExceptions.