CL_Assert3
This is clanlib's assertion class.
Overview
It is needed because some implementations requires to be notified before ClanLib is exited. For instance the svgalib implementation need release the keyboard lock.
Class members
- static void
enable_channels( -
int channel_mask)
- static void
die( -
bool a, const char *file, int line, const char *func, const char *assert_str)
- static void
info( -
int channel, char *text, char *file, int line)
- static void
add_listener( -
CL_AssertListener *listener)
- static void
remove_listener( -
CL_AssertListener *listener)
Members with descriptions
- static void
enable_channels( -
int channel_mask)
Parameters: channel_mask - Channels to be enabled.
Description:
Enabled the error channels specified by the channel_mask.This can be used to get extra debugging information from limitedparts of ClanLib.
- static void
die( -
bool a, const char *file, int line, const char *func, const char *assert_str)
Parameters: a - Asserts if false. file - Name of the file where the assert occoured. line - Line in the file where the assert occoured. func - Function in which the assert occoured. assert_str - String that describe the assertion check.
Description:
Produces an assert. This function shouldn't be called directly -instead, use the cl_assert macro.
- static void
info( -
int channel, char *text, char *file, int line)
Parameters: channel - Channel to use. text - text to print. file - Name of the file where this was printed from. line - Line in the file where this was printed from.
Description:
Writes an info statements on the specified channel. Don't callthis one directly, instead use the cl_info macro.
- static void
add_listener( -
CL_AssertListener *listener)
Parameters: listener - The listener to be added.
Description:
Adds an assertion listener which will be called in case of anassertion.
- static void
remove_listener( -
CL_AssertListener *listener)
Parameters: listener - The listener to be removed.
Description:
Removes an assertion listener.