Version: 9.16.0
Session_NS_wrapper.hxx
Go to the documentation of this file.
1// Copyright (C) 2021-2026 CEA, EDF, OPEN CASCADE
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#pragma once
21
22#include "SALOME_NamingService.hxx"
23#include "SALOME_Session.hxx"
24
25#include "omniORB4/CORBA.h"
26
27class QMutex;
28class QWaitCondition;
29
30class Abstract_Engines_Container_i;
31
33{
34public:
35 using RealNS = SALOME_NamingService;
36public:
37 OldStyleNS(CORBA::ORB_ptr orb):_NS(orb) {}
38 void Register(CORBA::Object_ptr ObjRef, const char* Path) { _NS.Register(ObjRef,Path); }
39 CORBA::Object_ptr Resolve(const char* Path) { return _NS.Resolve(Path); }
40 RealNS *getNS() { return &_NS; }
41 Abstract_Engines_Container_i *activateContainer(CORBA::ORB_var orb, PortableServer::POA_var poa, int argc, char** argv);
42 static void defineDefaultSALOMEKERNELNamingService() { /* nothing to do by default true NamingService server is considered */ }
43 static void activateContainerManager(CORBA::ORB_var orb);
44 static void activateSession(CORBA::ORB_var orb, PortableServer::POA_var poa, QMutex *GUIMutex, QWaitCondition *GUILauncher, int argc, char ** argv);
45 static void activateSALOMEDS(CORBA::ORB_var orb, PortableServer::POA_var poa);
46 static CORBA::Object_var forServerChecker(const char *NSName, int argc, char **argv);
47 static CosNaming::NamingContext_var checkTrueNamingServiceIfExpected(int argc, char **argv, bool& forceOK);
48 static const char LibName[];
49private:
51};
52
53#include "SALOME_Fake_NamingService.hxx"
54
56{
57public:
58 using RealNS = SALOME_Fake_NamingService;
59public:
60 NewStyleNS(CORBA::ORB_ptr orb):_NS(orb) {}
61 void Register(CORBA::Object_ptr ObjRef, const char* Path) { _NS.Register(ObjRef,Path); }
62 CORBA::Object_ptr Resolve(const char* Path) { return _NS.Resolve(Path); }
63 RealNS *getNS() { return &_NS; }
64 Abstract_Engines_Container_i *activateContainer(CORBA::ORB_var orb, PortableServer::POA_var poa, int argc, char** argv);
65 static void defineDefaultSALOMEKERNELNamingService();
66 static void activateContainerManager(CORBA::ORB_var orb);
67 static void activateSession(CORBA::ORB_var orb, PortableServer::POA_var poa, QMutex *GUIMutex, QWaitCondition *GUILauncher, int argc, char ** argv);
68 static void activateSALOMEDS(CORBA::ORB_var orb, PortableServer::POA_var poa);
69 static CORBA::Object_var forServerChecker(const char *NSName, int argc, char **argv);
70 static CosNaming::NamingContext_var checkTrueNamingServiceIfExpected(int argc, char **argv, bool& forceOK);
71 static const char LibName[];
72private:
74};
#define SESSION_EXPORT
Definition: SALOME_Session.hxx:37
Definition: Session_NS_wrapper.hxx:56
SALOME_Fake_NamingService RealNS
Definition: Session_NS_wrapper.hxx:58
RealNS _NS
Definition: Session_NS_wrapper.hxx:73
NewStyleNS(CORBA::ORB_ptr orb)
Definition: Session_NS_wrapper.hxx:60
RealNS * getNS()
Definition: Session_NS_wrapper.hxx:63
CORBA::Object_ptr Resolve(const char *Path)
Definition: Session_NS_wrapper.hxx:62
void Register(CORBA::Object_ptr ObjRef, const char *Path)
Definition: Session_NS_wrapper.hxx:61
Definition: Session_NS_wrapper.hxx:33
SALOME_NamingService RealNS
Definition: Session_NS_wrapper.hxx:35
RealNS _NS
Definition: Session_NS_wrapper.hxx:50
RealNS * getNS()
Definition: Session_NS_wrapper.hxx:40
void Register(CORBA::Object_ptr ObjRef, const char *Path)
Definition: Session_NS_wrapper.hxx:38
static void defineDefaultSALOMEKERNELNamingService()
Definition: Session_NS_wrapper.hxx:42
CORBA::Object_ptr Resolve(const char *Path)
Definition: Session_NS_wrapper.hxx:39
OldStyleNS(CORBA::ORB_ptr orb)
Definition: Session_NS_wrapper.hxx:37