Overview | Access and update the mode attribute of an operation definition (CORBA::OperationDef) within the Interface Repository. |
Original interface | OperationDef Interface |
Exceptions | CORBA::SystemException |
Intended Usage
The mode read and write operations allow the access and update of the mode attribute of an operation definition (CORBA::OperationDef) within the Interface Repository.
The operation's mode attribute can be one of two values. If no output is returned by the operation, the operation is oneway (the mode attribute is CORBA::OP_ONEWAY), otherwise the operation is normal (the mode attribute is CORBA::OP_NORMAL).
The mode attribute can only be set to CORBA::OP_ONEWAY if the result is void and all of the operation parameters (the params attribute) are input only (have a mode of CORBA::PARAM_IN).
Syntax
OperationMode mode;
Read operations
The returned value is the current value of the mode attribute of the operation definition (CORBA::OperationDef) object.
Write operations
The mode parameter is the new value to which the mode attribute of the CORBA::OperationDef object will be set. Valid mode values include CORBA::OP_ONEWAY and CORBA::OP_NORMAL.
Example
// C++ // assume that 'this_operation' has already been initialized CORBA::OperationDef * this_operation; // set the new mode in the operation definition CORBA::OperationMode new_mode = CORBA::OP_NORMAL; this_operation-> mode (new_mode); // retrieve the mode from the operation definition CORBA::OperationMode returned_mode; returned_mode = this_operation-> mode ();