Operation declarations define the interface of each operation
introduced by the interface. An Interface Definition Language (IDL) operation
is typically implemented by a method in the implementation programming language.
Hence, the terms operation and method are often used interchangeably. An operation
declaration is similar to a C++ virtual function definition:
[ oneway ] type-spec identifier ( parameter-list ) [ raises-expr [ context-expr ] ;
where:
- identifier is the name of the operation.
- type-spec is any valid IDL type, except a sequence
or the keyword void that indicates that the operation returns no value. (Although
the return type cannot be a sequence, it can be a user-defined type that is
a sequence.) Unlike C and C++ procedures, operations that do not return a
result must specify void as their return type.
The remaining syntax of an operation declaration is elaborated in
the following topics:
- IDL operation declarations: "oneway" keyword.
- IDL operation declarations: parameter list.
- IDL operation declarations: "raises" expression.
- IDL operation declarations: "context" expression.