Next: conditions math infinity, Previous: conditions math error, Up: conditions math [Contents][Index]
The mathematical not–a–number exceptional–condition object–type has the purpose of describing an exceptional condition caused by a not–a–number result while computing a mathematical expression.
There should be only one mathematical not–a–number exceptional–condition object: the one predefined by CCExceptions and built into the library as statically allocated structure. Subtyping from this object–type is fine.
All the following definitions are accessible from the header file ccexceptions.h.
Structure type representing the exceptional–condition object–type descriptor. This descriptor has
the descriptor cce_descriptor_runtime_error_t as parent. It has the following public fields:
cce_descriptor_t descriptorCore values of the exceptional–condition object–type descriptor.
Structure type representing a mathematical not–a–number exceptional–condition object. It has the following public fields:
cce_condition_math_error_t math_errorCore values of the exceptional–condition object–type descriptor.
Return a pointer to the predefined, statically allocated, structure representing the
exceptional–condition object of type cce_condition_math_nan_t.
Return true if the exceptional–condition object referenced by C is of type
cce_condition_math_nan_t or it is derived from it; otherwise return
false.
When deriving a subtype from cce_condition_math_nan_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_math_nan_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_math_nan_t we can copy the code in the files:
condition-subtyping-math-nan.c condition-subtyping-math-nan-header.h condition-subtyping-math-nan-body.c
under the tests directory of the source distribution; the code defines a new
exceptional–condition object–type my_condition_math_nan_subtype_t.
Next: conditions math infinity, Previous: conditions math error, Up: conditions math [Contents][Index]
This document describes version 0.9.0-devel.3 of CCExceptions.