![]() |
Overview An OperationDef is used within the Interface Repository to represent the information needed to define an operation of an interface. File name somir.idl Local-only True Ancestor interfaces Contained Interface Exceptions CORBA::SystemException Supported operations OperationDef::contexts OperationDef::describe OperationDef::exceptions OperationDef::mode OperationDef::params OperationDef::result OperationDef::result_def
Intended Usage
The OperationDef object is used to represent the information that defines an operation of an interface. An OperationDef may be created by calling the create_operation operation of the InterfaceDef interface . The create_operation parameters include the unique RepositoryId (CORBA::RepositoryId), the name (CORBA::Identifier), the version (CORBA::VersionSpec), the result (CORBA::IDLType*) to indicate the type of the returned operation result, the mode of the operation (CORBA::OP_NORMAL or CORBA::OP_ONEWAY), a sequence (CORBA::ParDescriptionSeq) defining the parameters of the operation, a sequence (CORBA::ExceptionDefSeq) defining the exceptions of the operation, and a sequence (CORBA::ContextIdSeq) defining the contexts of the operation.
IDL syntax
module CORBA { enum OperationMode {OP_NORMAL, OP_ONEWAY}; enum ParameterMode {PARAM_IN, PARAM_OUT, PARAM_INOUT}; struct Parameter Description { Identifier name; TypeCode type; IDLType type_def; ParamterMode mode; }; typedef sequence ParDescriptionSeq; typedef identifier ContextIdentifier; typedef sequence contextIdSeq; typedef sequence ExceptionDefSeq; typedef sequence ExcDescriptionSeq; interface OperationDef:Contained { readonlyattribute TypeCode result; attribute IDLType result_def; attribute ParDescriptionSeq params; attribute OperationMode mode; attribute ContextIdSeq contexts; attribute ExceptionDefSeq exceptions; }; struct OperationDescription { Identifier name; RepositoryId id; RepositoryId defined_in; VersionSpec version; TypeCode result; OperationMode mode; ContextIdSeq contexts; ParDescriptionSeq parameters; ExcDescriptionSeq exceptions; }; };