![]() |
Operation declarations define the interface of each operation introduced by the interface. (An 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, indicating 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: