GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  XMTASSERTWIDGETCLASS (3)

NAME

XmtAssertWidgetClass() - verify the type of a widget.

CONTENTS

SYNOPSIS

   #include <Xmt/Xmt.h>

   void XmtAssertWidgetClass(Widget w, WidgetClass c, String procname)

ARGUMENTS

INPUTS
w The widget to be checked.
c The desired widget class.
procname An identifying string to be used in the error message displayed if the widget w is not of class c or a subclass of it. This argument is most useful when it is the name of the procedure that calls XmtAssertWidgetClass().

DESCRIPTION

XmtAssertWidgetClass() 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.

USAGE

XmtAssertWidgetClass() 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 ALSO

Chapter 8, Utility Functions,
abort(), assert(), XtIsSubclass().
Search for    or go to Top of page |  Section 3 |  Main Index


Xmt XMTASSERTWIDGETCLASS (3) Motif Tools

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.