1 // Copyright (C) 2021 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "SALOME_Embedded_NamingService_Client.hxx"
21 #include "SALOME_Embedded_NamingService_Common.hxx"
25 void SALOME_Embedded_NamingService_Client::init_orb(CORBA::ORB_ptr orb)
29 SALOME_NamingService_Container_Abstract *SALOME_Embedded_NamingService_Client::clone()
31 return new SALOME_Embedded_NamingService_Client(*this);
34 void SALOME_Embedded_NamingService_Client::Register(CORBA::Object_ptr ObjRef, const char* Path)
36 std::unique_ptr<Engines::IORType> ior( ObjectToIOR(ObjRef) );
37 this->_remote_ns_serv->Register( *(ior.get()), Path);
40 void SALOME_Embedded_NamingService_Client::Destroy_FullDirectory(const char* Path)
42 this->_remote_ns_serv->Destroy_FullDirectory(Path);
45 void SALOME_Embedded_NamingService_Client::Destroy_Name(const char* Path)
47 this->_remote_ns_serv->Destroy_Name(Path);
50 CORBA::Object_ptr SALOME_Embedded_NamingService_Client::Resolve(const char* Path)
52 std::unique_ptr<Engines::IORType> ior( this->_remote_ns_serv->Resolve(Path) );
53 CORBA::Object_var ret( IORToObject( *(ior.get()) ) );
54 return CORBA::Object::_duplicate(ret);
57 CORBA::Object_ptr SALOME_Embedded_NamingService_Client::ResolveFirst(const char* Path)
59 std::unique_ptr<Engines::IORType> ior( this->_remote_ns_serv->ResolveFirst(Path) );
60 CORBA::Object_var ret( IORToObject( *(ior.get()) ) );
61 return CORBA::Object::_duplicate(ret);