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

Source Code for Module medite.Donnees.commentaire

 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:          commentaire.py 
20  # Objet:        Classe qui regroupe les donnees d'un commentaire 
21  #---------------------------------------------------------------------------- 
22   
23   
24 -class Commentaire:
25 # Constructeur de la classe
26 - def __init__(self, pCommentaire):
27 self.__commentaire = pCommentaire
28 29 # Methode d'acces a l'attribut
30 - def getCommentaire(self):
31 return self.__commentaire
32 33 # Methodes de modification de l'attribut 34 # Methode qui remplace le commentaire
35 - def setCommentaire(self, pCommentaire):
36 self.__commentaire = pCommentaire
37 38 # Methode qui ajoute du texte au commentaire
39 - def addCommentaire(self, pCommentaire):
40 self.__commentaire += ' ' + pCommentaire
41