2-30
SOMobjects Base Toolkit: Programmer’s Reference Manual
delete_values Method
Purpose
Deletes property value(s).
IDL Syntax
ORBStatus delete_values (
in Identifier prop_name);
Description
The delete_values method deletes the specified property value(s) from a Context object.
If prop_name has a trailing wildcard character(“*”), then all property names that match will
be deleted.
Search scope is always limited to the specified Context object.
If no matching property is found, an exception is returned.
Parameters
receiver A pointer to the Context object from which values will be deleted.
env A pointer to the Environment structure for the method caller.
prop_name An identifier specifying the property value(s) to be deleted.
Return Value
The delete_values 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”);
...
rc = _delete_values(newcxt, &ev, ”username”);
Original Class
Context
Related Information
Methods: set_one_value, set_values, get_values
Comentários a estes Manuais