Oct 7, 2004 #1 neseidus Programmer Sep 1, 2004 41 CA Hi I have a CORBA::Any that I'm using to store a bool. This is what I do: (c++) bool myBool = false; CORBA::Any myAny; myAny <<= myBool; CORBA::Boolean outVal; myAny >>= CORBA::Any::to_boolean( outVal ) This isn't working! Any ideas why?
Hi I have a CORBA::Any that I'm using to store a bool. This is what I do: (c++) bool myBool = false; CORBA::Any myAny; myAny <<= myBool; CORBA::Boolean outVal; myAny >>= CORBA::Any::to_boolean( outVal ) This isn't working! Any ideas why?
Oct 8, 2004 #2 Cagliostro Programmer Sep 13, 2000 4,226 GB try this: myAny >>= CORBA::Any::to_boolean( myBool ) Ion Filipski Upvote 0 Downvote
Oct 8, 2004 Thread starter #3 neseidus Programmer Sep 1, 2004 41 CA Compiler catches it, complains that there's no constructor that takes the source type. Upvote 0 Downvote
Oct 8, 2004 Thread starter #4 neseidus Programmer Sep 1, 2004 41 CA I got it CORBA::Any myAny; CORBA::Boolean corbaBool1; corbaBool1 = true; myAny <<= CORBA::Any::from_boolean(corbaBool1); CORBA::Boolean corbaBool; if( myAny >>= CORBA::Any::to_boolean(corbaBool) ) { bool myBool = corbaBool; cout << myBool; } Upvote 0 Downvote
I got it CORBA::Any myAny; CORBA::Boolean corbaBool1; corbaBool1 = true; myAny <<= CORBA::Any::from_boolean(corbaBool1); CORBA::Boolean corbaBool; if( myAny >>= CORBA::Any::to_boolean(corbaBool) ) { bool myBool = corbaBool; cout << myBool; }
Oct 8, 2004 Thread starter #5 neseidus Programmer Sep 1, 2004 41 CA I also forgot to run my orb Upvote 0 Downvote