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 : ELNode_Impl.cxx
8 // Author : Jean Rahuel
18 //#include "utilities.h"
20 #include "ELNode_Impl.hxx"
22 ELNode_Impl::ELNode_Impl() {
25 ELNode_Impl::ELNode_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 * EndName ,
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 , EndName , SUPERV::ListOfStrings() , NodeKindOfNode ) {
35 // MESSAGE( NodeName << " " );
36 beginService( "ELNode_Impl::ELNode_Impl" );
38 _id = _poa->activate_object(_thisObj);
39 _Orb = CORBA::ORB::_duplicate(orb);
42 // DataFlowNode( DataFlowEditor()->AddNode( InitFunction , MoreFunction , NextFunction ,
43 // NodeName , NodeKindOfNode ) ) ;
44 // DataFlowNode( DataFlowEditor()->AddNode( SALOME_ModuleCatalog::Service() ,
46 // NodeKindOfNode ) ) ;
47 endService( "ELNode_Impl::ELNode_Impl" );
50 ELNode_Impl::ELNode_Impl( CORBA::ORB_ptr orb ,
51 PortableServer::POA_ptr poa ,
52 PortableServer::ObjectId * contId ,
53 const char *instanceName ,
54 const char *interfaceName ,
55 GraphEditor::DataFlow * aDataFlowEditor ,
56 GraphEditor::InNode * aDataFlowNode ) :
57 // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
58 GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) {
59 MESSAGE( DataFlowNode()->Name() << " " );
60 beginService( "ELNode_Impl::ELNode_Impl" );
62 _id = _poa->activate_object(_thisObj);
63 _Orb = CORBA::ORB::_duplicate(orb);
66 endService( "ELNode_Impl::ELNode_Impl" );
69 ELNode_Impl::~ELNode_Impl() {
70 beginService( "ELNode_Impl::~ELNode_Impl" );
71 endService( "ELNode_Impl::~ELNode_Impl" );
74 void ELNode_Impl::destroy() {
75 beginService( "ELNode_Impl::Destroy" );
76 if ( DataFlowEditor()->IsEditing() ) {
77 SUPERV::GNode_ptr aCoupled = SUPERV::GNode::_narrow( Coupled() ) ;
79 _poa->deactivate_object(*_id) ;
80 CORBA::release(_poa) ;
82 _thisObj->_remove_ref();
84 if ( !CORBA::is_nil( aCoupled ) ) {
85 aCoupled->SetCoupled( "" ) ;
89 endService( "ELNode_Impl::Destroy" );
92 bool ELNode_Impl::Delete() {
93 beginService( "ELNode_Impl::Delete" );
95 if ( DataFlowEditor()->IsEditing() ) {
97 RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
99 RetVal = DataFlowEditor()->IsValid() ;
102 endService( "ELNode_Impl::Delete" );