1 # -*- coding: iso-8859-1 -*-
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
24 La règle AU_MOINS_UN vérifie que l'on trouve au moins un des mots-clés
25 de la règle parmi les arguments d'un OBJECT.
27 Ces arguments sont transmis à la règle pour validation sous la forme
28 d'une liste de noms de mots-clés ou d'un dictionnaire dont
29 les clés sont des noms de mots-clés.
33 La méthode verif vérifie que l'on trouve au moins un des mos-clés
34 de la liste self.mcs parmi les éléments de args
36 args peut etre un dictionnaire ou une liste. Les éléments de args
37 sont soit les éléments de la liste soit les clés du dictionnaire.
39 # on compte le nombre de mots cles presents
42 args = self.liste_to_dico(args)
44 if args.has_key(mc):count=count+1
46 text = u"- Il faut au moins un mot-clé parmi : "+`self.mcs`+'\n'