The OBJ_CLASS function identifies the name of the object class or superclass of the given argument.
Result = OBJ_CLASS( [Arg] [, COUNT=variable] [, /SUPERCLASS{must specify Arg}] )
Returns a string containing the name of the class or superclass. If the supplied argument is not an object, a null string is returned. If no argument is supplied, OBJ_CLASS returns an array containing the names of all known object classes in the current IDL session.
A scalar object reference or string variable for which the object class name is desired. If Arg is an object reference, its object class definition is used. If Arg is a string, it is taken to be the name of the class for which information is desired. Passing a string argument is primarily useful in conjunction with the SUPERCLASS keyword.
Set this keyword equal to a named variable that will contain the number of names returned by OBJ_CLASS. It can be used to determine how many superclasses a class has when the SUPERCLASS keyword is specified.
Set this keyword to cause OBJ_CLASS to return the names of the object's direct superclasses as a string array, one element per superclass. The superclasses are ordered in the order they appear in the class structure declaration. In the case where the class has no superclasses, a scalar null string is returned, and the COUNT keyword (if specified) returns the value 0. If SUPERCLASS is specified, the Arg argument must also be supplied.
| Note |
Introduced: 5.0