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