Salome HOME
*** empty log message ***
[modules/superv.git] / src / Supervision / INode_Impl.cxx
index 6c10a6372841dc5a0a7a595c54788818ef291868..bbce38e53bde4fe331392daa8834a46848118a2c 100644 (file)
@@ -1,19 +1,21 @@
-using namespace std;
-//=============================================================================
-// File      : INode_Impl.cxx
-// Created   : 2003
-// Author    : Jean Rahuel
-// Project   : SALOME
-// Copyright : CEA
-// $Header: 
-//=============================================================================
+//  SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : INode_Impl.cxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header: 
 
+using namespace std;
 #include <stdio.h>
 #include <fstream>
-#include <strstream>
+//#include <sstream>
 #include <string>
 
-#include "utilities.h"
+//#include "utilities.h"
 
 #include "LNode_Impl.hxx"
 
@@ -54,8 +56,8 @@ INode_Impl::INode_Impl( CORBA::ORB_ptr orb ,
   CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , SALOME_ModuleCatalog::Service() , FuncName , NodeKindOfNode , FuncName , aPythonFunction ) {
   beginService( "INode_Impl::INode_Impl" );
   if ( FuncName ) {
-    cout << "INode_Impl::CNode_Impl " << (void *) FuncName << " " << FuncName
-         << " " << strlen( FuncName ) << endl ;
+//    cout << "INode_Impl::CNode_Impl " << (void *) FuncName << " " << FuncName
+//         << " " << strlen( FuncName ) << endl ;
   }
   if ( NodeKindOfNode == SUPERV::InLineNode ) {
     MESSAGE( "INode_Impl::INode_Impl " << FuncName << " _poa->activate_object" );
@@ -175,80 +177,6 @@ char * INode_Impl::PyFuncName() {
   return CORBA::string_dup( DataFlowNode()->PyFuncName() ) ;
 }
 
-SUPERV::Port_ptr INode_Impl::InPort( const char *aParameterName ,
-                                     const char *aParameterType ) {
-  SUPERV::Port_ptr Inobject = SUPERV::Port::_nil() ;
-  SUPERV::Port_ptr Outobject = SUPERV::Port::_nil() ;
-  SUPERV::Port_ptr InEndobject = SUPERV::Port::_nil() ;
-  Port_Impl * myInPort = NULL ;
-  bool InPortCreated = false ;
-  GraphBase::InPort * anInPort = DataFlowNode()->GetChangeInPort( aParameterName ) ;
-  if ( anInPort == NULL && DataFlowNode()->IsOneOfInLineNodes() ) {
-    anInPort = DataFlowNode()->AddInPort( aParameterName , aParameterType ) ;
-    InPortCreated = true ;
-  }
-  if ( anInPort ) {
-    Inobject = anInPort->ObjRef() ;
-    if ( CORBA::is_nil( Inobject ) ) {
-      myInPort = new Port_Impl( _Orb , _Poa , _ContId ,
-                                instanceName() , interfaceName() ,
-                                DataFlowEditor() ,
-                                DataFlowNode() ,
-                                (GraphBase::Port * ) anInPort ,
-                                true ) ;
-      if ( myInPort ) {
-        PortableServer::ObjectId * id = myInPort->getId() ;
-        CORBA::Object_var obj = _poa->id_to_reference(*id) ;
-        Inobject = SUPERV::Port::_narrow(obj) ;
-      }      
-    }
-  }
-
-  if ( !CORBA::is_nil( Inobject ) && InPortCreated &&
-       ( DataFlowNode()->IsLoopNode() || DataFlowNode()->IsEndLoopNode() ||
-         DataFlowNode()->IsEndSwitchNode() ) ) {
-    Outobject = OutPort( aParameterName , aParameterType ) ;
-    if ( DataFlowNode()->IsLoopNode() ) {
-      LNode_Impl * myLoopNode = (LNode_Impl * ) this ;
-      InEndobject = myLoopNode->Coupled()->InPort( aParameterName , aParameterType ) ;
-      DataFlowEditor()->AddLink( Outobject->Node()->Name() , Outobject->Name() ,
-                                 InEndobject->Node()->Name() , InEndobject->Name() ) ;
-    }
-  }
-  DataFlowEditor()->UnValid() ;
-  return SUPERV::Port::_duplicate( Inobject ) ;
-}
-
-SUPERV::Port_ptr INode_Impl::OutPort( const char *aParameterName ,
-                                      const char *aParameterType ) {
-  Port_Impl * myOutPort = NULL ;
-  SUPERV::Port_ptr Outobject = SUPERV::Port::_nil() ;
-  GraphBase::OutPort * anOutPort = DataFlowNode()->GetChangeOutPort( aParameterName ) ;
-  if ( anOutPort == NULL && DataFlowNode()->IsOneOfInLineNodes() ) {
-    anOutPort = DataFlowNode()->AddOutPort( aParameterName , aParameterType ) ;
-  }
-  if ( anOutPort ) {
-    Outobject = anOutPort->ObjRef() ;
-    if ( CORBA::is_nil( Outobject ) ) {
-      const CORBA::Any * anAny = anOutPort->Value() ;
-      myOutPort = new Port_Impl( _Orb , _Poa , _ContId ,
-                                 instanceName() , interfaceName() ,
-                                 DataFlowEditor() ,
-                                 DataFlowNode() ,
-                                 (GraphBase::Port * ) anOutPort ,
-                                 false ,
-                                 anAny ) ;
-      if ( myOutPort ) {
-        PortableServer::ObjectId * id = myOutPort->getId() ;
-        CORBA::Object_var obj = _poa->id_to_reference(*id) ;
-        Outobject = SUPERV::Port::_narrow(obj) ;
-      }
-    }
-  }
-  DataFlowEditor()->UnValid() ;
-  return SUPERV::Port::_duplicate( Outobject );
-}
-
 #if 0
 bool INode_Impl::BusPort( const char * InOutParameterName ,
                          const char * InOutParameterType ,