Salome HOME
omniORB4 porting
authorrahuel <rahuel@opencascade.com>
Wed, 26 Oct 2005 12:37:25 +0000 (12:37 +0000)
committerrahuel <rahuel@opencascade.com>
Wed, 26 Oct 2005 12:37:25 +0000 (12:37 +0000)
src/GraphBase/DataFlowBase_Base.cxx
src/GraphBase/DataFlowBase_Base.hxx
src/GraphBase/DataFlowBase_DataPort.cxx

index ae44e86a61456360066551efe194c0193f117474..42e62c5ebcb0e2cf8519a29eb65d87c7d85949b3 100644 (file)
@@ -117,7 +117,11 @@ ostream & GraphBase::Base::AnyValue( const CORBA::Any & anAny ) {
     case CORBA::tk_objref: {
       try {
         CORBA::Object_ptr obj ;
+#if OMNIORB_VERSION >= 4
+        anAny >>= (CORBA::Any::to_object ) obj ;
+#else
         anAny >>= obj ;
+#endif
         if ( CORBA::is_nil( obj ) ) {
           *_fdebug << "CORBA::Object_ptr " << obj << " nil reference (tk_object)"
                    << endl ;
index 7d7988b9669e8fae256cd71f2b0005fc546a90ad..188922ea704e505073e32ece4b7aa550ab98b195 100644 (file)
@@ -49,8 +49,6 @@
 #include "utilities.h"
 #include "OpUtil.hxx"
 
-#define omniORB_4_0_5 1
-
 #define ExitWhenNodeAborted 1
 
 extern char *SuperVision_Version ;
index 66511ee2b29694e0eb54059d0341e4651eac9f27..7eb22b1429e2eb48b75efcd76c1ee069ec165850 100644 (file)
@@ -180,7 +180,11 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) {
         catch( ... ) {
           *theValue <<= CORBA::Object::_nil() ;
         }
+#if OMNIORB_VERSION >= 4
+        *theValue >>= (CORBA::Any::to_object ) ObjRef ;
+#else
         *theValue >>= ObjRef ;
+#endif
 #if ValueTrace
         cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind "
                << theValue->type()->kind() ;
@@ -231,7 +235,11 @@ void GraphBase::DataPort::SetValue( 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
 #if ValueTrace
         cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind "
                << theValue->type()->kind() ;
@@ -282,7 +290,11 @@ void GraphBase::DataPort::SetValue( 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
 #if ValueTrace
         cdebug << " --> Value( " << ObjectToString( ObjRef ) << ") (object reference) kind "
                << theValue->type()->kind() ;
@@ -297,7 +309,11 @@ void GraphBase::DataPort::SetValue( 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
 #if ValueTrace
     cdebug << "Value( " << ObjectToString( obj ) << ") (object reference)";
 #endif
@@ -307,7 +323,11 @@ void GraphBase::DataPort::SetValue( 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
 #if ValueTrace
       cdebug << " == Value( " << ObjectToString( obj ) << ") (object reference)";
 #endif
@@ -316,7 +336,11 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) {
       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
 #if ValueTrace
         cdebug << " --> Value( " << ObjectToString( obj ) << ") (string) kind " << theValue->type()->kind() ;
 #endif
@@ -417,7 +441,11 @@ const CORBA::Any GraphBase::DataPort::Value() const {
       char * retstr ;
       try {
 //JR 30.03.2005        *theValue >>= obj ;
+#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;
@@ -515,7 +543,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(...) {