2-35
DSOM Framework Reference
set_values Method
Purpose
Adds/changes one or more property values in the specified Context object.
IDL Syntax
ORBStatus set_values (
in NVList values);
Description
The set_values method sets one or more property values in the specified Context object.
In the NVList, the flags field must be set to zero, and the TypeCode field associated with an
attribute value must be TC_string.
Parameters
receiver A pointer to the Context object for which the properties are to be set.
env A pointer to the Environment structure for the method caller.
values A pointer to an NVList object containing the properties to be set. The
property names in the NVList should not end in an asterisk.
Return Value
The set_values method returns an ORBStatus value representing the return code from the
operation.
Example
#include <somd.h>
Environment ev;
Context cxt1, cxt2;
string *cxt1props;
long rc, i, numprops;
NVList nvp;
...
for (i= numprops; i > 0; i––) {
/* get the value of the *cxt1props property from cxt1 */
rc = _get_values(cxt1, &ev, NULL, (Flags) 0, *cxt1props, &nvp);
/* and if found then update cxt2 with that name–value pair */
if (rc == 0) rc = _set_values(cxt2, &ev, nvp);
_free(nvp,&ev);
cxt1props++;
}
Original Class
Context
Related Information
Methods: set_one_value, get_values, delete_values
Commenti su questo manuale