-# -*- coding: utf-8 -*-
-#@ MODIF N_FACT Noyau DATE 09/09/2003 AUTEUR DURAND C.DURAND
+#@ MODIF N_FACT Noyau DATE 16/05/2006 AUTEUR DURAND C.DURAND
+# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
#
#
# ======================================================================
+
+
""" Ce module contient la classe de definition FACT
qui permet de spécifier les caractéristiques des mots clés facteurs
"""
import N_ENTITE
import N_MCFACT
import N_MCLIST
+from N__F import _F
+
+import N_OBJECT
class FACT(N_ENTITE.ENTITE):
"""
elif type(self.defaut) == types.TupleType:
val=self.defaut
# Est ce utile ? Le défaut pourrait etre uniquement un dict
- elif type(self.defaut) == types.DictType or isinstance(self.defaut,N_MCFACT._F):
+ elif type(self.defaut) == types.DictType or isinstance(self.defaut,_F):
val=self.defaut
else:
# On ne devrait jamais passer par la
print "On ne devrait jamais passer par la"
return None
- if type(val) == types.TupleType or type(val) == types.ListType :
- # on est en présence d'un MCFACT multiple !
- l=self.list_instance()
- l.init(nom = nom,parent=parent)
- for v in val:
- objet=self.class_instance(nom=nom,definition=self,val=v,parent=parent)
- l.append(objet)
- return l
+ # On cree toujours une liste de mcfact
+ l=self.list_instance()
+ l.init(nom = nom,parent=parent)
+ if type(val) in (types.TupleType,types.ListType) :
+ for v in val:
+ if type(v) == types.DictType or isinstance(v, _F):
+ objet=self.class_instance(nom=nom,definition=self,val=v,parent=parent)
+ l.append(objet)
+ else:
+ l.append(N_OBJECT.ErrorObj(self,v,parent,nom))
+ elif type(val) == types.DictType or isinstance(val, _F):
+ objet=self.class_instance(nom=nom,definition=self,val=val,parent=parent)
+ l.append(objet)
else:
- return self.class_instance(nom=nom,definition=self,val=val,parent=parent)
+ l.append(N_OBJECT.ErrorObj(self,val,parent,nom))
+ return l
def verif_cata(self):
if type(self.min) != types.IntType :