Overview | The params read and write operations allow the access and update of the parameter descriptions of an operation definition object (CORBA::OperationDef) in the Interface Repository. |
Original interface | OperationDef Interface |
Exceptions | CORBA::SystemException |
Intended Usage
The params attribute describes the parameters of the operation.
The params attribute is a CORBA::ParDescriptionSeq data type, each element of which has 4 fields. The name (CORBA::Identifier) is the name of the parameter. The type field references a CORBA::TypeCode that represents the parameter type. The type_def field references a CORBA::IDLType that represents the parameter type definition. The mode field defines the parameter as an input parameter, an output parameter, or as used for both input and output (CORBA::PARAM_IN, CORBA::PARAM_OUT, and CORBA::PARAM_INOUT, respectively). The order of the elements in the sequence is important and should reflect the actual order of the parameters in the operation signature.
The params read and write operations are supported with the parameters and return values as defined below.
Syntax
attribute ParDescriptionSeq params;
Read operations
The returned sequence of CORBA::ParameterDescriptions is a copy of the params attribute of the CORBA::OperationDef object. The memory is owned by the caller and can be removed by calling delete.
Write operations
The params parameter defines the new list of parameters that will comprise the parameters for the operation.
Example
// C++ // assume that 'this_operation' and 'pk_long_ptr' // have already been initialized CORBA::OperationDef * this_operation; CORBA::PrimitiveDef * pk_long_ptr; // establish the CORBA::ParDescriptionSeq CORBA::ParDescriptionSeq seq_update; seq_update.length (1); seq_update[0].name = CORBA::string_dup ("parameter_0"); seq_update[0].type = CORBA::_tc_long; seq_update[0].type_def = CORBA::IDLType::_duplicate (pk_long_ptr); seq_update[0].mode = CORBA::PARAM_IN; // update the params attribute in the OperationDef this_operation-> params (seq_update); // retrieve the params attribute from the OperationDef CORBA::ParDescriptionSeq * returned_parm_list; returned_parm_list = this_operation-> params ();