[omniORB] long -> Any -> Any
HA Quoc Viet
qvha@axlog.fr
Thu, 02 Sep 1999 17:34:50 +0200
hi,
If someone has been working with CORBA::Any I would appreciate some
input on
these points :
=================================================================================
long l = 2;
CORBA::Any any, value;
any <<= l ; // works, though not with all orbs (ie mico fails)
value << any ;
l=1;
value >> l ; // doesn't work. I'd bet value is not storing a long
but an Any
... finally yelds l=1, and not l=2 as I expected.
==================================================================================
CORBA::Any src,dst;
memcpy( (void*)dst , (void*)src , siezof(CORBA::Any) );
make things very unstable
==================================================================================
CORBA::Any src,dst;
dst = src ;
doesn't work either
==================================================================================
The only acceptable (no crash) way I've found so far to copy an
CORBA::Any is to
do src >>= dst, though I've been losing my original type (cf first
code).
HOW DO YOU DUPLICATE ANYs ?????
Thanks for any help .... :o)
Viet
PS : using omniorb 2.7.1 shipping with debian