Previous | Contents | Index |
Removes and discards specified values of an attribute of a private object.
OM _return_code om_remove(subject, type, initial _value, limiting_value)
Argument | Data Type | Access |
---|---|---|
subject | OM_private_object | read |
type | OM_type | read |
initial_value | OM_value_position | read |
limiting_value | OM_value_position | read |
return_code | OM_return_code |
OM_return_code om_remove(subject, type, initial_value, limiting_value)OM_private_object subject,
OM_type type,
OM_value_position initial_value,
OM_value_position limiting_value
Subject
The private object from which you want to remove attribute values. The function does not affect the class of the subject.Type
The type of the attribute from which you want to remove values. The type must not be OM_CLASS.Initial Value
The position within the attribute of the first value to be removed.If the value of Initial Value is OM_ALL_VALUES, or if it exceeds the number of values present in the attribute, the service takes this argument to be equal to the number of values present in the attribute.
Limiting Value
The position within the attribute one beyond that of the last value to be removed. If this argument is less than the Initial Value argument, no values are removed.If the value of Limiting Value is OM_ALL_VALUES, or if the value exceeds the number of values present in an attribute, the service takes this argument to be equal to the number of values present in the attribute.
This function removes and discards particular values of an attribute of a private object, the subject. If no values remain in an attribute after removal of the values you specify, the service removes the attribute. If one of the values you specify is a subobject, the service removes that value, and then applies om_delete to make the subobject inaccessible.
Possible return values are as follows:
Return Description OM_SUCCESS The function has completed its task successfully. OM_FUNCTION_DECLINED The function does not apply to the object to which it is addressed. OM_FUNCTION_INTERRUPTED The function was aborted by external intervention. OM_MEMORY_INSUFFICIENT There is not enough memory to complete the function. OM_NETWORK_ERROR The service cannot use the underlying network. OM_NO_SUCH_OBJECT You have specified a nonexistent object, or an invalid Handle for an object. OM_NO_SUCH_TYPE There is an undefined type identifier. OM_NOT_PRIVATE There is a public object where there should be a private object. OM_PERMANENT_ERROR The service encountered a permanent problem for which there is no defined error code. OM_POINTER_INVALID An invalid pointer was supplied as a function argument. OM_SYSTEM_ERROR The service cannot use the operating system. OM_TEMPORARY_ERROR The service encountered a temporary problem for which there is no defined error code.
The first example shows a single value being removed from a private object of MH class Message message. MH_T_LATEST_DELIVERY_TIME is the attribute type whose value is removed. This attribute has one value. The function therefore removes the value and deletes the attribute.The second example shows a range of values being removed from a private object of the X.500 class Entry-Information-Selection select_info. DS_ATTRIBUTES_SELECTED is the attribute type whose values are removed. If this attribute has five values (positions 0 to 4), then this function removes the second, third, and fourth values.
OM_private_object message; OM_return_code result; result = om_remove (message, /* object from which to remove value */ MH_T_LATEST_DELIVERY_TIME, /* attribute to remove */ 0,1)); /* position of single value to remove */
OM_private_object select_info; OM_return_code result; result = om_remove (select_info, /* object from which to remove value */ DS_ATTRIBUTES_SELECTED, /* attribute to remove */ 1,4)); /* range of values to remove */
Writes a segment of a string to an attribute in a private object.
OM _return_code om_write(subject, type, value _position, syntax, string_offset, elements )
Argument | Data Type | Access |
---|---|---|
subject | OM_private_object | read |
type | OM_type | read |
value_position | OM_value_position | read |
syntax | OM_syntax | read |
string_offset | OM_string_length | read-write |
elements | OM_string | read |
return_code | OM_return_code |
OM_return_code om_write(subject, type, value_position, syntax, string_offset, elements )OM_private_object subject,
OM_type type,
OM_value_position value_position,
OM_syntax syntax,
OM_string_length #string_offset,
OM_string elements
Subject
The object into which you want to write the string segment.Type
The type of the attribute to which you want to write the string segment.Value Position
In a multivalued attribute, the position of the value in which you want to place the string. This argument must have a positive value, and it must not exceed the number of values present in the attribute. If it equals the number of values present, the service inserts the segment at the end of the attribute as a new value.Syntax
If you are writing a new value to an attribute, identify in this argument the syntax that you want the new value to have. It must be a permissible syntax for the attribute to which you are writing. To check that the syntax is permissible, consult the definition of the class of which the subject is an instance.If you are overwriting or amending a value that is already present in the subject, the service preserves the syntax of that value, so you can supply a null value.
String Offset
If supplied by the client, this argument denotes the position, p, within the attribute value at which you want the first segment written. The position is specified as an offset in octets relative to the start of the string value.If this argument has a value greater than the number of elements in the attribute value, the service takes the argument to be equal to that number.
If returned by the service, this argument denotes the position of the end of the last segment written. The position is specified as an offset in octets relative to the start of the string value.
The value returned by the service as the position of the end of the last segment written can be specified as the position from which to start writing the next segment. This enables you to write segments sequentially.
Elements
The string segment that you want to write to the attribute, n elements in number. Copies of these elements occupy the positions, within the value, in the interval between p and (p) + n. The function discards any elements already in or beyond these positions.The elements are bits, octets, or characters, depending on the nature of the string.
This function writes a segment of an attribute value in a private object, the subject. The segment that the service writes becomes the last segment in the attribute value. The function discards any segments in the attribute value whose offsets are equal to or greater than the offset specified in String Offset.If the segment that the service writes is in the local representation, the service converts it to the nonlocal representation. This can result in loss of information and may result in a different number of elements than that specified.
Possible return values are as follows:
Return Description OM_SUCCESS The function has completed its task successfully. OM_FUNCTION_DECLINED The function does not apply to the object to which it is addressed. OM_FUNCTION_INTERRUPTED The function was aborted by external intervention. OM_MEMORY_INSUFFICIENT There is not enough memory to complete the function. OM_NETWORK_ERROR The service cannot use the underlying network. OM_NO_SUCH_OBJECT You have specified a nonexistent object, or an invalid Handle for an object. OM_NO_SUCH_SYNTAX There is an undefined syntax identifier. OM_NO_SUCH_TYPE There is an undefined type identifier. OM_NOT_PRESENT An expected attribute value is missing. OM_NOT_PRIVATE There is a public object where there should be a private object. OM_PERMANENT_ERROR The service encountered a permanent problem for which there is no defined error code. OM_POINTER_INVALID An invalid pointer was supplied as a function argument. OM_SYSTEM_ERROR The service cannot use the operating system. OM_TEMPORARY_ERROR The service encountered a temporary problem for which there is no defined error code. OM_WRONG_VALUE_LENGTH There is an attribute with a value that violates the value length constraints in force. OM_WRONG_VALUE_MAKEUP There is an attribute with a value that violates a constraint of its syntax. OM_WRONG_VALUE_POSITION The usage of value position(s) identified in the argument(s) of a function is invalid. OM_WRONG_VALUE_SYNTAX There is an attribute value with an illegal syntax.
The following example shows a string segment being written to an object of the Interpersonal Messaging (IM) class IA5 Text Body Part body_part.
OM_return_code result; OM_value_position position; input_string = OM_STRING ("Text Body"); position = 0; result = om_write (body_part, /* object containing string segment */ IM_TEXT, /* attribute containing string segment */ 0, /* position of value to write to */ OM_S_IA5_STRING, /* syntax of value */ &position, /* starting position for current/next string */ input_string); /* string segment to be written */In this example, the type of attribute being written to is IM_TEXT; the position of the value being written to is 0; the syntax of the value is OM_S_IA5_STRING.
This chapter contains reference material for Object-Oriented RPC. Object-Oriented RPC is described in the Digital DCE for OpenVMS VAX and OpenVMS Alpha Product Guide.
9.1 Object-Oriented RPC Exceptions
C++ Specific Exceptions | |
---|---|
Exception | Description |
rpc_x_object_not_found | The referenced object was not found in the server. |
rpc_x_no_client_stub | A reference was attempted from the server to a remote object and the client stub was not linked into the application. |
rpc_x_no_server_stub | A local object was passed as a parameter from the client to a remote operation and the server stub was not linked into the client or local application. |
IDL Supplied Interface Member Functions | ||||
---|---|---|---|---|
Operation | Arguments | Return Type | Static | Description |
register_named_object |
unsigned_char_t~*
boolean32~=~TRUE |
void | N | Advertises an object with the DCE name service and registers the object with the DCE runtime. A FALSE value causes the endpoint map to be added to rather than replaced. |
bind | unsigned_char_t~* | <interface> * | Y | Partially binds an interface to a remote object by CDS name. |
bind | rpc_binding_handle_t~* | <interface> * | Y | Partially binds an interface to a remote object by RPC binding handle. |
bind | uuid_t~* | <interface> * | Y | Partially binds an interface to a remote object by UUID using the RPC_DEFAULT_ENTRY environment variable name to search the name space for a binding handle matching the UUID. |
C++ Specific ACF Attributes | ||
---|---|---|
Attribute | Usage | Description |
cxx_lookup( lookup operation) | interface | Causes the lookup operation to be treated as a server supplied call-out function. This function is called by the server stub whenever an object cannot be located within the DCE runtime. |
cxx_static | operation | Causes the operation to be generated as a static member function in the interface class. The server stub will invoke the routine identified by the name <interface>::<operation> |
cxx_static( manager operation) | operation | Causes the operation to be generated as a static member function in the interface class. The server stub will invoke the routine identified by the name manager operation. |
cxx_new( implementation) | operation | Causes the function to be generated as a static member function in the interface class. This type of function is used to dynamically create remote objects. The server stub will call the C++ new operator on the implementation class. |
sstub | include | Causes the file name to be #-included in the server stub |
cstub | include | Causes the file name to be #-included in the client stub |
Previous | Next | Contents | Index |