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 : ESNode_Impl.cxx
8 // Author : Jean Rahuel
18 //#include "utilities.h"
20 #include "ESNode_Impl.hxx"
22 ESNode_Impl::ESNode_Impl() {
25 ESNode_Impl::ESNode_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::KindOfNode NodeKindOfNode ) :
33 // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
34 GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncName , SUPERV::ListOfStrings() , NodeKindOfNode ) {
35 // MESSAGE( NodeName << " " );
36 beginService( "ESNode_Impl::ESNode_Impl" );
38 // cout << "ESNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName
39 // << " " << strlen( FuncName ) << endl ;
42 _id = _poa->activate_object(_thisObj);
43 _Orb = CORBA::ORB::_duplicate(orb);
46 // DataFlowNode( DataFlowEditor()->AddNode( NodeService , NodeComponentName ,
47 // NodeInterfaceName , NodeName ,
48 // NodeKindOfNode ) ) ;
49 // DataFlowNode( DataFlowEditor()->AddNode( SALOME_ModuleCatalog::Service() ,
51 // NodeKindOfNode ) ) ;
52 endService( "ESNode_Impl::ESNode_Impl" );
55 ESNode_Impl::ESNode_Impl( CORBA::ORB_ptr orb ,
56 PortableServer::POA_ptr poa ,
57 PortableServer::ObjectId * contId ,
58 const char *instanceName ,
59 const char *interfaceName ,
60 GraphEditor::DataFlow * aDataFlowEditor ,
61 GraphEditor::InNode * aDataFlowNode ) :
62 // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
63 GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) {
64 MESSAGE( DataFlowNode()->Name() << " " );
65 beginService( "ESNode_Impl::ESNode_Impl" );
67 _id = _poa->activate_object(_thisObj);
68 _Orb = CORBA::ORB::_duplicate(orb);
71 endService( "ESNode_Impl::ESNode_Impl" );
74 ESNode_Impl::~ESNode_Impl() {
75 beginService( "ESNode_Impl::~ESNode_Impl" );
76 endService( "ESNode_Impl::~ESNode_Impl" );
79 void ESNode_Impl::destroy() {
80 beginService( "ESNode_Impl::Destroy" );
81 if ( DataFlowEditor()->IsEditing() ) {
82 // SUPERV::GNode_ptr aCoupled = SUPERV::GNode::_narrow( Coupled() ) ;
84 _poa->deactivate_object(*_id) ;
85 CORBA::release(_poa) ;
87 _thisObj->_remove_ref();
90 MESSAGE("ESNode_Impl::destroy ERROR ") ;
92 // destroy have to be used for the SwitchNode ==> destroy of the EndSwitchNode
93 // if ( !CORBA::is_nil( aCoupled ) ) {
94 // aCoupled->SetCoupled( "" ) ;
95 // aCoupled->destroy() ;
98 endService( "ESNode_Impl::Destroy" );
101 bool ESNode_Impl::Delete() {
102 beginService( "ESNode_Impl::Delete" );
103 bool RetVal = false ;
104 if ( DataFlowEditor()->IsEditing() ) {
106 RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
107 // IsValid is done in SNode_Impl::Delete
109 // RetVal = DataFlowEditor()->IsValid() ;
112 endService( "ESNode_Impl::Delete" );