10.4.19 OperationDef

An OperationDef (shown below) represents the information needed to define an operation of an interface.

module CORBA {
      enum OperationMode {OP_NORMAL, OP_ONEWAY};
      enum ParameterMode {PARAM_IN, PARAM_OUT, PARAM_INOUT};
      struct ParameterDescription {
            Identifier            name;
            TypeCode              type;
            IDLType               type_def;
            ParameterMode         mode;
     };
     typedef sequence <ParameterDescription> ParDescriptionSeq;

     typedef Identifier ContextIdentifier;
     typedef sequence <ContextIdentifier> ContextIdSeq;

     typedef sequence <ExceptionDef> ExceptionDefSeq;
     typedef sequence <ExceptionDescription> ExcDescriptionSeq;

     interface OperationDef : Contained {
          readonly    attribute TypeCode               result;
          readonly    attribute IDLType                result_def;
          readonly    attribute ParDescriptionSeq      params;
          readonly    attribute OperationMode          mode;
          readonly    attribute ContextIdSeq           contexts;
          readonly    attribute ExceptionDefSeq        exceptions;
    };
    struct OperationDescription {
    Identifier                       name;
    RepositoryId                     id;
    RepositoryId                     defined_in;
    VersionSpec                      version;
    TypeCode                         result;
    OperationMode                    mode;
    ContextIdSeq                     contexts;
    ParDescriptionSeq                parameters;
    ExcDescriptionSeq                exceptions;
  };
};
result
A TypeCode that describes the type of the value returned by the operation.
result_def
Identifies the definition of the returned type.
params
Describes the parameters of the operation. It is a sequence of ParameterDescription structures. The order of the ParameterDescriptions in the sequence is significant. The name member of each structure provides the parameter name. The type member is a TypeCode describing the type of the parameter. The type_def member identifies the definition of the type of the parameter. The mode member indicates whether the parameter is an in, out, or inout parameter.
mode
The operation’s mode is either oneway (that is, no output is returned) or normal.
contexts
Specifies the list of context identifiers that apply to the operation.
exceptions
Specifies the list of exception types that can be raised by the operation.

The inherited describe operation for an OperationDef object returns an OperationDescription.

The inherited describe_contents operation provides a complete description of this operation, including a description of each parameter defined for this operation.