2 //=============================================================================
3 // File : SNode_Impl.cxx
5 // Author : Jean Rahuel
8 //=============================================================================
15 #include "utilities.h"
17 #include "SNode_Impl.hxx"
19 SNode_Impl::SNode_Impl() {
22 SNode_Impl::SNode_Impl( CORBA::ORB_ptr orb ,
23 PortableServer::POA_ptr poa ,
24 PortableServer::ObjectId * contId ,
25 const char *instanceName ,
26 const char *interfaceName ,
27 GraphEditor::DataFlow * aDataFlowEditor ,
28 const char * FuncName ,
29 const SUPERV::ListOfStrings & PythonFunction ,
30 const SUPERV::KindOfNode NodeKindOfNode ) :
31 // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
32 GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncName , PythonFunction , NodeKindOfNode ) {
33 // MESSAGE( NodeName << " " );
34 beginService( "SNode_Impl::SNode_Impl" );
36 _id = _poa->activate_object(_thisObj);
37 _Orb = CORBA::ORB::_duplicate(orb);
40 // DataFlowNode( DataFlowEditor()->AddNode( NodeService , NodeComponentName ,
41 // NodeInterfaceName , NodeName ,
42 // NodeKindOfNode ) ) ;
43 // DataFlowNode( DataFlowEditor()->AddNode( SALOME_ModuleCatalog::Service() ,
45 // NodeKindOfNode ) ) ;
46 endService( "SNode_Impl::SNode_Impl" );
49 SNode_Impl::SNode_Impl( CORBA::ORB_ptr orb ,
50 PortableServer::POA_ptr poa ,
51 PortableServer::ObjectId * contId ,
52 const char *instanceName ,
53 const char *interfaceName ,
54 GraphEditor::DataFlow * aDataFlowEditor ,
55 GraphEditor::InNode * aDataFlowNode ) :
56 // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
57 GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) {
58 MESSAGE( DataFlowNode()->Name() << " " );
59 beginService( "SNode_Impl::SNode_Impl" );
61 _id = _poa->activate_object(_thisObj);
62 _Orb = CORBA::ORB::_duplicate(orb);
65 endService( "SNode_Impl::SNode_Impl" );
68 SNode_Impl::~SNode_Impl() {
69 beginService( "SNode_Impl::~SNode_Impl" );
70 endService( "SNode_Impl::~SNode_Impl" );
73 void SNode_Impl::destroy() {
74 beginService( "SNode_Impl::Destroy" );
75 if ( DataFlowEditor()->IsEditing() ) {
77 _poa->deactivate_object(*_id) ;
78 CORBA::release(_poa) ;
80 _thisObj->_remove_ref();
83 endService( "SNode_Impl::Destroy" );
86 bool SNode_Impl::Delete() {
87 // beginService( "SNode_Impl::Delete" );
89 if ( DataFlowEditor()->IsEditing() ) {
90 RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
92 RetVal = DataFlowEditor()->IsValid() ;
94 // endService( "SNode_Impl::Delete" );