Salome HOME
exceptions prints
[tools/eficas.git] / generator / generator_modification.py
1 # -*- coding: utf-8 -*-\r
2 # Copyright (C) 2007-2013   EDF R&D\r
3 #\r
4 # This library is free software; you can redistribute it and/or\r
5 # modify it under the terms of the GNU Lesser General Public\r
6 # License as published by the Free Software Foundation; either\r
7 # version 2.1 of the License.\r
8 #\r
9 # This library is distributed in the hope that it will be useful,\r
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
12 # Lesser General Public License for more details.\r
13 #\r
14 # You should have received a copy of the GNU Lesser General Public\r
15 # License along with this library; if not, write to the Free Software\r
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
17 #\r
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
19 #\r
20 """\r
21     Ce module sert pour charger les parametres de configuration d'EFICAS\r
22 """\r
23 # Modules Python\r
24 import os, sys, string, types, re\r
25 from Extensions.i18n import tr\r
26 \r
27 class ModificationGenerator:\r
28     def generTexteModif(self,obj):\r
29       texteModification=""\r
30       for t in  obj.editor.dicoNouveauxMC.keys() :\r
31           # 'ajoutDefinitionMC',etape,listeAvant,nomDuMC,typ,args\r
32           fonction,Etape,Genea,nomSIMP,typeSIMP,arguments = obj.editor.dicoNouveauxMC[t]\r
33           texteModification += "MODIFICATION_CATALOGUE(Fonction  = '" + str(fonction)+ "',\n"\r
34           texteModification += "                       Etape     = '" + str(Etape)   + "',\n"\r
35           texteModification += "                       Genea     = "  + str(Genea)   + ",\n" \r
36           texteModification += "                       NomSIMP   = '" + str(nomSIMP) + "',\n"\r
37           texteModification += "                       TypeSIMP  = '" + str(typeSIMP)+ "',\n"\r
38           texteModification += "                       PhraseArguments = " +'"' + str(arguments)+ '"'+ ",);\n"\r
39           \r
40 \r
41       return texteModification\r