Salome HOME
Ajout des icones etats dans l'arbre d'étude (+ gestion activation)
[modules/adao.git] / src / daSalome / daGUI / ADAO.py
1 #  Copyright (C) 2011 EDF R&D
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.
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 import ADAO_COMPONENT__POA
21 import SALOME_ComponentPy
22 import SALOME_DriverPy
23
24 from daGuiImpl.adaoLogger import *
25
26 class ADAO(ADAO_COMPONENT__POA.ADAO_ENGINE,
27            SALOME_ComponentPy.SALOME_ComponentPy_i,
28            SALOME_DriverPy.SALOME_DriverPy_i):
29   """
30       Pour etre un composant SALOME cette classe Python
31       doit avoir le nom du composant et heriter de la
32       classe ADAO_COMPONENT issue de la compilation de l'idl
33       par omniidl et de la classe SALOME_ComponentPy_i
34       qui porte les services generaux d'un composant SALOME
35   """
36   def __init__ ( self, orb, poa, contID, containerName, instanceName,
37       interfaceName ):
38     debug("Creating ADAO component instance", "ENGINE")
39     SALOME_ComponentPy.SALOME_ComponentPy_i.__init__(self, orb, poa,
40         contID, containerName, instanceName, interfaceName, 0)
41     SALOME_DriverPy.SALOME_DriverPy_i.__init__(self, interfaceName)
42
43     # On stocke dans l'attribut _naming_service, une ref sur le Naming Service
44     self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )
45
46   def print_ping():
47     info("ADAO ENGINE Ping", "ENGINE")