Salome HOME
CCAR: Modified Files:
[tools/eficas.git] / Ihm / I_A_CLASSER.py
1 """
2 """
3
4 import string
5
6 import I_REGLE
7
8 class A_CLASSER(I_REGLE.REGLE):
9   def gettext(self):
10     text = 'Règle ' + self.__class__.__name__+ ' :\n'
11     t="  D'abord :\n"+' '*8
12     for arg in self.args0:
13       t=t+string.strip(arg)+' ou '
14     text = text + t[0:-4] +'\n'
15     t = "  Ensuite :\n"+' '*8
16     for arg in self.args1:
17       t=t+string.strip(arg)+' ou '
18     text = text + t[0:-4] +'\n'
19     return text
20
21   def init_couples_permis(self):
22     """ 
23        Crée la liste des couples permis parmi les self.args, 
24        càd pour chaque élément de self.args0 crée tous les couples possibles 
25        avec un élément de self.args1
26     """
27     liste = []
28     for arg0 in self.args0:
29       for arg1 in self.args1:
30         liste.append((arg0,arg1))
31     self.liste_couples = liste
32