Reference

CL_Assert(3)

This is ClanLib's assertion class.

NAME

CL_Assert - This is ClanLib's assertion class.

DESCRIPTION

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.

SEE ALSO

All ClanLib API classes can be found in clanlib (3).

AUTHORS

Originally written by Magnus Norddahl <[email protected]> and Martin Starch <[email protected]>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at http://somewhere.in.the.world.org).

See clanlib (3) to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.