From: Anthony Geay Date: Thu, 18 Feb 2021 15:29:40 +0000 (+0100) Subject: WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f171999bb3d3aa8d826df6ae3eeb4e1ba8069ad2;p=modules%2Fkernel.git WIP --- diff --git a/src/NamingService/CMakeLists.txt b/src/NamingService/CMakeLists.txt index 797ddeb85..82f0ce4f0 100644 --- a/src/NamingService/CMakeLists.txt +++ b/src/NamingService/CMakeLists.txt @@ -31,6 +31,7 @@ SET(SalomeNS_SOURCES SALOME_NamingService.cxx ServiceUnreachable.cxx NamingService_WaitForServerReadiness.cxx + SALOME_Fake_NamingService.cxx ) diff --git a/src/NamingService/NamingService_WaitForServerReadiness.cxx b/src/NamingService/NamingService_WaitForServerReadiness.cxx index 42d5a10a6..ea44d4ff4 100644 --- a/src/NamingService/NamingService_WaitForServerReadiness.cxx +++ b/src/NamingService/NamingService_WaitForServerReadiness.cxx @@ -26,6 +26,8 @@ // $Header$ // #include "NamingService_WaitForServerReadiness.hxx" +#include "SALOME_NamingService.hxx" + #include "utilities.h" #include #include @@ -101,3 +103,10 @@ void NamingService_WaitForServerReadiness(SALOME_NamingService* NS, exit(EXIT_FAILURE); } } + +/*! + * Fake NS : no need to wait ;) + */ +void NamingService_WaitForServerReadiness(SALOME_Fake_NamingService* NS, std::string serverName) +{ +} diff --git a/src/NamingService/NamingService_WaitForServerReadiness.hxx b/src/NamingService/NamingService_WaitForServerReadiness.hxx index 5ed45f055..9e0fd7308 100644 --- a/src/NamingService/NamingService_WaitForServerReadiness.hxx +++ b/src/NamingService/NamingService_WaitForServerReadiness.hxx @@ -28,11 +28,16 @@ #ifndef _NAMINGSERVICE_WAITFORSERVERREADINESS_HXX_ #define _NAMINGSERVICE_WAITFORSERVERREADINESS_HXX_ -#include "SALOME_NamingService.hxx" +#include "SALOME_NamingService_defs.hxx" #include -void NAMINGSERVICE_EXPORT NamingService_WaitForServerReadiness(SALOME_NamingService* NS, - std::string serverName); +class SALOME_NamingService; + +void NAMINGSERVICE_EXPORT NamingService_WaitForServerReadiness(SALOME_NamingService* NS, std::string serverName); + +class SALOME_Fake_NamingService; + +void NAMINGSERVICE_EXPORT NamingService_WaitForServerReadiness(SALOME_Fake_NamingService* NS, std::string serverName); #endif diff --git a/src/NamingService/SALOME_Fake_NamingService.cxx b/src/NamingService/SALOME_Fake_NamingService.cxx new file mode 100644 index 000000000..83ed3206c --- /dev/null +++ b/src/NamingService/SALOME_Fake_NamingService.cxx @@ -0,0 +1,32 @@ +// Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "SALOME_Fake_NamingService.hxx" + +SALOME_Fake_NamingService::SALOME_Fake_NamingService(CORBA::ORB_ptr orb) +{ +} + +void SALOME_Fake_NamingService::Register(CORBA::Object_ptr ObjRef, const char* Path) +{ +} + +CORBA::Object_ptr SALOME_Fake_NamingService::Resolve(const char* Path) +{ +} diff --git a/src/NamingService/SALOME_Fake_NamingService.hxx b/src/NamingService/SALOME_Fake_NamingService.hxx new file mode 100644 index 000000000..ea80395fa --- /dev/null +++ b/src/NamingService/SALOME_Fake_NamingService.hxx @@ -0,0 +1,30 @@ +// Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#pragma once + +#include "omniORB4/CORBA.h" + +class SALOME_Fake_NamingService +{ +public: + SALOME_Fake_NamingService(CORBA::ORB_ptr orb); + void Register(CORBA::Object_ptr ObjRef, const char* Path); + CORBA::Object_ptr Resolve(const char* Path); +};