Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ om_copy_value(3xom) — MAILbus 400 2.0C

Media Vault

Software Library

Restoration Projects

Artifacts Sought

om_copy_value(3xom)  —  Subroutines

(c) Digital Equipment Corporation. 1994. All rights reserved. 

Name

om_copy_value − Copies a value (string) from a private object and places it in another private object. 

Syntax

OM_return_code om_copy_value(source, source_type, source_value_position, destination, destination_type, destination_value_position)
 

Argument Data Type Access
source OM_private_object read
source_type OM_type read
source_value_position OM_value_position read
destination OM_private_object read
destination_type OM_type read
destination_value_position OM_value_position read
return_code OM_return_code

C Binding

OM_return_code om_copy_value(source, source_type, source_value_position, destination, destination_type, destination_value_position) OM_private_object source,
OM_type source_type,
OM_value_position source_value_position,
OM_private_object destination,
OM_type destination_type,
OM_value_position destination_value_position

Arguments

SourceThe object from which you want to copy the value. 

Source TypeThe type of the attribute value from which you want to copy the value. 

Source Value PositionThe position within the attribute of the value to be copied. 

DestinationThe object to which you want to copy the value. 

Destination TypeThe type of the attribute to which you want to copy the value. 

Destination Value Position
The position within the destination attribute at which you want to place the copied value. If the value of this argument exceeds the number of values in the Destination attribute, then it is taken to  be equal to that number.

Description

 
This routine either replaces, or fills in for the first time, an attribute value in the destination object with a copy of an attribute value from the source object. The source value should be a string. The copy has the same syntax as the source value.

Return Values

OM_SUCCESS The routine has completed its task successfully
OM_FUNCTION_DECLINED The routine does not apply to the object to which it is addressed
OM_FUNCTION_INTERRUPTED The routine was aborted by external intervention
OM_MEMORY_INSUFFICIENT There is not enough memory to complete the routine
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_PRESENT An expected attribute value is missing
OM_NOT_PRIVATE There is a public object where there should be a private object
OM_NOT_THE_SERVICES There is a client-generated public object where there should be either a service-generated public object or 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 routine argument or as the receptacle for a routine result
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_SYNTAX There is an attribute value with an illegal syntax
OM_WRONG_VALUE_TYPE There is an attribute value of an illegal type

Examples

 
The following example shows the copying of a string value between two objects of the MH class Delivery Envelope (envelope1 and envelope2). 
 
OM_private_object    envelope1,
                     envelope2;
OM_return_code       result;
 
result = om_copy_value (envelope1,            /∗ source object ∗/
                     MH_T_CONTENT_IDENTIFIER, /∗ source attribute ∗/
                     0,                       /∗ position of value in
                                                 source attribute ∗/
                     envelope2,               /∗ destination object ∗/
                     MH_T_CONTENT_IDENTIFIER, /∗ destination attribute ∗/
                     0);                      /∗ position in destination
                                                 attribute ∗/
 
This call to Copy Value reads the string value at position 0 in the Content Identifier attribute of envelope1. This value is then copied to position 0 in the Content Identifier attribute of envelope2. 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026