]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 18 Feb 2021 15:29:40 +0000 (16:29 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 18 Feb 2021 15:29:40 +0000 (16:29 +0100)
src/NamingService/CMakeLists.txt
src/NamingService/NamingService_WaitForServerReadiness.cxx
src/NamingService/NamingService_WaitForServerReadiness.hxx
src/NamingService/SALOME_Fake_NamingService.cxx [new file with mode: 0644]
src/NamingService/SALOME_Fake_NamingService.hxx [new file with mode: 0644]

index 797ddeb858df86202987993abdeebe600c9047cf..82f0ce4f0d013362cc73161b2a5cb59272e7820c 100644 (file)
@@ -31,6 +31,7 @@ SET(SalomeNS_SOURCES
   SALOME_NamingService.cxx
   ServiceUnreachable.cxx
   NamingService_WaitForServerReadiness.cxx
+  SALOME_Fake_NamingService.cxx
 )
 
 
index 42d5a10a61361d13f0a5d7bae472dcf707cc34fb..ea44d4ff4283064ddf944c5c6e4080cacf9d317d 100644 (file)
@@ -26,6 +26,8 @@
 //  $Header$
 //
 #include "NamingService_WaitForServerReadiness.hxx"
+#include "SALOME_NamingService.hxx"
+
 #include "utilities.h"
 #include <iostream>
 #include <ctime>
@@ -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)
+{
+}
index 5ed45f055eadcd29015243befe563db49fac9166..9e0fd7308197e7c5f41a6304234cf1d3730dfe9d 100644 (file)
 #ifndef _NAMINGSERVICE_WAITFORSERVERREADINESS_HXX_
 #define _NAMINGSERVICE_WAITFORSERVERREADINESS_HXX_
 
-#include "SALOME_NamingService.hxx"
+#include "SALOME_NamingService_defs.hxx"
 
 #include <string>
 
-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 (file)
index 0000000..83ed320
--- /dev/null
@@ -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 (file)
index 0000000..ea80395
--- /dev/null
@@ -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);
+};