1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2007-2013 EDF R&D
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.
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.
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
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 from __future__ import absolute_import
27 text = self.__class__.__name__+ ' :\n'
29 text = text + '\t' + mc.strip() + '\n'
32 def purge_liste(self,liste_a_purger,liste_mc_presents):
34 Cette methode doit retirer de la liste liste_a_purger
35 les elements qui ne doivent plus apparaitre en fonction du contexte
37 # Dans le cas general on ne touche pas a la liste
40 def has_operande(self,nom):
41 # On peut faire aussi try:self.mcs.index(nom);return 1;except:return 0
46 def verif_condition_regle(self,liste,l_mc_presents):
50 def enregistreXML(self,root,catalogueXml):
51 import xml.etree.ElementTree as ET
52 regleXml=ET.SubElement(root,'regles')
54 for mot in self.gettext().split('\n'):