The name of a C routine used to call a SIDL method is a concatenation of the package, class (or interface), and method name, with period characters replaced with underscores. If the method is specified as overloaded (i.e., has a name extension), the extension is appended. The object (or interface) pointer is automatically inserted as the first parameter in the signature of non-static methods. This parameter operates like an in parameter. With the addition of remote method invocation (RMI) support, all methods now implicitly throw exceptions. Hence, an extra out parameter for the exception is added as the last parameter of the signature.
The following SIDL method -- taken from the Babel regression tests -- is an
example of a method that can throw multiple exception types
int getFib(in int n, in int max_depth, in int max_value, in int depth) throws NegativeValueException, FibException;
The corresponding C API is
int32_t ExceptionTest_Fib_getFib( ExceptionTest_Fib self, int32_t n, int32_t max_depth, int32_t max_value, int32_t depth, sidl_BaseInterface *_ex);
Note the addition of the object pointer (i.e., self) and exception (i.e., _ex) parameters.