From a5ad26ba2052f45fd0487719bcb8bb1ccf74c758 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Tue, 12 Nov 2019 11:20:18 +0100 Subject: [PATCH] =?utf8?q?1er=20merge=20entre=20la=20formation=20Vimmp=20e?= =?utf8?q?t=20la=20nouvelle=20fa=C3=A7on=20de=20declarer=20les=20UserASSD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Accas/A_ETAPE.py | 2 +- Accas/A_JDC.py | 2 +- Accas/A_MACRO_ETAPE.py | 2 +- Accas/A_MCBLOC.py | 2 +- Accas/A_MCFACT.py | 2 +- Accas/A_MCLIST.py | 2 +- Accas/A_MCSIMP.py | 2 +- Accas/A_PROC_ETAPE.py | 2 +- Efi2Xsd/AccasXsd.py | 2 +- Efi2Xsd/{MCAccasXsd.py => MCAccasXML.py} | 0 Efi2Xsd/{balises.py => balisesXSD.py} | 0 Extensions/param2.py | 1 + Noyau/N_SIMP.py | 50 ++++++++++++++---------- 13 files changed, 39 insertions(+), 30 deletions(-) rename Efi2Xsd/{MCAccasXsd.py => MCAccasXML.py} (100%) rename Efi2Xsd/{balises.py => balisesXSD.py} (100%) diff --git a/Accas/A_ETAPE.py b/Accas/A_ETAPE.py index 01ba2a03..aecc47dd 100644 --- a/Accas/A_ETAPE.py +++ b/Accas/A_ETAPE.py @@ -21,7 +21,7 @@ from __future__ import absolute_import from Noyau import N_ETAPE from Validation import V_ETAPE from Ihm import I_ETAPE -from Efi2Xsd.MCAccasXsd import X_MCCOMPO +from Efi2Xsd.MCAccasXML import X_MCCOMPO class ETAPE(I_ETAPE.ETAPE,V_ETAPE.ETAPE,X_MCCOMPO,N_ETAPE.ETAPE): def __init__(self,oper=None,reuse=None,args={}): diff --git a/Accas/A_JDC.py b/Accas/A_JDC.py index d17bd234..3748913d 100644 --- a/Accas/A_JDC.py +++ b/Accas/A_JDC.py @@ -22,7 +22,7 @@ from Noyau import N_JDC from Validation import V_JDC from Extensions import jdc from Ihm import I_JDC -from Efi2Xsd.MCAccasXsd import X_JDC +from Efi2Xsd.MCAccasXML import X_JDC class JDC(jdc.JDC,I_JDC.JDC,X_JDC,V_JDC.JDC,N_JDC.JDC): from .A_ASSD import CO,assd diff --git a/Accas/A_MACRO_ETAPE.py b/Accas/A_MACRO_ETAPE.py index 2bba807e..28a3ce74 100644 --- a/Accas/A_MACRO_ETAPE.py +++ b/Accas/A_MACRO_ETAPE.py @@ -22,7 +22,7 @@ from Noyau import N_MACRO_ETAPE from Validation import V_MACRO_ETAPE from Ihm import I_MACRO_ETAPE from .A_ASSD import CO -from Efi2Xsd.MCAccasXsd import X_MCCOMPO +from Efi2Xsd.MCAccasXML import X_MCCOMPO class MACRO_ETAPE(I_MACRO_ETAPE.MACRO_ETAPE, X_MCCOMPO, diff --git a/Accas/A_MCBLOC.py b/Accas/A_MCBLOC.py index df125d12..5bd5cebd 100644 --- a/Accas/A_MCBLOC.py +++ b/Accas/A_MCBLOC.py @@ -21,7 +21,7 @@ from __future__ import absolute_import from Noyau import N_MCBLOC from Validation import V_MCBLOC from Ihm import I_MCBLOC -from Efi2Xsd.MCAccasXsd import X_MCBLOC +from Efi2Xsd.MCAccasXML import X_MCBLOC class MCBLOC(I_MCBLOC.MCBLOC,N_MCBLOC.MCBLOC,X_MCBLOC,V_MCBLOC.MCBLOC): diff --git a/Accas/A_MCFACT.py b/Accas/A_MCFACT.py index 50fd1a8d..769dcd28 100644 --- a/Accas/A_MCFACT.py +++ b/Accas/A_MCFACT.py @@ -21,7 +21,7 @@ from __future__ import absolute_import from Noyau import N_MCFACT from Validation import V_MCFACT from Ihm import I_MCFACT -from Efi2Xsd.MCAccasXsd import X_MCFACT +from Efi2Xsd.MCAccasXML import X_MCFACT class MCFACT(I_MCFACT.MCFACT,N_MCFACT.MCFACT,X_MCFACT,V_MCFACT.MCFACT): def __init__(self,val,definition,nom,parent,dicoPyxbDeConstruction=None): diff --git a/Accas/A_MCLIST.py b/Accas/A_MCLIST.py index 5554f5ec..922abb89 100644 --- a/Accas/A_MCLIST.py +++ b/Accas/A_MCLIST.py @@ -21,7 +21,7 @@ from __future__ import absolute_import from Noyau import N_MCLIST from Validation import V_MCLIST from Ihm import I_MCLIST -from Efi2Xsd.MCAccasXsd import X_MCLIST +from Efi2Xsd.MCAccasXML import X_MCLIST class MCList(I_MCLIST.MCList,N_MCLIST.MCList,X_MCLIST,V_MCLIST.MCList): diff --git a/Accas/A_MCSIMP.py b/Accas/A_MCSIMP.py index a3c63cb6..7c7ecbca 100644 --- a/Accas/A_MCSIMP.py +++ b/Accas/A_MCSIMP.py @@ -21,7 +21,7 @@ from __future__ import absolute_import from Noyau import N_MCSIMP from Validation import V_MCSIMP from Ihm import I_MCSIMP -from Efi2Xsd.MCAccasXsd import X_MCSIMP +from Efi2Xsd.MCAccasXML import X_MCSIMP class MCSIMP(I_MCSIMP.MCSIMP,N_MCSIMP.MCSIMP,X_MCSIMP,V_MCSIMP.MCSIMP): def __init__(self,val,definition,nom,parent,objPyxbDeConstruction=None): diff --git a/Accas/A_PROC_ETAPE.py b/Accas/A_PROC_ETAPE.py index 7db1db8b..6fdd8361 100644 --- a/Accas/A_PROC_ETAPE.py +++ b/Accas/A_PROC_ETAPE.py @@ -21,7 +21,7 @@ from __future__ import absolute_import from Noyau import N_PROC_ETAPE from Validation import V_PROC_ETAPE from Ihm import I_PROC_ETAPE -from Efi2Xsd.MCAccasXsd import X_MCCOMPO +from Efi2Xsd.MCAccasXML import X_MCCOMPO class PROC_ETAPE(I_PROC_ETAPE.PROC_ETAPE, V_PROC_ETAPE.PROC_ETAPE, diff --git a/Efi2Xsd/AccasXsd.py b/Efi2Xsd/AccasXsd.py index 639ef10b..902e4ba3 100755 --- a/Efi2Xsd/AccasXsd.py +++ b/Efi2Xsd/AccasXsd.py @@ -24,7 +24,7 @@ from .mapDesTypes import Tuple PourTraduction = False -from .balises import * +from .balisesXSD import * # ----------------- class X_definition: # ----------------- diff --git a/Efi2Xsd/MCAccasXsd.py b/Efi2Xsd/MCAccasXML.py similarity index 100% rename from Efi2Xsd/MCAccasXsd.py rename to Efi2Xsd/MCAccasXML.py diff --git a/Efi2Xsd/balises.py b/Efi2Xsd/balisesXSD.py similarity index 100% rename from Efi2Xsd/balises.py rename to Efi2Xsd/balisesXSD.py diff --git a/Extensions/param2.py b/Extensions/param2.py index fa5ea0db..cc198709 100644 --- a/Extensions/param2.py +++ b/Extensions/param2.py @@ -25,6 +25,7 @@ try : except : pass import math import types +# PNPN a resorber import six try: diff --git a/Noyau/N_SIMP.py b/Noyau/N_SIMP.py index b7a324f9..ba002dd7 100644 --- a/Noyau/N_SIMP.py +++ b/Noyau/N_SIMP.py @@ -50,7 +50,7 @@ class SIMP(N_ENTITE.ENTITE): def __init__(self, typ,ang="", fr="", statut='f', into=None, intoSug = None,siValide = None, defaut=None, min=1, max=1, homo=1, position='local', val_min=float('-inf'), val_max=float('inf'), docu="", validators=None, nomXML=None, - sug=None,fenetreIhm=None, attribut=False, creeDesObjetsDeType = None, sortie='n'): + sug=None,fenetreIhm=None, attribut=False, sortie='n'): """ Un mot-clé simple est caractérisé par les attributs suivants : - type : cet attribut est obligatoire et indique le type de valeur attendue @@ -81,40 +81,48 @@ class SIMP(N_ENTITE.ENTITE): N_ENTITE.ENTITE.__init__(self, validators) # Initialisation des attributs self.creeDesObjets = False + self.utiliseUneReference = False + self.creeDesObjetsDeType = None + self.utiliseDesObjetsDeType = None if type(typ) == tuple: self.type = typ else: self.type = (typ,) for t in (self.type) : try : - if issubclass(t,Accas.UserASSD) : creeDesObjetsDeType = t + if issubclass(t,Accas.UserASSD) : + creeDesObjetsDeType = t + self.utiliseUneReference = True except : pass if t == 'createObject' : self.creeDesObjets=True - self.fr = fr - self.statut = statut - self.into = into - self.intoSug = intoSug + if self.utiliseUneReference : + if self.creeDesObjets : + self.utiliseUneReference = False + self.creeDesObjetsDeType = creeDesObjetsDeType + else : self.utiliseDesObjetsDeType = creeDesObjetsDeType + self.fr = fr + self.statut = statut + self.into = into + self.intoSug = intoSug self.siValide = siValide - self.defaut = defaut - self.min = min - self.max = max - self.homo = homo + self.defaut = defaut + self.min = min + self.max = max + self.homo = homo self.position = position - self.val_min = val_min - self.val_max = val_max - self.docu = docu - self.sug = sug - self.ang=ang + self.val_min = val_min + self.val_max = val_max + self.docu = docu + self.sug = sug + self.ang = ang if self.max == '**' : self.max = float('inf') if self.val_max == '**' : self.val_max = float('inf') if self.min == '**' : self.min = float('-inf') if self.val_min == '**' : self.val_min = float('-inf') - self.fenetreIhm=fenetreIhm - self.attribut = attribut - if self.creeDesObjets : self.creeDesObjetsDeType = creeDesObjetsDeType - else : self.creeDesObjetsDeType = None - self.nomXML = nomXML - self.sortie=sortie + self.fenetreIhm = fenetreIhm + self.attribut = attribut + self.nomXML = nomXML + self.sortie = sortie def verifCata(self): """ -- 2.39.2