2) Fix for bug PAL11273 : How to set the name of the container in a Factory Node.
#include "StreamPort_Impl.hxx"
+char *FACTORYSERVERPY = "localhost/FactoryServerPy" ;
+
CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
PortableServer::POA_ptr poa ,
PortableServer::ObjectId * contId ,
const char * NodeName ,
const SUPERV::KindOfNode NodeKindOfNode ,
const char * FuncName ,
- const SUPERV::ListOfStrings & PythonFunction ) :
+ const SUPERV::ListOfStrings & PythonFunction ,
+ bool isCimpl ) :
Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
// beginService( "CNode_Impl::CNode_Impl" );
// cout << "CNode_Impl::CNode_Impl -->" << endl ;
aPythonFunction.resize(1) ;
aPythonFunction[0] = &PythonFunction ;
}
- _DataFlowNode = DataFlowEditor()->AddNode( NodeService , "" , "" , NodeName ,
- NodeKindOfNode ,
- aFuncName ,
- aPythonFunction ) ;
+
+ // mkr : PAL11273 -->
+ if ( isCimpl ) // C++ implementation
+ _DataFlowNode = DataFlowEditor()->AddNode( NodeService , "" , "" , NodeName ,
+ NodeKindOfNode ,
+ aFuncName ,
+ aPythonFunction ) ;
+ else // Python implementation
+ _DataFlowNode = DataFlowEditor()->AddNode( NodeService , "" , "" , NodeName ,
+ NodeKindOfNode ,
+ aFuncName ,
+ aPythonFunction ,
+ SUPERV::SDate() ,
+ SUPERV::SDate() ,
+ NULLSTRING ,
+ NULLSTRING ,
+ FACTORYSERVERPY ) ;
+ // mkr : PAL11273 <--
+
_IsNode = true ;
// endService( "CNode_Impl::CNode_Impl" );
// cout << "<-- CNode_Impl::CNode_Impl" << endl ;
return RetVal ;
}
-bool CNode_Impl::IsLinked(const char * ServiceParameterName ) {
+// mkr : PAL8060 : this method is not used
+/*bool CNode_Impl::IsLinked(const char * ServiceParameterName ) {
beginService( "CNode_Impl::IsLinked" );
bool RetVal = DataFlowNode()->IsLinked( ServiceParameterName ) ;
MESSAGE( Name() << "->IsLinked( '" << ServiceParameterName << "' )" ) ;
endService( "CNode_Impl::IsLinked" );
return RetVal ;
-}
+ }*/
bool CNode_Impl::HasInput(const char * ServiceParameterName ) {
// beginService( "CNode_Impl::HasInput" );
const char * NodeName = NULLSTRING ,
const SUPERV::KindOfNode NodeKindOfNode = SUPERV::ComputingNode ,
const char * aFuncName = NULLSTRING ,
- const SUPERV::ListOfStrings & aPythonFunction = SUPERV::ListOfStrings() ) ;
+ const SUPERV::ListOfStrings & aPythonFunction = SUPERV::ListOfStrings() ,
+ bool isCimpl = true ) ; // mkr : PAL11273 : C++ implementation by default
CNode_Impl( CORBA::ORB_ptr orb ,
PortableServer::POA_ptr poa ,
PortableServer::ObjectId * contId ,
virtual long SubGraph() ;
virtual long SubStreamGraph() ;
- virtual bool IsLinked(const char * ToServiceParameterName ) ;
+ // mkr : PAL8060 : this method is not used
+ //virtual bool IsLinked(const char * ToServiceParameterName ) ;
virtual bool HasInput(const char * ToServiceParameterName ) ;
// virtual SUPERV::Link_ptr GetLink(const char * ToServiceParameterName ) ;
const char * NodeComponentName ,
const char * NodeInterfaceName ,
const char * NodeName ,
- const SUPERV::KindOfNode NodeKindOfNode ) :
+ const SUPERV::KindOfNode NodeKindOfNode ,
+ bool isCimpl ) :
// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
- CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , NodeService , NodeName , NodeKindOfNode , NULLSTRING ) {
+ CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , NodeService , NodeName , NodeKindOfNode , NULLSTRING , SUPERV::ListOfStrings() , isCimpl ) {
// MESSAGE( NodeName << " " );
beginService( "FNode_Impl::FNode_Impl" );
// cout << "FNode_Impl::FNode_Impl -->" << endl ;
CORBA::ORB_ptr _Orb ;
PortableServer::POA_ptr _Poa ;
PortableServer::ObjectId * _ContId ;
+ bool _isCimpl;
public:
FNode_Impl();
const char * NodeComponentName ,
const char * NodeInterfaceName ,
const char * NodeName = NULLSTRING ,
- const SUPERV::KindOfNode NodeKindOfNode = SUPERV::FactoryNode ) ;
+ const SUPERV::KindOfNode NodeKindOfNode = SUPERV::FactoryNode ,
+ bool isCimpl = true ) ; // mkr : PAL11273 : C++ implementation by default
FNode_Impl( CORBA::ORB_ptr orb ,
PortableServer::POA_ptr poa ,
PortableServer::ObjectId * contId ,
virtual GraphBase::FactoryNode * BaseNode() {
return DataFlowNode()->FactoryNode() ; } ;
+ virtual bool IsCimpl() { return _isCimpl; } ; // mkr : PAL11273
+
} ;
#endif
SUPERV::FNode_ptr Graph_Impl::FNode( const char * NodeComponentName ,
const char * NodeInterfaceName ,
- const SALOME_ModuleCatalog::Service &NodeService ) {
+ const SALOME_ModuleCatalog::Service &NodeService ,
+ bool isCimpl ) {
beginService( "Graph_Impl::FNode" );
SUPERV::FNode_var iobject = SUPERV::FNode::_nil() ;
if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
DataFlowEditor() ,
NodeService ,
NodeComponentName ,
- NodeInterfaceName ) ;
+ NodeInterfaceName ,
+ NULLSTRING ,
+ SUPERV::FactoryNode ,
+ isCimpl ) ;
if ( myNode->DataFlowNode() ) {
PortableServer::ObjectId * id = myNode->getId() ;
CORBA::Object_var obj = _poa->id_to_reference(*id);
SUPERV::FNode_var aNode = (aGraphNodes->FNodes)[ i ] ;
SUPERV::FNode_ptr myNode = FNode( aNode->GetComponentName() ,
aNode->GetInterfaceName() ,
- *(aNode->Service()) ) ;
+ *(aNode->Service()) ,
+ aNode->IsCimpl() ) ; // mkr : PAL11273
if ( !CORBA::is_nil( myNode ) ) {
myNode->SetName( aNode->Name() ) ;
myNode->SetAuthor( aNode->Author() ) ;
virtual SUPERV::FNode_ptr FNode(
const char * NodeComponentName ,
const char * InterfaceName ,
- const SALOME_ModuleCatalog::Service &NodeService ) ;
+ const SALOME_ModuleCatalog::Service &NodeService ,
+ bool isCimpl ) ; // mkr : PAL11273 : C++ implementation by default
virtual SUPERV::INode_ptr INode(
const char * FuncName ,
const SUPERV::ListOfStrings & PythonFunction ) ;
// << anInPort->PortName() << ")" << " ignored" ) ;
}
else {
- RetVal = _DataFlowNode->IsLinked( _DataFlowPort->PortName() ) ;
+ RetVal = _DataFlowNode->IsLinked( _DataFlowPort->PortName(), IsInput() ) ; // mkr : PAL8060
}
}
// endService( "Port_Impl::IsLinked" ) ;