]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
CCAR: retablissement methode __adapt__
authorChristian Caremoli <>
Fri, 15 Jun 2007 13:57:36 +0000 (13:57 +0000)
committerChristian Caremoli <>
Fri, 15 Jun 2007 13:57:36 +0000 (13:57 +0000)
Aster/Cata/cataSTA7/cata.py

index 4c9d22db150238fcec3fd4e73ede2f4a87e330b0..13549f3a19dcc1df6c5d4901bed1a8cb228c84a5 100644 (file)
@@ -34,8 +34,8 @@ except:
   pass
 
 #
-__version__="$Name:  $"
-__Id__="$Id: cata_aster_v6.py,v 1.12 2001/01/16 15:55:05 iliade Exp $"
+__version__="$Name: BR_V1_12a1 $"
+__Id__="$Id: cata.py,v 1.3.8.5 2007-06-14 16:17:58 pnoyret Exp $"
 #
 JdC = JDC_CATA(code='ASTER',
                execmodul=None,
@@ -47,6 +47,17 @@ class entier   (ASSD):
    def __init__(self,valeur=None,**args):
       ASSD.__init__(self,**args)
       self.valeur=valeur
+   def __adapt__(self,validator):
+      if validator.name == "list":
+          #validateur liste,cardinalité
+          return (self,)
+      elif validator.name == "type":
+          #validateur type
+          return validator.adapt(self.valeur or 0)
+      else:
+          #validateur into et valid
+          return self
+
 
 # Type geometriques
 class no  (GEOM):pass