2-34
SOMobjects Base Toolkit: Programmer’s Reference Manual
set_one_value Method
Purpose
Adds a single property to the specified Context object.
IDL Syntax
ORBStatus set_one_value (
in Identifier prop_name,
in string value);
Description
The set_one_value method adds a single property to the specified Context object.
Parameters
receiver A pointer to the Context object to which the value is to be added.
env A pointer to the Environment structure for the method caller.
prop_name The name of the property to be added. The prop_name should not end in
an asterisk.
value The value of the property to be added.
Return Value
The set_one_value method returns an ORBStatus value representing the return code from
the operation.
Example
#include <somd.h>
Environment ev;
Context cxt, newcxt;
long rc;
...
/* get the process’ default Context */
rc = _get_default_context(SOMD_ORBObject, &ev, &cxt);
/* make newcxt a child Context of the default Context (cxt) */
rc = _create_child(cxt, &ev, ”myContext”, &newcxt);
rc = _set_one_value(newcxt, &ev, ”username”, ”joe”);
Original Class
Context
Related Information
Methods: set_values, get_values, delete_values
Komentarze do niniejszej Instrukcji