[omniORB] Hi

Sai-Lai Lo S.Lo@orl.co.uk
09 Apr 1998 11:44:56 +0100


Saravanan Radhakrishnan <rsarav@ittc.ukans.edu> writes:

> I had question about the operations with parameters in the 'out' mode.
> Why is it that they are mapped into two function in C++. Any specific
> reason for doing it that way ?

To be more precise, an extra (helper) function is needed if and only if
there is an OUT variable length argument. This is necessary  to
implement the T_var argument and result passing semantics as specified by
CORBA 2.0. 

For instance, if the client calls an operation with a CORBA::String_var as
an OUT string argument. The original string managed by the String_var should
be freed before the result is assigned to the String_var. The extra
(helper) function causes the compiler to invoke the appropriate conversion
functions to manage the String_var properly.

All these are transparent to the application. If you stick with the mapping
as defined in CORBA 2.0, you don't need to know.

You may wonder why some other ORBs do not do that. I hope you'll not be too
surprise that these ORBs leak memory behind your back.

Of course, the goal post has been moved in CORBA 2.1 as some ORB vendors
have difficulty implementing the T_var semantics. There is now extra helper
functions to deal with in and inout arguments.

Regards,

Sai-Lai

-- 
Dr. Sai-Lai Lo                          |       Research Scientist
                                        |
E-mail:         S.Lo@orl.co.uk          |       Olivetti & Oracle Research Lab
                                        |       24a Trumpington Street
Tel:            +44 223 343000          |       Cambridge CB2 1QA
Fax:            +44 223 313542          |       ENGLAND