[omniORB] Problem with Any type

Kevin Wooten KevinW at rainbowstudios.com
Thu Dec 11 10:01:14 GMT 2003


When you generate your IDL you need to explicitly tell omniidl to generate
code for typecodes and any's with the switch "-Wba". "omniidl -bcxx -u" will
show you all the options for C++ and explain them.

Cheers,
Kevin

-----Original Message-----
From: Le Flour Thierry [mailto:leflour at lapp.in2p3.fr] 
Sent: Thursday, December 11, 2003 9:38 AM
To: omniorb-list at omniorb-support.com
Subject: [omniORB] Problem with Any type

Hi all,
i would like to code into a Any type a structure described in my IDL file.
I tried to do the following:
    CORBA::Any myAny;
    MyStructure aStruct;
        (* Filling the structure*)
        myAny <<= aStruct;

When i compile this piece of code , the compiler says :
    No matching for `CORBA::Any & <<= MyStructure &'
    /usr/local/include/omniORB4/CORBA_Any.h:69: candidates are: void 
CORBA::Any::operator<<= (cdrStream &)
    ...
I tried to cast with :
    myAny <<= (cdrStram &)aStruct
but , of course, it does work.
So, what i did wrong with this piece of code.
    Thank you
        Cheers.


_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list



More information about the omniORB-list mailing list