om_instance(3xom) — Subroutines
Name
om_instance - Determines whether an object is an instance of a particular class or any of its subclasses
Synopsis
#include <xom.h> OM_return_code om_instance(
OM_object subject,
OM_object_identifier class,
OM_boolean ∗instance);
Parameters
Input
subjectThe subject that remains accessible.
classIdentifies the class in question.
Output
instanceIndicates whether the subject is an instance of the specified class or any of its subclasses. This result is present if and only if the value of the OM_return_code is set to OM_SUCCESS.
Description
The om_instance() function determines whether a service-generated public or private object (the subject) is an instance of a particular class or any of its subclasses.
Notes
The client can determine an object’s class (C) by simply inspecting the object, using programming language constructs if the object is public or om_get() if it is private. This function is useful in that it reveals that an object is an instance of the specified class, even if C is a subclass of that class.
Return Values
The following describes a partial list of messages (or errors) that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.
OM_return_code
Indicates whether the function succeeded and, if not, why not. If the function is successful, the value of OM_return_code is set to OM_SUCCESS; if the function fails, it has one of the error values listed in this reference page. The exact constants for OM_return_code are defined in the xom.h header file (see the xom.h(4xom) reference page).
Errors
The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.
•OM_FUNCTION_INTERRUPTED
•OM_MEMORY_INSUFFICIENT
•OM_NETWORK_ERROR
•OM_NO_SUCH_CLASS
•OM_NO_SUCH_OBJECT
•OM_NO_SUCH_SYNTAX
•OM_NOT_THE_SERVICES
•OM_PERMANENT_ERROR
•OM_POINTER_INVALID
•OM_SYSTEM_ERROR
•OM_TEMPORARY_ERROR