Salome HOME
Correction of of method for EFICAS compatibility
[modules/adao.git] / src / daSalome / daGUI / ADAO.py
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2010-2014 EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 # Author: AndrĂ© Ribes, andre.ribes@edf.fr, EDF R&D
21
22 import ADAO_COMPONENT__POA
23 import SALOME_ComponentPy
24 import SALOME_DriverPy
25
26 from daUtils.adaoLogger import *
27
28 class ADAO(ADAO_COMPONENT__POA.ADAO_ENGINE,
29            SALOME_ComponentPy.SALOME_ComponentPy_i,
30            SALOME_DriverPy.SALOME_DriverPy_i):
31   """
32       Pour etre un composant SALOME cette classe Python
33       doit avoir le nom du composant et heriter de la
34       classe ADAO_COMPONENT issue de la compilation de l'idl
35       par omniidl et de la classe SALOME_ComponentPy_i
36       qui porte les services generaux d'un composant SALOME
37   """
38   def __init__ ( self, orb, poa, contID, containerName, instanceName,
39       interfaceName ):
40     debug("Creating ADAO component instance", "ENGINE")
41     SALOME_ComponentPy.SALOME_ComponentPy_i.__init__(self, orb, poa,
42         contID, containerName, instanceName, interfaceName, 0)
43     SALOME_DriverPy.SALOME_DriverPy_i.__init__(self, interfaceName)
44
45     # On stocke dans l'attribut _naming_service, une ref sur le Naming Service
46     self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )
47
48   def print_ping():
49     info("ADAO ENGINE Ping", "ENGINE")