[omniORB] How avoid copying "in" parameters?
DA SILVA Antonio
adasilva at carax.com
Thu Feb 7 15:10:25 GMT 2008
I'm not sure what you mean, but be carefull with
"in/out" parameters : the parameter is sent by the caller
throught the network to the servant and then sent back
throught the network to the caller even if it is not
modified. It passes 2 times in the network.
It could be network bandwith consuming
in that case...
If you want to use const parameter as a non-const
just use the "const_cast" operator inside your method.
I don't known if this is clean regarding C++ paradigms.
Antonio.
Teemu Torma a écrit :
> On Thursday 07 February 2008, DA SILVA Antonio wrote:
>
>> When I declare a parameter as "in" inside an IDL,
>> it is then implemented as a reference in C++.
>> How can I store the parameter/data I receive in this
>> reference without copying it?
>>
>
> If the parameter is an sequence, you could make it inout parameter to
> get it passed as non-const reference and steal the contents.
>
> Teemu
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
>
--
_________________________
Antonio DA SILVA
C A R A X IT Department
Software Engineer
11 bis rue d'Aguesseau
75008 Paris, FRANCE
Tel +33 (0)1 70 91 67 94
_________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080207/c27e0d82/attachment-0001.htm
More information about the omniORB-list
mailing list