Overloaded methods

Using the overload_sample.sidl file from Section 5.7 as an example, recall that three versions of the getValue method are specified. The first signature takes no arguments, the second takes an integer, and the third a boolean. The code snippet below illustrates object creation, and method invocation for each of the overloaded methods.


boolean b1, bresult;
int     i1, iresult, nresult;

Overload.Sample t  = new Overload.Sample();

nresult = t.getValue();
bresult = t.getValue(b1);
iresult = t.getValue(i1);





babel-1.4.0
users_guide Last Modified 2008-10-16

http://www.llnl.gov/CASC/components
components@llnl.gov