-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"
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" );
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 ,