GetObjectClass

Description

Returns a long integer code that indicates the class of the current PBDOM_OBJECT.

Syntax

pbdom_object_name.GetObjectClass()

Argument

Description

pbdom_object_name

The name of a PBDOM_OBJECT object


Return value

Long.

A code that indicates the class of the current PBDOM_OBJECT. If pbdom_object_name is a PBDOM_ELEMENT object, the returned value is 3.

Examples

The GetObjectClass method returns a value specific to the class of the object from which the method is invoked.

PBDOM_OBJECT pbdom_obj

pbdom_obj = Create PBDOM_ELEMENT
MessageBox ("Class", &
   string(pbdom_obj.GetObjectClass()))

This example illustrates polymorphisms: pbdom_obj is declared as PBDOM_OBJECT but instantiated as PBDOM_ELMENT. A message box returns the result of the GetObjectClass method invoked for PBDOM_ELEMENT object. Here the result is 3, indicating that pbdom_obj is a PBDOM_ELEMENT object.

Usage

This method can be used for diagnostic purposes to dynamically determine the type of a PBDOM_OBJECT at runtime.