Salome HOME
Merge from OCC_development_generic_2006
[modules/superv.git] / src / Supervision / CNode_Impl.cxx
index 9dd23bbfb7676741de0438a4ab7a14414c40cb28..31a2dbe4ec277f88eebb85ce8990a906f90f66e7 100644 (file)
@@ -23,6 +23,8 @@ using namespace std;
 
 #include "StreamPort_Impl.hxx"
 
+char *FACTORYSERVERPY = "localhost/FactoryServerPy" ;
+
 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
                        PortableServer::POA_ptr poa ,
                        PortableServer::ObjectId * contId , 
@@ -65,7 +67,8 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
                         const char * NodeName ,
                         const SUPERV::KindOfNode NodeKindOfNode ,
                         const char * FuncName  ,
-                        const SUPERV::ListOfStrings & PythonFunction ) :
+                        const SUPERV::ListOfStrings & PythonFunction ,
+                       bool isCimpl ) :
   Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
 //  beginService( "CNode_Impl::CNode_Impl" );
 //  cout << "CNode_Impl::CNode_Impl -->" << endl ;
@@ -92,10 +95,25 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
     aPythonFunction.resize(1) ;
     aPythonFunction[0] = &PythonFunction ;
   }
-  _DataFlowNode = DataFlowEditor()->AddNode( NodeService , "" , "" , NodeName ,
-                                            NodeKindOfNode ,
-                                            aFuncName ,
-                                            aPythonFunction ) ;
+
+  // mkr : PAL11273 -->
+  if ( isCimpl ) // C++ implementation
+    _DataFlowNode = DataFlowEditor()->AddNode( NodeService , "" , "" , NodeName ,
+                                              NodeKindOfNode ,
+                                              aFuncName ,
+                                              aPythonFunction ) ;
+  else // Python implementation
+    _DataFlowNode = DataFlowEditor()->AddNode( NodeService , "" , "" , NodeName ,
+                                              NodeKindOfNode ,
+                                              aFuncName ,
+                                              aPythonFunction ,
+                                              SUPERV::SDate() ,
+                                              SUPERV::SDate() ,
+                                              NULLSTRING ,
+                                              NULLSTRING ,
+                                              FACTORYSERVERPY ) ;
+  // mkr : PAL11273 <--
+
   _IsNode = true ;
 //  endService( "CNode_Impl::CNode_Impl" );  
 //  cout << "<-- CNode_Impl::CNode_Impl" << endl ;
@@ -1017,7 +1035,7 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() {
           begin = false ;
         }
         if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() && 
-                                     ( IsExecuting() || DataFlowEditor()->IsReadOnly() ) ) ) {
+                                     ( /*IsExecuting() || */DataFlowEditor()->IsReadOnly() ) ) ) { // mkr : IPAL11362
 //          MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
         }
         else if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
@@ -1072,7 +1090,7 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() {
           begin = false ;
         }
         if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() &&
-                                      ( IsExecuting() || DataFlowEditor()->IsReadOnly() ) ) ) {
+                                      ( /*IsExecuting() || */DataFlowEditor()->IsReadOnly() ) ) ) { // mkr : IPAL11362
 //          MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
         }
         else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
@@ -1490,13 +1508,14 @@ long CNode_Impl::SubStreamGraph() {
   return RetVal ;
 }
 
-bool CNode_Impl::IsLinked(const char * ServiceParameterName ) {
+// mkr : PAL8060 : this method is not used
+/*bool CNode_Impl::IsLinked(const char * ServiceParameterName ) {
   beginService( "CNode_Impl::IsLinked" );
   bool RetVal = DataFlowNode()->IsLinked( ServiceParameterName ) ;
   MESSAGE( Name() << "->IsLinked( '" << ServiceParameterName << "' )" ) ;
   endService( "CNode_Impl::IsLinked" );
   return RetVal ;
-}
+  }*/
 
 bool CNode_Impl::HasInput(const char * ServiceParameterName ) {
 //  beginService( "CNode_Impl::HasInput" );