|
NAMEXmtAssertWidgetClass() - verify the type of a widget.SYNOPSIS#include <Xmt/Xmt.h>
void XmtAssertWidgetClass(Widget w, WidgetClass c, String procname) ARGUMENTSINPUTS
DESCRIPTIONXmtAssertWidgetClass() calls XtIsSubclass() to verify that widget w is of class c or is a subclass of c. If so, it returns and takes no action. If w is not of class c or a subclass, then XmtAssertWidgetClass() prints an error message and calls the function abort() which will cause the application to dump core and exit.USAGEXmtAssertWidgetClass() is an analog to assert(). It is used mainly by widget writers, but also occasionally by application programmers who are writing a function that expects a widget argument of a specific type. Many of the functions in the Xmt library call this function internally.XmtAssertWidgetClass() is useful during the process of application development and debugging because it gives a very clear signal (a message and a core dump with its associated stack trace) of when application code is calling a function with a bad widget argument. Once an application is debugged, you can compile your code (and the Xmt library) with the -DNDEBUG flag, which will cause any calls to XmtAssertWidgetClass() to be removed by the C preprocessor. SEE ALSOChapter 8, Utility Functions,abort(), assert(), XtIsSubclass().
Visit the GSP FreeBSD Man Page Interface. |