NAME

omX_string_to_object - Converts an OM object specified in string format to descriptor format

SYNOPSIS

#include <xom.h>
#include <xomext.h>

OM_return_code omX_string_to_object(
        OM_workspace workspace,
        OM_string *string,
        OM_object_identifier class,
        OM_boolean local_strings,
        OM_private_object *object,
        OM_integer *error_position,
        OM_integer *error_type);

PARAMETERS

Input

workspace
The workspace pointer obtained from a ds_initialize() call.

string
The string to be converted. Refer to Chapter in the OSF DCE Application Development Guide for details of the string syntaxes allowed.

class
The OM class of the object to be created.

local_strings
Indicates if the attribute values are to be converted from their local string format. For further information on local strings please refer to Chapter 10 in the OSF DCE Application Development Guide.

Output

object
The converted object.

error_position
If there is a syntax error in the input string, then error_position indicates the position in the string where the error was detected.

error_type
Indicates the type of error, (for example, Attribute Abbreviation expected, '/' expected, and so on...). Refer to the xomext.h header file for explanations of the error types.

DESCRIPTION

The omX_string_to_object() function creates a new private object, which is built from the string and class input parameters.

The objects that can be created by this function are restricted to those defined in the schema file, xoischema.

For the syntax of the input strings please refer to Chapter 9 of the OSF DCE Application Development Guide.

NOTES

The memory space for the object return parameter is allocated by omX_string_to_object(). The calling application is responsible for releasing this memory with the om_delete() function call.

RETURN VALUES

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 the xom.h(4xom) reference page.

If there is a syntax error in the input string, OM_return_code is set to OM_WRONG_VALUE_MAKEUP and the type of error is returned in error_type.

ERRORS

Refer to xom.h(4xom) and xomext.h for a list of the possible error values that can be returned in OM_return_code and error_type.


© 1990-1996, Transarc Corporation