Version: 9.12.0
SALOME_NamingService_Abstract.hxx
Go to the documentation of this file.
1 // Copyright (C) 2021-2023 CEA, EDF
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 
23 
24 #include <SALOMEconfig.h>
25 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
26 #include CORBA_CLIENT_HEADER(SALOME_Component)
27 
28 #include <vector>
29 #include <string>
30 
32 {
33 public:
34  virtual void init_orb(CORBA::ORB_ptr orb=0) = 0;
36  virtual void Register(CORBA::Object_ptr ObjRef, const char* Path) = 0;
37  virtual void Destroy_FullDirectory(const char* Path) = 0;
38  virtual void Destroy_Name(const char* Path) = 0;
39  virtual CORBA::Object_ptr Resolve(const char* Path) = 0;
40  virtual CORBA::Object_ptr ResolveFirst(const char* Path) = 0;
41  virtual bool IsTrueNS() const = 0;
42  static constexpr char SEP = '/';
43 };
44 
46 {
47 public:
48  SALOME_NamingService_Abstract *cloneCoVar();
49  virtual std::vector< std::string > repr() = 0;
50  virtual void Destroy_Directory(const char* Path) = 0;
51  virtual bool Change_Directory(const char* Path) = 0;
52  virtual std::vector<std::string> list_subdirs() = 0;
53  virtual std::vector<std::string> list_directory() = 0;
54  virtual std::vector<std::string> list_directory_recurs() = 0;
55  virtual CORBA::Object_ptr ResolveComponent(const char* hostname, const char* containerName, const char* componentName, const int nbproc=0) = 0;
57  static std::string ContainerName(const Engines::ContainerParameters& params);
58  static std::string ContainerName(const char *ContainerName);
59  static std::string BuildContainerNameForNS(const char *ContainerName, const char *hostname);
60  static std::string BuildContainerNameForNS(const Engines::ContainerParameters& params, const char *hostname);
61  static std::string BuildComponentName(const char* hostname, const char* containerName, const char* componentName, const int nbproc);
62 };
63 
65 {
66 public:
68  void init_orb(CORBA::ORB_ptr orb=0) override { _ns_cont->init_orb(orb); }
70  void Register(CORBA::Object_ptr ObjRef, const char* Path) override { _ns_cont->Register(ObjRef,Path); }
71  void Destroy_FullDirectory(const char* Path) override { _ns_cont->Destroy_FullDirectory(Path); }
72  void Destroy_Name(const char* Path) override { _ns_cont->Destroy_Name(Path); }
73  CORBA::Object_ptr Resolve(const char* Path) override { return _ns_cont->Resolve(Path); }
74  CORBA::Object_ptr ResolveFirst(const char* Path) override { return _ns_cont->ResolveFirst(Path); }
75  bool IsTrueNS() const override { return _ns_cont->IsTrueNS(); }
76  //
77  std::vector< std::string > repr() override;
78  void Destroy_Directory(const char* Path) override;
79  bool Change_Directory(const char* Path) override;
80  std::vector<std::string> list_subdirs() override;
81  std::vector<std::string> list_directory() override;
82  std::vector<std::string> list_directory_recurs() override;
83  CORBA::Object_ptr ResolveComponent(const char* hostname, const char* containerName, const char* componentName, const int nbproc=0) override;
84 private:
87 };
88 
#define SEP
Definition: Container_i.cxx:109
#define NAMINGSERVICE_EXPORT
Definition: SALOME_NamingService_defs.hxx:36
Definition: SALOME_NamingService_Abstract.hxx:65
SALOME_NamingService_Container_Abstract * clone() override
Definition: SALOME_NamingService_Abstract.hxx:69
void init_orb(CORBA::ORB_ptr orb=0) override
Definition: SALOME_NamingService_Abstract.hxx:68
bool IsTrueNS() const override
Definition: SALOME_NamingService_Abstract.hxx:75
CORBA::Object_ptr Resolve(const char *Path) override
Definition: SALOME_NamingService_Abstract.hxx:73
void Destroy_Name(const char *Path) override
Definition: SALOME_NamingService_Abstract.hxx:72
void Register(CORBA::Object_ptr ObjRef, const char *Path) override
Definition: SALOME_NamingService_Abstract.hxx:70
SALOME_NamingService_Abstract_Decorator(SALOME_NamingService_Container_Abstract *ns_cont)
Definition: SALOME_NamingService_Abstract.hxx:67
void Destroy_FullDirectory(const char *Path) override
Definition: SALOME_NamingService_Abstract.hxx:71
CORBA::Object_ptr ResolveFirst(const char *Path) override
Definition: SALOME_NamingService_Abstract.hxx:74
Definition: SALOME_NamingService_Abstract.hxx:46
virtual void Destroy_Directory(const char *Path)=0
virtual std::vector< std::string > list_directory_recurs()=0
virtual bool Change_Directory(const char *Path)=0
virtual std::vector< std::string > list_subdirs()=0
virtual ~SALOME_NamingService_Abstract()
Definition: SALOME_NamingService_Abstract.hxx:56
virtual std::vector< std::string > list_directory()=0
virtual std::vector< std::string > repr()=0
virtual CORBA::Object_ptr ResolveComponent(const char *hostname, const char *containerName, const char *componentName, const int nbproc=0)=0
Definition: SALOME_NamingService_Abstract.hxx:32
virtual CORBA::Object_ptr Resolve(const char *Path)=0
virtual void Destroy_Name(const char *Path)=0
virtual void Register(CORBA::Object_ptr ObjRef, const char *Path)=0
virtual void init_orb(CORBA::ORB_ptr orb=0)=0
virtual SALOME_NamingService_Container_Abstract * clone()=0
virtual void Destroy_FullDirectory(const char *Path)=0
virtual CORBA::Object_ptr ResolveFirst(const char *Path)=0
containerName
Definition: SALOME_ContainerPy.py:383
orb
Definition: salome.py:122
hostname
Definition: test.py:29
Type to describe required properties of a container.
Definition: SALOME_ContainerManager.idl:38