Salome HOME
67fe8623a89a437fed5b38a1999dab4dddbb177b
[modules/kernel.git] / src / NamingService / SALOME_NamingService.i
1 //=============================================================================
2 // File      : SALOME_NamingService.i
3 // Created   : mer aoĆ» 29 11:26:49 CEST 2001
4 // Author    : Paul RASCLE, EDF
5 // Project   : SALOME
6 // Copyright : EDF 2001
7 // $Header$
8 //=============================================================================
9
10 //%module SALOME_NamingService
11 %{
12 #include "SALOME_NamingService.hxx"
13 #include <omniORB3/CORBA.h>
14 #include "ServiceUnreachable.hxx"
15 %}
16
17 %except(python)
18 {
19   try 
20     {
21       $function
22     }
23   catch (ServiceUnreachable)
24     {
25       PyErr_SetString(PyExc_IndexError,"Naming Service Unreacheable");
26       return NULL;
27     }
28 }
29
30 class SALOME_NamingService
31 {
32 public:
33
34   //! standard constructor
35   SALOME_NamingService();
36
37   //! standard destructor
38   virtual ~SALOME_NamingService();
39
40   //! initialize ORB reference after default constructor
41   void init_orb(CORBA::ORB_ptr orb);
42
43   //! method to create an association in the NamingService between an object reference and a path
44   void Register(CORBA::Object_ptr ObjRef, const char* Path)
45     throw(ServiceUnreachable);
46
47   //! method to get the ObjRef of a symbolic name
48   CORBA::Object_ptr Resolve(const char* Path)
49     throw( ServiceUnreachable);
50
51   //! method to research a name from the naming service's current directory
52   int Find(const char* name)
53     throw(ServiceUnreachable);
54
55   //! method to create a directory from the current directory
56   bool Create_Directory(const char* Path)
57     throw(ServiceUnreachable);
58
59   //! method to change the current directory to the directory Path indicated in "in" Parameter
60   bool Change_Directory(const char* Path)
61     throw(ServiceUnreachable);
62
63   //!method to get the current directory
64   char* Current_Directory()
65     throw(ServiceUnreachable);
66
67   //!method to print all the contexts contained from the current directory
68   void list()
69     throw(ServiceUnreachable);
70
71   //! method to destroy an association Path-Object Reference
72   void Destroy_Name(const char* Path)
73     throw(ServiceUnreachable);
74  
75   //! method to destroy a directory if it is empty
76   virtual void Destroy_Directory(const char* Path)
77     throw(ServiceUnreachable);
78 };
79