2-13
DSOM Framework Reference
Context_delete Macro
Purpose
Deletes a Context object.
Syntax
ORBStatus Context_delete (
Context ctxobj,
Environment *env,
Flags del_flag);
Description
The Context_delete macro deletes the specified Context object. This macro maps to the
destroy method of the Context class.
Parameters
ctxobj A pointer to the Context object to be deleted.
env A pointer to the Environment structure for the caller.
del_flag A bitmask (unsigned long). If the flag CTX_DELETE_DESCENDANTS is
specified, the macro deletes the specified Context object and all of its
descendant Context objects. A zero value indicates that the flag is not set.
Expansion
Context_destroy ( ctxobj, env, del_flag )
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);
...
/* assuming no descendent Contexts have been
* created from newcxt, we can destroy newcxt with flags=0
*/
rc = Context_delete(newcxt, &ev, (Flags) 0);
Related Information
Methods: Context_destroy
Kommentare zu diesen Handbüchern