1 // Copyright (C) 2007-2008 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
22 // SALOME NamingService : wrapping NamingService services
23 // File : SALOME_NamingService.i
24 // Author : Paul RASCLE, EDF
29 #include "SALOME_NamingService.hxx"
30 //#include <omniORB4/CORBA.h>
31 #include <omniORB3/CORBA.h>
32 #include "ServiceUnreachable.hxx"
41 catch (ServiceUnreachable)
43 PyErr_SetString(PyExc_IndexError,"Naming Service Unreacheable");
48 class SALOME_NamingService
52 //! standard constructor
53 SALOME_NamingService();
55 //! standard destructor
56 virtual ~SALOME_NamingService();
58 //! initialize ORB reference after default constructor
59 void init_orb(CORBA::ORB_ptr orb);
61 //! method to create an association in the NamingService between an object reference and a path
62 void Register(CORBA::Object_ptr ObjRef, const char* Path)
63 throw(ServiceUnreachable);
65 //! method to get the ObjRef of a symbolic name
66 CORBA::Object_ptr Resolve(const char* Path)
67 throw( ServiceUnreachable);
69 //! method to research a name from the naming service's current directory
70 int Find(const char* name)
71 throw(ServiceUnreachable);
73 //! method to create a directory from the current directory
74 bool Create_Directory(const char* Path)
75 throw(ServiceUnreachable);
77 //! method to change the current directory to the directory Path indicated in "in" Parameter
78 bool Change_Directory(const char* Path)
79 throw(ServiceUnreachable);
81 //!method to get the current directory
82 char* Current_Directory()
83 throw(ServiceUnreachable);
85 //!method to print all the contexts contained from the current directory
87 throw(ServiceUnreachable);
89 //! method to destroy an association Path-Object Reference
90 void Destroy_Name(const char* Path)
91 throw(ServiceUnreachable);
93 //! method to destroy a directory if it is empty
94 virtual void Destroy_Directory(const char* Path)
95 throw(ServiceUnreachable);