# -*- coding: iso-8859-1 -*- # Copyright 20003 - 2008: Julien Bourdaillet (julien.bourdaillet@lip6.fr), Jean-Gabriel Ganascia (jean-gabriel.ganascia@lip6.fr) # This file is part of MEDITE. # # MEDITE is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # MEDITE is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Foobar; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #---------------------------------------------------------------------------- # Nom: informations.py # Objet: Classe qui regroupe les informations d'un couple d'états #---------------------------------------------------------------------------- from Donnees.transformations import * from Donnees.commentaire import * class Informations: # Constructeur de la classe def __init__(self, pVersionSource, pEtatSource, pVersionCible, pEtatCible, pParametres, pTransformations, pCommentaire = None): self.__versionSource = pVersionSource self.__etatSource = pEtatSource self.__versionCible = pVersionCible self.__etatCible = pEtatCible self.__parametres = pParametres self.__transformations = pTransformations self.__commentaire = pCommentaire # Methodes d'acces aux attributs def getVersionSource(self): return self.__versionSource def getEtatSource(self): return self.__etatSource def getVersionCible(self): return self.__versionCible def getEtatCible(self): return self.__etatCible def getParametres(self): return self.__parametres def getTransformations(self): return self.__transformations def getCommentaire(self): return self.__commentaire # Methodes qui verifient si les transformations ou le commentaire existent # Si ils existent, la fonction retourne vrai, et faux sinon def existeCommentaire(self): if self.__commentaire == None: return 1 ## FAUX else: return 0 ## VRAI def existeTransformations(self): if self.__transformations == None: return 1 ## FAUX else: return 0 ## VRAI # Methode de modification d'attribut # Seul le commentaire est modifiable def setCommentaire(self, pCommentaire): self.__commentaire = pCommentaire