1 // SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : SNode_Impl.cxx
8 // Author : Jean Rahuel
18 //#include "utilities.h"
20 #include "SNode_Impl.hxx"
22 SNode_Impl::SNode_Impl() {
25 SNode_Impl::SNode_Impl( CORBA::ORB_ptr orb ,
26 PortableServer::POA_ptr poa ,
27 PortableServer::ObjectId * contId ,
28 const char *instanceName ,
29 const char *interfaceName ,
30 GraphEditor::DataFlow * aDataFlowEditor ,
31 const char * FuncName ,
32 const SUPERV::ListOfStrings & PythonFunction ,
33 const SUPERV::KindOfNode NodeKindOfNode ) :
34 // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
35 GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncName , PythonFunction , NodeKindOfNode ) {
36 // MESSAGE( NodeName << " " );
37 beginService( "SNode_Impl::SNode_Impl" );
39 _id = _poa->activate_object(_thisObj);
40 _Orb = CORBA::ORB::_duplicate(orb);
43 // DataFlowNode( DataFlowEditor()->AddNode( NodeService , NodeComponentName ,
44 // NodeInterfaceName , NodeName ,
45 // NodeKindOfNode ) ) ;
46 // DataFlowNode( DataFlowEditor()->AddNode( SALOME_ModuleCatalog::Service() ,
48 // NodeKindOfNode ) ) ;
49 endService( "SNode_Impl::SNode_Impl" );
52 SNode_Impl::SNode_Impl( CORBA::ORB_ptr orb ,
53 PortableServer::POA_ptr poa ,
54 PortableServer::ObjectId * contId ,
55 const char *instanceName ,
56 const char *interfaceName ,
57 GraphEditor::DataFlow * aDataFlowEditor ,
58 GraphEditor::InNode * aDataFlowNode ) :
59 // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
60 GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) {
61 MESSAGE( DataFlowNode()->Name() << " " );
62 beginService( "SNode_Impl::SNode_Impl" );
64 _id = _poa->activate_object(_thisObj);
65 _Orb = CORBA::ORB::_duplicate(orb);
68 endService( "SNode_Impl::SNode_Impl" );
71 SNode_Impl::~SNode_Impl() {
72 beginService( "SNode_Impl::~SNode_Impl" );
73 endService( "SNode_Impl::~SNode_Impl" );
76 void SNode_Impl::destroy() {
77 beginService( "SNode_Impl::Destroy" );
78 if ( DataFlowEditor()->IsEditing() ) {
79 SUPERV::GNode_ptr aCoupled = SUPERV::GNode::_narrow( Coupled() ) ;
81 _poa->deactivate_object(*_id) ;
82 CORBA::release(_poa) ;
84 _thisObj->_remove_ref();
86 if ( !CORBA::is_nil( aCoupled ) ) {
87 aCoupled->SetCoupled( "" ) ;
91 // endService( "SNode_Impl::Destroy" );
94 bool SNode_Impl::Delete() {
95 // beginService( "SNode_Impl::Delete" );
97 if ( DataFlowEditor()->IsEditing() ) {
99 RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
101 RetVal = DataFlowEditor()->IsValid() ;
103 // endService( "SNode_Impl::Delete" );