Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtCheckSubc(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtClass(1)

XtIsSubclass(1)

XtSuperclass(1)

Core(3)

 

Name

XtCheckSubclass — in DEBUG mode, verify an object’s class. 

Synopsis

void XtCheckSubclass(object, object_class, message)

    Widget object;
    WidgetClass object_class;
    String message;

Arguments

objectSpecifies the object; may be of class Object or any subclass thereof. 

object_class
Specifies the widget class to test against; may be of class objectClass or any subclass thereof.

messageSpecifies the message to be used if the widget is not a subclass of the specified object_class. 

Description

XtCheckSubclass determines if object object belongs to a subclass of the specified object_class.  (Note that two objects of the same class satisfy this condition.)  The object can be any number of subclasses removed and need not be an immediate subclass of the specified object class. 

If the object is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the object’s actual class, and the expected class, and it calls XtErrorMsg. 

XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid object class for the exported operation. 

XtCheckSubclass is a macro.  It is only executed when the object has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code. 

XtCheckSubclass uses the Core widget data structures to perform its checking. 

See Also

XtClass(1), XtIsSubclass(1), XtSuperclass(1),
Core(3). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026