From 12aed9bce9883a0fc8db8a3f0afdb9c8fe286ed8 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Tue, 16 Aug 2022 10:43:38 +0200 Subject: [PATCH 1/1] Fast SSL porting for testbase --- src/AddComponent/AddComponent_Impl.cxx | 17 +++++-- src/AddComponent/AddComponent_Impl.hxx | 22 +++++++- .../DataStreamComponent_Impl.cxx | 17 +++++-- .../DataStreamComponent_Impl.hxx | 22 +++++++- src/DivComponent/DivComponent.cxx | 17 +++++-- src/DivComponent/DivComponent.hxx | 20 +++++++- src/MulComponent/MulComponent.cxx | 17 +++++-- src/MulComponent/MulComponent.hxx | 22 +++++++- src/SIGNALSComponent/SIGNALSComponent.cxx | 17 +++++-- src/SIGNALSComponent/SIGNALSComponent.hxx | 22 +++++++- .../SIGNALSComponent_Impl.cxx | 17 +++++-- .../SIGNALSComponent_Impl.hxx | 22 +++++++- src/SubComponent/SubComponent.cxx | 17 +++++-- src/SubComponent/SubComponent.hxx | 22 +++++++- src/SyrComponent/SyrComponent_Impl.cxx | 34 ++++++++++--- src/SyrComponent/SyrComponent_Impl.hxx | 50 ++++++++++++++++++- src/TypesCheck/TypesCheck_Impl.cxx | 17 +++++-- src/TypesCheck/TypesCheck_Impl.hxx | 22 +++++++- .../UndefinedSymbolComponent.cxx | 17 +++++-- .../UndefinedSymbolComponent.hxx | 20 +++++++- 20 files changed, 376 insertions(+), 55 deletions(-) diff --git a/src/AddComponent/AddComponent_Impl.cxx b/src/AddComponent/AddComponent_Impl.cxx index a3cea5b..b97ce50 100644 --- a/src/AddComponent/AddComponent_Impl.cxx +++ b/src/AddComponent/AddComponent_Impl.cxx @@ -50,8 +50,8 @@ AddComponent_Impl::AddComponent_Impl( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { + const char *interfaceName, bool withRegistry) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { MESSAGE("AddComponent_Impl::AddComponent_Impl this " << hex << this << dec << "activate object instanceName(" << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -277,8 +277,17 @@ extern "C" MESSAGE("AddComponentEngine_factory AddComponentEngine (" << instanceName << "," << interfaceName << "," << _getpid() << ")"); #endif - AddComponent_Impl * myAddComponent - = new AddComponent_Impl(orb, poa, contId, instanceName, interfaceName); + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + AddComponent_Impl * myAddComponent = nullptr; + if(cont->is_SSL_mode()) + { + myAddComponent = new AddComponent_Impl_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + myAddComponent = new AddComponent_Impl_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return myAddComponent->getId() ; } } diff --git a/src/AddComponent/AddComponent_Impl.hxx b/src/AddComponent/AddComponent_Impl.hxx index 163aff1..94e5481 100644 --- a/src/AddComponent/AddComponent_Impl.hxx +++ b/src/AddComponent/AddComponent_Impl.hxx @@ -44,7 +44,7 @@ public: PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); + const char *interfaceName, bool withRegistry); virtual ~AddComponent_Impl(); @@ -83,6 +83,26 @@ private: }; +class ADDCOMPONENTENGINE_EXPORT AddComponent_Impl_SSL : public AddComponent_Impl +{ +public: + AddComponent_Impl_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):AddComponent_Impl(orb,poa,contId,instanceName,interfaceName,false) { } +}; + +class ADDCOMPONENTENGINE_EXPORT AddComponent_Impl_No_SSL : public AddComponent_Impl +{ +public: + AddComponent_Impl_No_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):AddComponent_Impl(orb,poa,contId,instanceName,interfaceName,true) { } +}; + extern "C" ADDCOMPONENTENGINE_EXPORT PortableServer::ObjectId * AddComponentEngine_factory diff --git a/src/DataStreamComponent/DataStreamComponent_Impl.cxx b/src/DataStreamComponent/DataStreamComponent_Impl.cxx index 74917f2..0f13d9b 100644 --- a/src/DataStreamComponent/DataStreamComponent_Impl.cxx +++ b/src/DataStreamComponent/DataStreamComponent_Impl.cxx @@ -44,8 +44,8 @@ DataStreamFactory_Impl::DataStreamFactory_Impl( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { + const char *interfaceName, bool withRegistry) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { MESSAGE("DataStreamFactory_Impl::DataStreamFactory_Impl this " << hex << this << dec << "activate object instanceName(" << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -122,8 +122,17 @@ extern "C" MESSAGE("DataStreamFactoryEngine_factory DataStreamFactoryEngine (" << instanceName << "," << interfaceName << "," << _getpid() << ")"); #endif - DataStreamFactory_Impl * myDataStreamFactory - = new DataStreamFactory_Impl(orb, poa, contId, instanceName, interfaceName); + DataStreamFactory_Impl * myDataStreamFactory = nullptr; + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + myDataStreamFactory = new DataStreamFactory_Impl_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + myDataStreamFactory = new DataStreamFactory_Impl_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return myDataStreamFactory->getId() ; } } diff --git a/src/DataStreamComponent/DataStreamComponent_Impl.hxx b/src/DataStreamComponent/DataStreamComponent_Impl.hxx index b269a42..d5e4403 100644 --- a/src/DataStreamComponent/DataStreamComponent_Impl.hxx +++ b/src/DataStreamComponent/DataStreamComponent_Impl.hxx @@ -52,7 +52,7 @@ public: PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); + const char *interfaceName, bool withRegistry); virtual ~DataStreamFactory_Impl(); @@ -76,6 +76,26 @@ private: }; +class DATASTREAMFACTORYENGINE_EXPORT DataStreamFactory_Impl_SSL : public DataStreamFactory_Impl +{ +public: + DataStreamFactory_Impl_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):DataStreamFactory_Impl(orb,poa,contId,instanceName,interfaceName,false) { } +}; + +class DATASTREAMFACTORYENGINE_EXPORT DataStreamFactory_Impl_No_SSL : public DataStreamFactory_Impl +{ +public: + DataStreamFactory_Impl_No_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):DataStreamFactory_Impl(orb,poa,contId,instanceName,interfaceName,true) { } +}; + extern "C" DATASTREAMFACTORYENGINE_EXPORT PortableServer::ObjectId * DataStreamFactoryEngine_factory diff --git a/src/DivComponent/DivComponent.cxx b/src/DivComponent/DivComponent.cxx index e9115de..e990575 100644 --- a/src/DivComponent/DivComponent.cxx +++ b/src/DivComponent/DivComponent.cxx @@ -43,8 +43,8 @@ DivComponentEngine::DivComponentEngine( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) + const char *interfaceName, bool withRegistry) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { // MESSAGE("DivComponentEngine::DivComponentEngine activate object instanceName(" // << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -102,8 +102,17 @@ extern "C" { MESSAGE("DivComponentEngine_factory DivComponentEngine (" << instanceName << "," << interfaceName << ")"); - DivComponentEngine * myDivComponent - = new DivComponentEngine(orb, poa, contId, instanceName, interfaceName); + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + DivComponentEngine * myDivComponent = nullptr; + if(cont->is_SSL_mode()) + { + myDivComponent = new DivComponentEngine_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + myDivComponent = new DivComponentEngine_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return myDivComponent->getId() ; } } diff --git a/src/DivComponent/DivComponent.hxx b/src/DivComponent/DivComponent.hxx index 70f6929..2e272be 100644 --- a/src/DivComponent/DivComponent.hxx +++ b/src/DivComponent/DivComponent.hxx @@ -53,7 +53,7 @@ public: PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); + const char *interfaceName, bool withRegistry); virtual ~DivComponentEngine(); @@ -67,6 +67,24 @@ private: }; +class DIVCOMPONENTENGINE_EXPORT DivComponentEngine_SSL : public DivComponentEngine +{ +public: + DivComponentEngine_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, const char *interfaceName):DivComponentEngine(orb,poa,contId,instanceName,interfaceName,false) { } +}; + +class DIVCOMPONENTENGINE_EXPORT DivComponentEngine_No_SSL : public DivComponentEngine +{ +public: + DivComponentEngine_No_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, const char *interfaceName):DivComponentEngine(orb,poa,contId,instanceName,interfaceName,true) { } +}; + extern "C" DIVCOMPONENTENGINE_EXPORT PortableServer::ObjectId * DivComponentEngine_factory diff --git a/src/MulComponent/MulComponent.cxx b/src/MulComponent/MulComponent.cxx index 5d06da0..7a77e16 100644 --- a/src/MulComponent/MulComponent.cxx +++ b/src/MulComponent/MulComponent.cxx @@ -43,8 +43,8 @@ MulComponentEngine::MulComponentEngine( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) + const char *interfaceName, bool withRegistry) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { // MESSAGE("MulComponentEngine::MulComponentEngine activate object instanceName(" // << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -101,8 +101,17 @@ extern "C" { MESSAGE("MulComponentEngine_factory MulComponentEngine (" << instanceName << "," << interfaceName << ")"); - MulComponentEngine * myMulComponent - = new MulComponentEngine(orb, poa, contId, instanceName, interfaceName); + MulComponentEngine * myMulComponent = nullptr; + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + myMulComponent = new MulComponentEngine_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + myMulComponent = new MulComponentEngine_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return myMulComponent->getId() ; } } diff --git a/src/MulComponent/MulComponent.hxx b/src/MulComponent/MulComponent.hxx index 2280b07..bb65718 100644 --- a/src/MulComponent/MulComponent.hxx +++ b/src/MulComponent/MulComponent.hxx @@ -53,7 +53,7 @@ public: PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); + const char *interfaceName, bool withRegistry); virtual ~MulComponentEngine(); @@ -67,6 +67,26 @@ private: }; +class MULCOMPONENTENGINE_EXPORT MulComponentEngine_SSL : public MulComponentEngine +{ +public: + MulComponentEngine_SSL(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):MulComponentEngine(orb,poa,contId,instanceName,interfaceName,false) { } +}; + +class MULCOMPONENTENGINE_EXPORT MulComponentEngine_No_SSL : public MulComponentEngine +{ +public: + MulComponentEngine_No_SSL(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):MulComponentEngine(orb,poa,contId,instanceName,interfaceName,true) { } +}; + extern "C" MULCOMPONENTENGINE_EXPORT PortableServer::ObjectId * MulComponentEngine_factory diff --git a/src/SIGNALSComponent/SIGNALSComponent.cxx b/src/SIGNALSComponent/SIGNALSComponent.cxx index 2f07619..a0a17b0 100644 --- a/src/SIGNALSComponent/SIGNALSComponent.cxx +++ b/src/SIGNALSComponent/SIGNALSComponent.cxx @@ -42,8 +42,8 @@ SIGNALSComponentEngine::SIGNALSComponentEngine( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) + const char *interfaceName, bool withRegistry) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { MESSAGE("SIGNALSComponentEngine::SIGNALSComponentEngine activate object instanceName(" << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -95,8 +95,17 @@ extern "C" { MESSAGE("SIGNALSComponentEngine_factory SIGNALSComponentEngine (" << instanceName << "," << interfaceName << ")"); - SIGNALSComponentEngine * mySIGNALSComponent - = new SIGNALSComponentEngine(orb, poa, contId, instanceName, interfaceName); + SIGNALSComponentEngine * mySIGNALSComponent = nullptr; + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + mySIGNALSComponent = new SIGNALSComponentEngine_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + mySIGNALSComponent = new SIGNALSComponentEngine_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return mySIGNALSComponent->getId() ; } } diff --git a/src/SIGNALSComponent/SIGNALSComponent.hxx b/src/SIGNALSComponent/SIGNALSComponent.hxx index 0ea32e1..4edf481 100644 --- a/src/SIGNALSComponent/SIGNALSComponent.hxx +++ b/src/SIGNALSComponent/SIGNALSComponent.hxx @@ -43,7 +43,7 @@ public: PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); + const char *interfaceName, bool withRegistry); virtual ~SIGNALSComponentEngine(); @@ -56,6 +56,26 @@ private: }; +class SIGNALSCOMPONENTENGINE_EXPORT SIGNALSComponentEngine_SSL : public SIGNALSComponentEngine +{ +public: + SIGNALSComponentEngine_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):SIGNALSComponentEngine(orb,poa,contId,instanceName,interfaceName,false) { } +}; + +class SIGNALSCOMPONENTENGINE_EXPORT SIGNALSComponentEngine_No_SSL : public SIGNALSComponentEngine +{ +public: + SIGNALSComponentEngine_No_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):SIGNALSComponentEngine(orb,poa,contId,instanceName,interfaceName,true) { } +}; + extern "C" SIGNALSCOMPONENTENGINE_EXPORT PortableServer::ObjectId * SIGNALSComponentEngine_factory diff --git a/src/SIGNALSComponent/SIGNALSComponent_Impl.cxx b/src/SIGNALSComponent/SIGNALSComponent_Impl.cxx index 1559a09..e21402a 100644 --- a/src/SIGNALSComponent/SIGNALSComponent_Impl.cxx +++ b/src/SIGNALSComponent/SIGNALSComponent_Impl.cxx @@ -43,8 +43,8 @@ SIGNALSComponent_Impl::SIGNALSComponent_Impl( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) + const char *interfaceName, bool withRegistry) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { MESSAGE("SIGNALSComponent_Impl::SIGNALSComponent_Impl activate object instanceName(" << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -151,8 +151,17 @@ extern "C" { MESSAGE("SIGNALSComponentEngine_factory SIGNALSComponent_Impl(" << instanceName << "," << interfaceName << ")"); - SIGNALSComponent_Impl * mySIGNALSComponent - = new SIGNALSComponent_Impl(orb, poa, contId, instanceName, interfaceName); + SIGNALSComponent_Impl * mySIGNALSComponent = nullptr; + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + mySIGNALSComponent = new SIGNALSComponentEngine_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + mySIGNALSComponent = new SIGNALSComponentEngine_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return mySIGNALSComponent->getId() ; } } diff --git a/src/SIGNALSComponent/SIGNALSComponent_Impl.hxx b/src/SIGNALSComponent/SIGNALSComponent_Impl.hxx index 2037632..f9dc41d 100644 --- a/src/SIGNALSComponent/SIGNALSComponent_Impl.hxx +++ b/src/SIGNALSComponent/SIGNALSComponent_Impl.hxx @@ -43,7 +43,7 @@ public: PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); + const char *interfaceName, bool withRegistry); virtual ~SIGNALSComponent_Impl(); @@ -60,6 +60,26 @@ private: }; +class SIGNALSCOMPONENTENGINE_EXPORT SIGNALSComponentEngine_SSL : public SIGNALSComponent_Impl +{ +public: + SIGNALSComponentEngine_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):SIGNALSComponent_Impl(orb,poa,contId,instanceName,interfaceName,false) { } +}; + +class SIGNALSCOMPONENTENGINE_EXPORT SIGNALSComponentEngine_No_SSL : public SIGNALSComponent_Impl +{ +public: + SIGNALSComponentEngine_No_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):SIGNALSComponent_Impl(orb,poa,contId,instanceName,interfaceName,true) { } +}; + extern "C" SIGNALSCOMPONENTENGINE_EXPORT PortableServer::ObjectId * SIGNALSComponentEngine_factory diff --git a/src/SubComponent/SubComponent.cxx b/src/SubComponent/SubComponent.cxx index 838fe98..bd25258 100644 --- a/src/SubComponent/SubComponent.cxx +++ b/src/SubComponent/SubComponent.cxx @@ -42,8 +42,8 @@ SubComponentEngine::SubComponentEngine( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) + const char *interfaceName, bool withRegistry) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { // MESSAGE("SubComponentEngine::SubComponentEngine activate object instanceName(" // << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -100,8 +100,17 @@ extern "C" { MESSAGE("SubComponentEngine_factory SubComponentEngine (" << instanceName << "," << interfaceName << ")"); - SubComponentEngine * mySubComponent - = new SubComponentEngine(orb, poa, contId, instanceName, interfaceName); + SubComponentEngine * mySubComponent = nullptr; + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + mySubComponent = new SubComponentEngine_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + mySubComponent = new SubComponentEngine_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return mySubComponent->getId() ; } } diff --git a/src/SubComponent/SubComponent.hxx b/src/SubComponent/SubComponent.hxx index ff090c4..1553df3 100644 --- a/src/SubComponent/SubComponent.hxx +++ b/src/SubComponent/SubComponent.hxx @@ -52,7 +52,7 @@ public: PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); + const char *interfaceName, bool withRegistry); virtual ~SubComponentEngine(); @@ -66,6 +66,26 @@ private: }; +class SUBCOMPONENTENGINE_EXPORT SubComponentEngine_SSL : public SubComponentEngine +{ +public: + SubComponentEngine_SSL(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):SubComponentEngine(orb,poa,contId,instanceName,interfaceName,false) { } +}; + +class SUBCOMPONENTENGINE_EXPORT SubComponentEngine_No_SSL : public SubComponentEngine +{ +public: + SubComponentEngine_No_SSL(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):SubComponentEngine(orb,poa,contId,instanceName,interfaceName,true) { } +}; + extern "C" SUBCOMPONENTENGINE_EXPORT PortableServer::ObjectId * SubComponentEngine_factory diff --git a/src/SyrComponent/SyrComponent_Impl.cxx b/src/SyrComponent/SyrComponent_Impl.cxx index e2952bf..65a937a 100644 --- a/src/SyrComponent/SyrComponent_Impl.cxx +++ b/src/SyrComponent/SyrComponent_Impl.cxx @@ -46,8 +46,8 @@ SyrComponent_Impl::SyrComponent_Impl( CORBA::ORB_ptr orb , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const bool kactivate ) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { + const bool kactivate , bool withRegistry ) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true/*notif is true here for message*/,withRegistry) { MESSAGE("SyrComponent_Impl::SyrComponent_Impl this " << hex << this << dec << "activate object instanceName(" << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -331,10 +331,19 @@ SuperVisionTest::Syr_ptr SyrComponent_Impl::Init( CORBA::Long anOddInteger ) { #else Sleep(S*1000); #endif - Syr_Impl * mySyr ; - mySyr = new Syr_Impl( _orb , _poa, _contId, + Syr_Impl * mySyr = nullptr; + if ( this->isSSLMode() ) + { + mySyr = new Syr_Impl_SSL( _orb , _poa, _contId, + instanceName() , interfaceName() , + graphName() , nodeName() , anOddInteger ) ; + } + else + { + mySyr = new Syr_Impl_No_SSL( _orb , _poa, _contId, instanceName() , interfaceName() , graphName() , nodeName() , anOddInteger ) ; + } SuperVisionTest::Syr_var iobject = (SuperVisionTest::Syr_var ) NULL ; PortableServer::ObjectId * id = mySyr->getId() ; CORBA::Object_var obj = _poa->id_to_reference(*id); @@ -405,8 +414,17 @@ extern "C" MESSAGE("SyrComponentEngine_factory SyrComponentEngine (" << instanceName << "," << interfaceName << "," << _getpid() << ")"); #endif - SyrComponent_Impl * mySyrComponent - = new SyrComponent_Impl(orb, poa, contId, instanceName, interfaceName); + SyrComponent_Impl * mySyrComponent = nullptr; + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + mySyrComponent = new SyrComponent_Impl_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + mySyrComponent = new SyrComponent_Impl_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return mySyrComponent->getId() ; } } @@ -418,8 +436,8 @@ Syr_Impl::Syr_Impl( CORBA::ORB_ptr orb , const char * interfaceName , const char * graphName , const char * nodeName , - const CORBA::Long anOddInteger ) : - SyrComponent_Impl(orb, poa, contId, instanceName, interfaceName,false) { + const CORBA::Long anOddInteger, bool withRegistry) : + SyrComponent_Impl(orb, poa, contId, instanceName, interfaceName,false,withRegistry) { Names( graphName , nodeName ) ; MESSAGE("Syr_Impl::Syr_Impl activate object instanceName(" << instanceName << ") interfaceName(" << interfaceName << ") --> " diff --git a/src/SyrComponent/SyrComponent_Impl.hxx b/src/SyrComponent/SyrComponent_Impl.hxx index 8f8a0a6..31dd27c 100644 --- a/src/SyrComponent/SyrComponent_Impl.hxx +++ b/src/SyrComponent/SyrComponent_Impl.hxx @@ -54,7 +54,7 @@ public: PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const bool kactivate = true ) ; + const bool kactivate, bool withRegistry ) ; virtual ~SyrComponent_Impl(); @@ -95,6 +95,26 @@ private: long _Count ; }; +class SYRCOMPONENTENGINE_EXPORT SyrComponent_Impl_No_SSL : public SyrComponent_Impl +{ +public: + SyrComponent_Impl_No_SSL() { } + SyrComponent_Impl_No_SSL( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , const char *interfaceName , const bool kactivate = true ):SyrComponent_Impl(orb,poa,contId,instanceName,interfaceName,kactivate,true) { } +}; + +class SYRCOMPONENTENGINE_EXPORT SyrComponent_Impl_SSL : public SyrComponent_Impl +{ +public: + SyrComponent_Impl_SSL() { } + SyrComponent_Impl_SSL( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , const char *interfaceName , const bool kactivate = true ):SyrComponent_Impl(orb,poa,contId,instanceName,interfaceName,kactivate,false) { } +}; + class SYRCOMPONENTENGINE_EXPORT ListOfSyr_Impl : public POA_SuperVisionTest::ListOfSyr , public Engines_Component_i { public: @@ -139,7 +159,7 @@ public: const char *interfaceName , const char * graphName , const char * nodeName , - const CORBA::Long anOddInteger ); + const CORBA::Long anOddInteger, bool withRegistry); virtual ~Syr_Impl(); @@ -167,4 +187,30 @@ private: }; +class SYRCOMPONENTENGINE_EXPORT Syr_Impl_SSL : public Syr_Impl +{ +public: + Syr_Impl_SSL(CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + const char * graphName , + const char * nodeName , + const CORBA::Long anOddInteger) : Syr_Impl(orb,poa,contId,instanceName,interfaceName,graphName,nodeName,anOddInteger,false) { } +}; + +class SYRCOMPONENTENGINE_EXPORT Syr_Impl_No_SSL : public Syr_Impl +{ +public: + Syr_Impl_No_SSL(CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + const char * graphName , + const char * nodeName , + const CORBA::Long anOddInteger) : Syr_Impl(orb,poa,contId,instanceName,interfaceName,graphName,nodeName,anOddInteger,true) { } +}; + #endif diff --git a/src/TypesCheck/TypesCheck_Impl.cxx b/src/TypesCheck/TypesCheck_Impl.cxx index 28d4a15..3ffc7d2 100644 --- a/src/TypesCheck/TypesCheck_Impl.cxx +++ b/src/TypesCheck/TypesCheck_Impl.cxx @@ -45,8 +45,8 @@ TypesCheck_Impl::TypesCheck_Impl( CORBA::ORB_ptr orb , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const bool kactivate ) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { + const bool kactivate, bool withRegistry ) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { MESSAGE("TypesCheck_Impl::TypesCheck_Impl this " << hex << this << dec << "activate object instanceName(" << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -159,8 +159,17 @@ extern "C" MESSAGE("TypesCheckEngine_factory TypesCheckEngine (" << instanceName << "," << interfaceName << "," << _getpid()<< ")"); #endif - - TypesCheck_Impl * myTypesCheck = new TypesCheck_Impl(orb, poa, contId, instanceName, interfaceName); + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + TypesCheck_Impl * myTypesCheck = nullptr; + if(cont->is_SSL_mode()) + { + myTypesCheck = new TypesCheck_Impl_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + myTypesCheck = new TypesCheck_Impl_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return myTypesCheck->getId() ; } } diff --git a/src/TypesCheck/TypesCheck_Impl.hxx b/src/TypesCheck/TypesCheck_Impl.hxx index 295c6ec..b995426 100644 --- a/src/TypesCheck/TypesCheck_Impl.hxx +++ b/src/TypesCheck/TypesCheck_Impl.hxx @@ -56,7 +56,7 @@ class TYPESCHECKENGINE_EXPORT TypesCheck_Impl : public POA_SuperVisionTest::Type PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const bool kactivate = true ) ; + const bool kactivate, bool withRegistry ) ; virtual ~TypesCheck_Impl(); @@ -87,6 +87,26 @@ class TYPESCHECKENGINE_EXPORT TypesCheck_Impl : public POA_SuperVisionTest::Type }; +class TYPESCHECKENGINE_EXPORT TypesCheck_Impl_SSL : public TypesCheck_Impl { + public: + TypesCheck_Impl_SSL( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + const bool kactivate = true):TypesCheck_Impl(orb,poa,contId,instanceName,interfaceName,kactivate,false) { } +}; + +class TYPESCHECKENGINE_EXPORT TypesCheck_Impl_No_SSL : public TypesCheck_Impl { + public: + TypesCheck_Impl_No_SSL( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + const bool kactivate = true):TypesCheck_Impl(orb,poa,contId,instanceName,interfaceName,kactivate,true) { } +}; + extern "C" TYPESCHECKENGINE_EXPORT PortableServer::ObjectId * TypesCheckEngine_factory ( CORBA::ORB_ptr orb , diff --git a/src/UndefinedSymbolComponent/UndefinedSymbolComponent.cxx b/src/UndefinedSymbolComponent/UndefinedSymbolComponent.cxx index 33567f4..06fed2f 100644 --- a/src/UndefinedSymbolComponent/UndefinedSymbolComponent.cxx +++ b/src/UndefinedSymbolComponent/UndefinedSymbolComponent.cxx @@ -41,8 +41,8 @@ UndefinedSymbolComponentEngine::UndefinedSymbolComponentEngine( CORBA::ORB_ptr o PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) + const char *interfaceName, bool withRegistry) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,withRegistry) { // MESSAGE("UndefinedSymbolComponentEngine::UndefinedSymbolComponentEngine activate object instanceName(" // << instanceName << ") interfaceName(" << interfaceName << ")" ) @@ -92,8 +92,17 @@ extern "C" { MESSAGE("UndefinedSymbolComponentEngine_factory UndefinedSymbolComponentEngine (" << instanceName << "," << interfaceName << ")"); - UndefinedSymbolComponentEngine * myUndefinedSymbolComponent - = new UndefinedSymbolComponentEngine(orb, poa, contId, instanceName, interfaceName); + UndefinedSymbolComponentEngine * myUndefinedSymbolComponent = nullptr; + CORBA::Object_var o = poa->id_to_reference(*contId); + Engines::Container_var cont = Engines::Container::_narrow(o); + if(cont->is_SSL_mode()) + { + myUndefinedSymbolComponent = new UndefinedSymbolComponentEngine_SSL(orb, poa, contId, instanceName, interfaceName); + } + else + { + myUndefinedSymbolComponent = new UndefinedSymbolComponentEngine_No_SSL(orb, poa, contId, instanceName, interfaceName); + } return myUndefinedSymbolComponent->getId() ; } } diff --git a/src/UndefinedSymbolComponent/UndefinedSymbolComponent.hxx b/src/UndefinedSymbolComponent/UndefinedSymbolComponent.hxx index c8c8ee3..d3d71b4 100644 --- a/src/UndefinedSymbolComponent/UndefinedSymbolComponent.hxx +++ b/src/UndefinedSymbolComponent/UndefinedSymbolComponent.hxx @@ -43,7 +43,7 @@ public: PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, const char *instanceName, - const char *interfaceName); + const char *interfaceName, bool withRegistry); virtual ~UndefinedSymbolComponentEngine(); @@ -57,6 +57,24 @@ private: }; +class UndefinedSymbolComponentEngine_SSL : public UndefinedSymbolComponentEngine { +public: + UndefinedSymbolComponentEngine_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):UndefinedSymbolComponentEngine(orb,poa,contId,instanceName,interfaceName,false) { } +}; + +class UndefinedSymbolComponentEngine_No_SSL : public UndefinedSymbolComponentEngine { +public: + UndefinedSymbolComponentEngine_No_SSL( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName):UndefinedSymbolComponentEngine(orb,poa,contId,instanceName,interfaceName,true) { } +}; + extern "C" PortableServer::ObjectId * UndefinedSymbolComponentEngine_factory ( CORBA::ORB_ptr orb , -- 2.30.2