om_create(3xom) — Subroutines
Name
om_create - Creates a new private object that is an instance of a particular class
Synopsis
#include <xom.h> OM_return_code om_create(
OM_object_identifier class,
OM_boolean initialize,
OM_workspace workspace,
OM_private_object ∗object);
Parameters
Input
classIdentifies the class of the object to be created. The specified class shall be concrete.
initializeDetermines whether the object created is initialized as specified in the definition of its class. If this parameter is OM_TRUE, the object is made to comprise the attribute values specified as initial values in the tabular definitions of the object’s class and its superclasses. If this parameter is OM_FALSE, the object is made to comprise the OM_CLASS attribute alone.
workspaceThe workspace in which the object is created. The specified class is in a package associated with this workspace.
Output
objectThe created object. This result is present if and only if the return value for OM_return_code is OM_SUCCESS.
Description
The om_create() function creates a new private object that is an instance of a particular class.
Notes
By subsequently adding new values to the object and replacing and removing existing values, the client can create all conceivable instances of the object’s 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 later in this chapter).
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_DECLINED
•OM_FUNCTION_INTERRUPTED
•OM_MEMORY_INSUFFICIENT
•OM_NETWORK_ERROR
•OM_NO_SUCH_CLASS
•OM_NO_SUCH_WORKSPACE
•OM_NOT_CONCRETE
•OM_PERMANENT_ERROR
•OM_POINTER_INVALID
•OM_SYSTEM_ERROR
•OM_TEMPORARY_ERROR