Update Nested Message

Convenience Method

Declaration

TibrvStatus updateMsg(
    const char*        fieldName,
    const TibrvMsg&    value,
    tibrv_u16          fieldId=0);

Purpose

Update a field containing a nested submessage.

Remarks

This convenience method locates a field (by name or identifier) and updates its data.

The type of the existing field (within the message) and the type of the updating value must match. The message size (that is, its length in bytes) can change.

Pointer data previously extracted from the field remain valid and unchanged until the message is destroyed; that is, even updating the field’s value does not invalidate pointer data. (See Rendezvous Protects the Message from Changes to Submessage Snapshots.)

This method uses only the data portion of the nested message (value); it does not include any address information or certified delivery information.

Parameter

Description

fieldName

Update a field with this name.

value

Update the message field to this value.

The method copies the new value into the field.

fieldId

Update the field with this identifier. Zero is a special value that signifies no field identifier. It is illegal to add a field that has both a NULL field name, and a non-zero field identifier.

See Also

Field Names and Field Identifiers