From: Anthony Geay Date: Fri, 30 Jul 2021 09:04:33 +0000 (+0200) Subject: Avoid dynamic_cast to detect SSL mode or not X-Git-Tag: V9_8_0a1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef6e9ece004bd054b6cb474bdb9b898ff93417eb;p=modules%2Fkernel.git Avoid dynamic_cast to detect SSL mode or not --- diff --git a/src/NamingService/SALOME_Embedded_NamingService_Client.hxx b/src/NamingService/SALOME_Embedded_NamingService_Client.hxx index e493e13f3..7f3fc708a 100644 --- a/src/NamingService/SALOME_Embedded_NamingService_Client.hxx +++ b/src/NamingService/SALOME_Embedded_NamingService_Client.hxx @@ -30,6 +30,7 @@ class NAMINGSERVICE_EXPORT SALOME_Embedded_NamingService_Client : public SALOME_ public: SALOME_Embedded_NamingService_Client(Engines::EmbeddedNamingService_var remoteNSServ):_remote_ns_serv(remoteNSServ) { } void init_orb(CORBA::ORB_ptr orb=0) override; + bool IsTrueNS() const override { return false; } SALOME_NamingService_Container_Abstract *clone() override; void Register(CORBA::Object_ptr ObjRef, const char* Path) override; void Destroy_FullDirectory(const char* Path) override; diff --git a/src/NamingService/SALOME_Fake_NamingService.hxx b/src/NamingService/SALOME_Fake_NamingService.hxx index 509c3181f..295433cfa 100644 --- a/src/NamingService/SALOME_Fake_NamingService.hxx +++ b/src/NamingService/SALOME_Fake_NamingService.hxx @@ -36,6 +36,7 @@ public: static void SetLogContainersFile(const std::string& logFileName); static std::string GetLogContainersFile(); static void FlushLogContainersFile(); + bool IsTrueNS() const override { return false; } std::vector< std::string > repr() override; void init_orb(CORBA::ORB_ptr orb=0) override; void Register(CORBA::Object_ptr ObjRef, const char* Path) override; diff --git a/src/NamingService/SALOME_NamingService.hxx b/src/NamingService/SALOME_NamingService.hxx index ec19bb7b7..b70e0579f 100644 --- a/src/NamingService/SALOME_NamingService.hxx +++ b/src/NamingService/SALOME_NamingService.hxx @@ -51,6 +51,7 @@ public: SALOME_NamingService(CORBA::ORB_ptr orb); virtual ~SALOME_NamingService(); + bool IsTrueNS() const override { return true; } std::vector< std::string > repr() override; void init_orb(CORBA::ORB_ptr orb=0) override; void Register(CORBA::Object_ptr ObjRef, const char* Path) override; diff --git a/src/NamingService/SALOME_NamingService_Abstract.hxx b/src/NamingService/SALOME_NamingService_Abstract.hxx index fdd6ae0d4..b77a15e6b 100644 --- a/src/NamingService/SALOME_NamingService_Abstract.hxx +++ b/src/NamingService/SALOME_NamingService_Abstract.hxx @@ -38,6 +38,7 @@ public: virtual void Destroy_Name(const char* Path) = 0; virtual CORBA::Object_ptr Resolve(const char* Path) = 0; virtual CORBA::Object_ptr ResolveFirst(const char* Path) = 0; + virtual bool IsTrueNS() const = 0; static constexpr char SEP = '/'; };