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