1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SALOME NamingService : wrapping NamingService services
24 // File : SALOME_NamingService.i
25 // Author : Paul RASCLE, EDF
30 #include "SALOME_NamingService.hxx"
31 //#include <omniORB4/CORBA.h>
32 #include <omniORB3/CORBA.h>
33 #include "ServiceUnreachable.hxx"
42 catch (ServiceUnreachable)
44 PyErr_SetString(PyExc_IndexError,"Naming Service Unreacheable");
49 class SALOME_NamingService
53 //! standard constructor
54 SALOME_NamingService();
56 //! standard destructor
57 virtual ~SALOME_NamingService();
59 //! initialize ORB reference after default constructor
60 void init_orb(CORBA::ORB_ptr orb);
62 //! method to create an association in the NamingService between an object reference and a path
63 void Register(CORBA::Object_ptr ObjRef, const char* Path)
64 throw(ServiceUnreachable);
66 //! method to get the ObjRef of a symbolic name
67 CORBA::Object_ptr Resolve(const char* Path)
68 throw( ServiceUnreachable);
70 //! method to research a name from the naming service's current directory
71 int Find(const char* name)
72 throw(ServiceUnreachable);
74 //! method to create a directory from the current directory
75 bool Create_Directory(const char* Path)
76 throw(ServiceUnreachable);
78 //! method to change the current directory to the directory Path indicated in "in" Parameter
79 bool Change_Directory(const char* Path)
80 throw(ServiceUnreachable);
82 //!method to get the current directory
83 char* Current_Directory()
84 throw(ServiceUnreachable);
86 //!method to print all the contexts contained from the current directory
88 throw(ServiceUnreachable);
90 //! method to destroy an association Path-Object Reference
91 void Destroy_Name(const char* Path)
92 throw(ServiceUnreachable);
94 //! method to destroy a directory if it is empty
95 virtual void Destroy_Directory(const char* Path)
96 throw(ServiceUnreachable);