Previous: , Up: dtor   [Contents][Index]


4.3 Exception handlers

The best way to use the dtor trait is through the exception handlers API.

Struct Typedef: ccstructs_clean_handler_t

Type of struct usable has clean handler with the facilities of the CCExceptions library.

Struct Typedef: ccstructs_error_handler_t

Type of struct usable has error handler with the facilities of the CCExceptions library.

Function: void ccstructs_init_and_register_clean_handler (cce_destination_t L, ccstructs_clean_handler_t * H, ccstructs_dtor_T I)

Initialise the exception handler H to apply the destructor to a struct instance as defined by I, in the context of the location L.

Function: void ccstructs_init_and_register_error_handler (cce_destination_t L, ccstructs_error_handler_t * H, ccstructs_dtor_T I)

Initialise the exception handler H to apply the destructor to a struct instance as defined by I, in the context of the location L.

Preprocessor Macro: void ccstructs_init_and_register_handler (cce_destination_t L, H, ccstructs_dtor_T I)

Initialise the exception handler H to apply the destructor to a struct instance as defined by I, in the context of the location L. If H is a pointer of type:

ccstructs_clean_handler_t

The macro use expands into a call to ccstructs_init_and_register_clean_handler().

ccstructs_error_handler_t

The macro use expands into a call to ccstructs_init_and_register_error_handler().


Previous: , Up: dtor   [Contents][Index]

This document describes version 0.3.0-devel.3 of CCStructs.