[omniORB] Any Type conversion problem
Le Flour Thierry
leflour at lapp.in2p3.fr
Thu Mar 25 15:05:42 GMT 2004
Hi all,
I am curently working with the Any type.
I have defined in my .idl a structure as following :
struct BrickAndCS
{
long brickId;
long CSId;
};
typedef BrickAndCS BrickCS;
In my C++ code, I try to use the Any type :
//====================================================
BrickCS bcs,*bcs1;
bcs.brickId = 100;
bcs.CSId = 1000;
CORBA::Any a;
a <<= bcs;
if (a >>= bcs1)
{
cout << "Decoded value contained in Any." << endl;
}
else
{
cout << "Unknown value contained in Any." << endl;
}
cout << "Brick on Carousel info sent " <<bcs1->brickId<< " " <<
bcs1->CSId << endl;
//====================================================
When i run this piece of code, i expect to get 100 and 1000 as values of
BrickCS structure but the results values are 0 and 0.
What i did wrong ?
Any idea ?
In advance, thanks a lot.
--
---------------------------------------------------
Le Flour Thierry
Service Informatique
L.A.P.P. - BP 110, Chemin de Bellevue
74941 Annecy le Vieux cedex
Tel : 04.50.09.16.67 - Fax : 04.50.27.94.95
04.50.09.16.00
email: leflour at lapp.in2p3.fr
---------------------------------------------------
More information about the omniORB-list
mailing list