Overview | The context read and write operations allow the access and update of the list of context identifiers that apply to an operation (CORBA::OperationDef object) in the Interface Repository. |
Original interface | OperationDef Interface |
Exceptions | CORBA::SystemException |
Intended Usage
The context attribute specifies the list of context identifiers that apply to an operation definition. The context read and write operations are supported with parameter and result definitions as described below.
Syntax
attribute ContextIdSeq contexts;
Read operations
The returned value is a pointer to a copy of the contexts attribute of the operation definition. The memory is owned by the caller and can be removed by invoking delete.
Write operations
The contexts parameter is the new list of contexts with which to update the operation definition (the length of the sequence may be set to zero to indicate no contexts).
Example
// C++ // assume that 'this_operation' has already been initialized CORBA::OperationDef * this_operation; // establish the sequence of contexts for updating the operation // definition CORBA::ContextIdSeq seq_update; seq_update.length (2); seq_update[0] = CORBA::string_dup ("CONTEXT_0=value_0"); seq_update[1] = CORBA::string_dup ("CONTEXT_1= value_1"); // update the operation with the new contexts list this_operation-> contexts (seq_update); // retrieve the contexts list from the operation definition CORBA::ContextIdSeq * returned_context_list; returned_context_list = this_operation-> contexts ();