]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Porting from omniORB3 to omniORB4
authorrahuel <rahuel@opencascade.com>
Fri, 14 Oct 2005 11:44:50 +0000 (11:44 +0000)
committerrahuel <rahuel@opencascade.com>
Fri, 14 Oct 2005 11:44:50 +0000 (11:44 +0000)
src/GraphBase/DataFlowBase_DataPort.cxx
src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx
src/Supervision/Value_Impl.cxx

index 0496832e1bdec738b4832c8c7f5edb29c53133ba..e260801256ac33126dd88010eddf2e999e8e44f5 100644 (file)
@@ -166,7 +166,11 @@ void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) {
         catch( ... ) {
           *theValue <<= CORBA::Object::_nil() ;
         }
+#if OMNIORB_VERSION >= 4
+        *theValue >>= (CORBA::Any::to_object ) ObjRef ;
+#else
         *theValue >>= ObjRef ;
+#endif
         cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind "
                << theValue->type()->kind() ;
       }
@@ -205,7 +209,11 @@ void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) {
       else { // Default
         CORBA::Object_ptr ObjRef ;
         *theValue <<= CORBA::Object::_nil() ;
+#if OMNIORB_VERSION >= 4
+        *theValue >>= (CORBA::Any::to_object ) ObjRef ;
+#else
         *theValue >>= ObjRef ;
+#endif
         cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind "
                << theValue->type()->kind() ;
       }
@@ -244,7 +252,11 @@ void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) {
       else { // Default
         CORBA::Object_ptr ObjRef ;
         *theValue <<= CORBA::Object::_nil() ;
+#if OMNIORB_VERSION >= 4
+        *theValue >>= (CORBA::Any::to_object ) ObjRef ;
+#else
         *theValue >>= ObjRef ;
+#endif
         cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind "
                << theValue->type()->kind() ;
       }
@@ -255,7 +267,11 @@ void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) {
   }
   case CORBA::tk_objref: { // Input objref Value
     CORBA::Object_ptr obj ;
+#if OMNIORB_VERSION >= 4
+    *aDataValue >>= (CORBA::Any::to_object ) obj;
+#else
     *aDataValue >>= obj;
+#endif
     cdebug << "Value( " << ObjectToString( obj ) << ") (object reference)";
     if ( strcmp( Type , "string" ) &&
          strcmp( Type , "boolean" ) && strcmp( Type , "char" ) &&
@@ -263,14 +279,22 @@ void GraphBase::DataPort::Value( const CORBA::Any * aDataValue ) {
          strcmp( Type , "double" ) ) { // SuperVision Default Value
       _theValue = aDataValue ;
       *_Value = aDataValue ;
+#if OMNIORB_VERSION >= 4
+      *_theValue >>= (CORBA::Any::to_object ) obj ;
+#else
       *_theValue >>= obj;
+#endif
       cdebug << " == Value( " << ObjectToString( obj ) << ") (object reference)";
     }
     else {
       CORBA::Any * theValue = new CORBA::Any() ;
       if ( !strcmp( Type , "string" ) ) {
         *theValue <<=  ObjectToString( obj ) ;
+#if OMNIORB_VERSION >= 4
+        *theValue >>= (CORBA::Any::to_object ) obj ;
+#else
         *theValue >>= obj ;
+#endif
         cdebug << " --> Value( " << ObjectToString( obj ) << ") (string) kind " << theValue->type()->kind() ;
       }
       else if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) ||
@@ -386,7 +410,11 @@ CORBA::Any const * GraphBase::DataPort::Value() const {
       CORBA::Object_ptr obj ;
       char * retstr ;
       try {
+#if OMNIORB_VERSION >= 4
+        *theValue >>= (CORBA::Any::to_object ) obj ;
+#else
         *theValue >>= obj ;
+#endif
         retstr = ObjectToString( obj );
 //        cdebug << "GraphBase::DataPort::Value() : " << retstr
 //               << "(object reference) " << endl;
@@ -480,7 +508,11 @@ void GraphBase::DataPort::StringValue(ostream & f ) const {
     case CORBA::tk_objref:
       CORBA::Object_ptr ObjRef ;
       try {
+#if OMNIORB_VERSION >= 4
+        *theValue >>= (CORBA::Any::to_object ) ObjRef ;
+#else
         *theValue >>= ObjRef ;
+#endif
         f << "(object reference) " << ObjectToString( ObjRef ) ;
       }
       catch(...) {
index 6dcdb436d6fe5a0ef1eeeafb9e652be9f24b3c02..1a6825fe811a0484bcaf76d572ee819117893656 100644 (file)
@@ -356,7 +356,11 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
       case CORBA::tk_objref : {
         MyPyObjRefList = PyTuple_New( 1 ) ;
         PyObject * ObjValue ;
+#if OMNIORB_VERSION >= 4
+        data >>= (CORBA::Any::to_object ) ObjRef ;
+#else
         data >>= ObjRef ;
+#endif
         IORObjRef = ObjectToString( ObjRef ) ;
         ObjValue = Py_BuildValue( "s" , IORObjRef ) ;
         PyTuple_SetItem( MyPyObjRefList , 0 , ObjValue ) ;
index 9b948e61df2d4bc6276a6f3691060ebebe1aa551..f04d3a87b5cee3273e3af37fdc00ac10610dcba0 100644 (file)
@@ -278,7 +278,11 @@ char * Value_Impl::ToString() {
     case CORBA::tk_objref: {
       CORBA::Object_ptr obj ;
       try {
+#if OMNIORB_VERSION >= 4
+        anAny >>= (CORBA::Any::to_object ) obj ;
+#else
         anAny >>= obj ;
+#endif
         retstr = _Orb->object_to_string( obj );
 //        MESSAGE( "ToString( object ) '" << retstr << "'" );
       }