Package medite :: Package Donnees :: Module informations
[hide private]
[frames] | no frames]

Source Code for Module medite.Donnees.informations

 1  # -*- coding: iso-8859-1 -*- 
 2  # Copyright 20003 - 2008: Julien Bourdaillet (julien.bourdaillet@lip6.fr), Jean-Gabriel Ganascia (jean-gabriel.ganascia@lip6.fr) 
 3  # This file is part of MEDITE. 
 4  # 
 5  #    MEDITE is free software; you can redistribute it and/or modify 
 6  #    it under the terms of the GNU General Public License as published by 
 7  #    the Free Software Foundation; either version 2 of the License, or 
 8  #    (at your option) any later version. 
 9  # 
10  #    MEDITE is distributed in the hope that it will be useful, 
11  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
12  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
13  #    GNU General Public License for more details. 
14  # 
15  #    You should have received a copy of the GNU General Public License 
16  #    along with Foobar; if not, write to the Free Software 
17  #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
18  #---------------------------------------------------------------------------- 
19  # Nom:          informations.py 
20  # Objet:        Classe qui regroupe les informations d'un couple d'états 
21  #---------------------------------------------------------------------------- 
22   
23   
24  from Donnees.transformations import * 
25  from Donnees.commentaire import * 
26   
27 -class Informations:
28 29 # Constructeur de la classe
30 - def __init__(self, pVersionSource, pEtatSource, pVersionCible, pEtatCible, 31 pParametres, pTransformations, pCommentaire = None):
32 self.__versionSource = pVersionSource 33 self.__etatSource = pEtatSource 34 self.__versionCible = pVersionCible 35 self.__etatCible = pEtatCible 36 self.__parametres = pParametres 37 self.__transformations = pTransformations 38 self.__commentaire = pCommentaire
39 40 41 # Methodes d'acces aux attributs
42 - def getVersionSource(self):
43 return self.__versionSource
44
45 - def getEtatSource(self):
46 return self.__etatSource
47
48 - def getVersionCible(self):
49 return self.__versionCible
50
51 - def getEtatCible(self):
52 return self.__etatCible
53
54 - def getParametres(self):
55 return self.__parametres
56
57 - def getTransformations(self):
58 return self.__transformations
59
60 - def getCommentaire(self):
61 return self.__commentaire
62 63 64 # Methodes qui verifient si les transformations ou le commentaire existent 65 # Si ils existent, la fonction retourne vrai, et faux sinon
66 - def existeCommentaire(self):
67 if self.__commentaire == None: 68 return 1 ## FAUX 69 else: 70 return 0 ## VRAI
71
72 - def existeTransformations(self):
73 if self.__transformations == None: 74 return 1 ## FAUX 75 else: 76 return 0 ## VRAI
77 78 79 # Methode de modification d'attribut 80 # Seul le commentaire est modifiable
81 - def setCommentaire(self, pCommentaire):
82 self.__commentaire = pCommentaire
83