From 5b8fe6533da7933c6a528594d0b192f1c4c7e85c Mon Sep 17 00:00:00 2001 From: cvs2git Date: Wed, 15 May 2002 15:32:02 +0000 Subject: [PATCH] This commit was manufactured by cvs2git to create tag 'CCAR_livr_CD_15_05'. Sprout from I26 2002-03-26 09:08:47 UTC eficas 'Version initiale de EFICAS 1.2' Cherrypick from master 2002-05-15 15:32:01 UTC eficas 'mise a jour du COPYRIGHT': Accas/A_ASSD.py Accas/A_AU_MOINS_UN.py Accas/A_A_CLASSER.py Accas/A_BLOC.py Accas/A_ENSEMBLE.py Accas/A_ETAPE.py Accas/A_EVAL.py Accas/A_EXCLUS.py Accas/A_FACT.py Accas/A_FORM.py Accas/A_FORM_ETAPE.py Accas/A_JDC.py Accas/A_JDC_CATA.py Accas/A_MACRO.py Accas/A_MACRO_ETAPE.py Accas/A_MCBLOC.py Accas/A_MCFACT.py Accas/A_MCLIST.py Accas/A_MCNUPLET.py Accas/A_MCSIMP.py Accas/A_NUPLET.py Accas/A_OPER.py Accas/A_PRESENT_ABSENT.py Accas/A_PRESENT_PRESENT.py Accas/A_PROC.py Accas/A_PROC_ETAPE.py Accas/A_SIMP.py Accas/A_UN_PARMI.py Accas/__init__.py Aster/INSTALL Aster/LICENSE.TERMS Aster/README Aster/editeur.ini Aster/eficas_aster.py Aster/prefs.py Aster/sdist.py Editeur/Interp.py Editeur/Objecttreeitem.py Editeur/__init__.py Editeur/analyse_catalogue.py Editeur/appli.py Editeur/browser.py Editeur/bureau.py Editeur/catabrowser.py Editeur/cataediteur.py Editeur/centerwindow.py Editeur/compobloc.py Editeur/compocomm.py Editeur/compocommandecomm.py Editeur/compofact.py Editeur/compoformule.py Editeur/compojdc.py Editeur/compomacro.py Editeur/compomclist.py Editeur/componiveau.py Editeur/componuplet.py Editeur/compooper.py Editeur/compoparam.py Editeur/compoparameval.py Editeur/compoproc.py Editeur/composimp.py Editeur/configuration.py Editeur/definition_cata.py Editeur/eficas.py Editeur/eficas_go.py Editeur/faq.py Editeur/fenetre_mc_inconnus.py Editeur/fontes.py Editeur/images.py Editeur/import_code.py Editeur/jdcdisplay.py Editeur/menubar.py Editeur/options.py Editeur/panels.py Editeur/readercata.py Editeur/splash.py Editeur/statusbar.py Editeur/toolbar.py Editeur/tooltip.py Editeur/treeitemincanvas.py Editeur/treewidget.py Editeur/utils.py Editeur/widgets.py Exemples/ex11/main.py Extensions/__init__.py Extensions/commande_comm.py Extensions/commentaire.py Extensions/etape_niveau.py Extensions/interpreteur_formule.py Extensions/jdc.py Extensions/mcnuplet.py Extensions/niveau.py Extensions/nuplet.py Extensions/parametre.py Extensions/parametre_eval.py Extensions/pluginloader.py Ihm/I_ASSD.py Ihm/I_A_CLASSER.py Ihm/I_ENTITE.py Ihm/I_ETAPE.py Ihm/I_EXCLUS.py Ihm/I_FONCTION.py Ihm/I_FORM_ETAPE.py Ihm/I_JDC.py Ihm/I_JDC_CATA.py Ihm/I_MACRO_ETAPE.py Ihm/I_MCBLOC.py Ihm/I_MCCOMPO.py Ihm/I_MCFACT.py Ihm/I_MCLIST.py Ihm/I_MCSIMP.py Ihm/I_OBJECT.py Ihm/I_PRESENT_ABSENT.py Ihm/I_PRESENT_PRESENT.py Ihm/I_PROC_ETAPE.py Ihm/I_REGLE.py Ihm/I_UN_PARMI.py Ihm/__init__.py Minicode/cata_saturne.py Minicode/eficas_mini.py Minicode/prefs.py Tools/__init__.py Validation/V_ETAPE.py Validation/V_MACRO_ETAPE.py convert/Parserv5/Translate.py convert/Parserv5/__init__.py convert/Parserv5/conv.py convert/Parserv5/tables.py convert/Parserv5/tables.tag convert/__init__.py convert/convert_asterv5.py convert/convert_ini.py convert/convert_pyth.py convert/convert_python.py convert/parseur_python.py generator/Formatage.py generator/__init__.py generator/generator_aplat.py generator/generator_asterv5.py generator/generator_ini.py generator/generator_pyth.py generator/generator_python.py --- Accas/A_ASSD.py | 49 +++++ Accas/A_AU_MOINS_UN.py | 19 ++ Accas/A_A_CLASSER.py | 19 ++ Accas/A_BLOC.py | 19 ++ Accas/A_ENSEMBLE.py | 19 ++ Accas/A_ETAPE.py | 19 ++ Accas/A_EVAL.py | 19 ++ Accas/A_EXCLUS.py | 19 ++ Accas/A_FACT.py | 19 ++ Accas/A_FORM.py | 19 ++ Accas/A_FORM_ETAPE.py | 19 ++ Accas/A_JDC.py | 21 ++ Accas/A_JDC_CATA.py | 19 ++ Accas/A_MACRO.py | 19 ++ Accas/A_MACRO_ETAPE.py | 19 ++ Accas/A_MCBLOC.py | 19 ++ Accas/A_MCFACT.py | 19 ++ Accas/A_MCLIST.py | 19 ++ Accas/A_MCNUPLET.py | 19 ++ Accas/A_MCSIMP.py | 19 ++ Accas/A_NUPLET.py | 19 ++ Accas/A_OPER.py | 19 ++ Accas/A_PRESENT_ABSENT.py | 19 ++ Accas/A_PRESENT_PRESENT.py | 19 ++ Accas/A_PROC.py | 19 ++ Accas/A_PROC_ETAPE.py | 19 ++ Accas/A_SIMP.py | 19 ++ Accas/A_UN_PARMI.py | 19 ++ Accas/__init__.py | 29 ++- Aster/INSTALL | 33 +++ Aster/LICENSE.TERMS | 21 ++ Aster/README | 2 + Aster/editeur.ini | 20 ++ Aster/eficas_aster.py | 20 ++ Aster/prefs.py | 57 +++++ Aster/sdist.py | 116 +++++++++++ Editeur/Interp.py | 20 +- Editeur/Objecttreeitem.py | 25 +++ Editeur/__init__.py | 19 ++ Editeur/analyse_catalogue.py | 24 ++- Editeur/appli.py | 20 ++ Editeur/browser.py | 19 ++ Editeur/bureau.py | 43 +++- Editeur/catabrowser.py | 24 ++- Editeur/cataediteur.py | 24 ++- Editeur/centerwindow.py | 19 ++ Editeur/compobloc.py | 20 +- Editeur/compocomm.py | 20 +- Editeur/compocommandecomm.py | 20 +- Editeur/compofact.py | 20 +- Editeur/compoformule.py | 20 +- Editeur/compojdc.py | 22 +- Editeur/compomacro.py | 34 ++- Editeur/compomclist.py | 50 ++++- Editeur/componiveau.py | 20 +- Editeur/componuplet.py | 24 ++- Editeur/compooper.py | 40 +++- Editeur/compoparam.py | 20 +- Editeur/compoparameval.py | 20 +- Editeur/compoproc.py | 24 ++- Editeur/composimp.py | 304 ++++++++++++++++++++------- Editeur/configuration.py | 19 ++ Editeur/definition_cata.py | 20 +- Editeur/eficas.py | 24 ++- Editeur/eficas_go.py | 19 ++ Editeur/faq.py | 19 ++ Editeur/fenetre_mc_inconnus.py | 19 ++ Editeur/fontes.py | 19 ++ Editeur/images.py | 19 ++ Editeur/import_code.py | 19 ++ Editeur/jdcdisplay.py | 62 +++++- Editeur/menubar.py | 32 ++- Editeur/options.py | 19 ++ Editeur/panels.py | 47 ++++- Editeur/readercata.py | 19 ++ Editeur/splash.py | 19 ++ Editeur/statusbar.py | 19 ++ Editeur/toolbar.py | 19 ++ Editeur/tooltip.py | 19 ++ Editeur/treeitemincanvas.py | 21 +- Editeur/treewidget.py | 67 ++++-- Editeur/utils.py | 19 ++ Editeur/widgets.py | 20 +- Exemples/ex11/main.py | 10 + Extensions/__init__.py | 19 ++ Extensions/commande_comm.py | 37 +++- Extensions/commentaire.py | 26 +++ Extensions/etape_niveau.py | 19 ++ Extensions/interpreteur_formule.py | 22 +- Extensions/jdc.py | 19 ++ Extensions/mcnuplet.py | 20 ++ Extensions/niveau.py | 19 ++ Extensions/nuplet.py | 19 ++ Extensions/parametre.py | 23 +- Extensions/parametre_eval.py | 22 ++ Extensions/pluginloader.py | 19 ++ Ihm/I_ASSD.py | 23 ++ Ihm/I_A_CLASSER.py | 19 ++ Ihm/I_ENTITE.py | 19 ++ Ihm/I_ETAPE.py | 143 ++++++++++++- Ihm/I_EXCLUS.py | 22 +- Ihm/I_FONCTION.py | 41 ++++ Ihm/I_FORM_ETAPE.py | 28 +++ Ihm/I_JDC.py | 164 +++++++++++++-- Ihm/I_JDC_CATA.py | 19 ++ Ihm/I_MACRO_ETAPE.py | 80 +++++++ Ihm/I_MCBLOC.py | 19 ++ Ihm/I_MCCOMPO.py | 84 ++++++-- Ihm/I_MCFACT.py | 19 ++ Ihm/I_MCLIST.py | 108 +++++++++- Ihm/I_MCSIMP.py | 148 ++++++++++++- Ihm/I_OBJECT.py | 44 ++++ Ihm/I_PRESENT_ABSENT.py | 24 ++- Ihm/I_PRESENT_PRESENT.py | 19 ++ Ihm/I_PROC_ETAPE.py | 55 +++++ Ihm/I_REGLE.py | 19 ++ Ihm/I_UN_PARMI.py | 22 +- Ihm/__init__.py | 19 ++ Minicode/cata_saturne.py | 324 ++++++++++++++++++++++++++++- Minicode/eficas_mini.py | 37 +++- Minicode/prefs.py | 1 + Tools/__init__.py | 20 +- Validation/V_ETAPE.py | 8 +- Validation/V_MACRO_ETAPE.py | 8 +- convert/Parserv5/Translate.py | 20 ++ convert/Parserv5/__init__.py | 20 ++ convert/Parserv5/conv.py | 25 ++- convert/Parserv5/tables.py | 44 +++- convert/Parserv5/tables.tag | 43 +++- convert/__init__.py | 19 ++ convert/convert_asterv5.py | 19 ++ convert/convert_ini.py | 19 ++ convert/convert_pyth.py | 19 ++ convert/convert_python.py | 19 ++ convert/parseur_python.py | 20 +- generator/Formatage.py | 19 ++ generator/__init__.py | 19 ++ generator/generator_aplat.py | 23 +- generator/generator_asterv5.py | 19 ++ generator/generator_ini.py | 19 ++ generator/generator_pyth.py | 19 ++ generator/generator_python.py | 23 ++ 142 files changed, 4197 insertions(+), 337 deletions(-) create mode 100644 Accas/A_ASSD.py create mode 100644 Aster/INSTALL create mode 100644 Aster/LICENSE.TERMS create mode 100644 Aster/README create mode 100644 Aster/sdist.py create mode 100644 Ihm/I_ASSD.py create mode 100644 Ihm/I_FONCTION.py diff --git a/Accas/A_ASSD.py b/Accas/A_ASSD.py new file mode 100644 index 00000000..b9661c45 --- /dev/null +++ b/Accas/A_ASSD.py @@ -0,0 +1,49 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +from Ihm import I_ASSD +from Ihm import I_FONCTION +from Noyau import N_ASSD +from Noyau import N_GEOM +from Noyau import N_FONCTION +from Noyau import N_CO + +# On ajoute la classe ASSD dans l'héritage multiple pour recréer +# une hiérarchie d'héritage identique à celle de Noyau +# pour faire en sorte que isinstance(o,ASSD) marche encore après +# dérivation + +class ASSD(N_ASSD.ASSD,I_ASSD.ASSD):pass + +class assd(N_ASSD.assd,I_ASSD.ASSD,ASSD):pass + +class FONCTION(N_FONCTION.FONCTION,I_FONCTION.FONCTION,ASSD): + def __init__(self,etape=None,sd=None,reg='oui'): + N_FONCTION.FONCTION.__init__(self,etape=etape,sd=sd,reg=reg) + I_FONCTION.FONCTION.__init__(self,etape=etape,sd=sd,reg=reg) + +class fonction(N_FONCTION.fonction,I_FONCTION.fonction,ASSD): + def __init__(self,etape=None,sd=None,reg='oui'): + N_FONCTION.fonction.__init__(self,etape=etape,sd=sd,reg=reg) + I_FONCTION.fonction.__init__(self,etape=etape,sd=sd,reg=reg) + +class GEOM(N_GEOM.GEOM,I_ASSD.ASSD,ASSD):pass +class geom(N_GEOM.geom,I_ASSD.ASSD,ASSD):pass +class CO(N_CO.CO,I_ASSD.ASSD,ASSD):pass diff --git a/Accas/A_AU_MOINS_UN.py b/Accas/A_AU_MOINS_UN.py index d7c525b0..eb194670 100644 --- a/Accas/A_AU_MOINS_UN.py +++ b/Accas/A_AU_MOINS_UN.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_AU_MOINS_UN from Ihm import I_REGLE diff --git a/Accas/A_A_CLASSER.py b/Accas/A_A_CLASSER.py index c3b32deb..b522b2cd 100644 --- a/Accas/A_A_CLASSER.py +++ b/Accas/A_A_CLASSER.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_A_CLASSER from Ihm import I_A_CLASSER diff --git a/Accas/A_BLOC.py b/Accas/A_BLOC.py index 5b341d6c..d8e16e74 100644 --- a/Accas/A_BLOC.py +++ b/Accas/A_BLOC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_BLOC from Ihm import I_ENTITE import A_MCBLOC diff --git a/Accas/A_ENSEMBLE.py b/Accas/A_ENSEMBLE.py index 6675920b..e9ebac78 100644 --- a/Accas/A_ENSEMBLE.py +++ b/Accas/A_ENSEMBLE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_ENSEMBLE from Ihm import I_REGLE diff --git a/Accas/A_ETAPE.py b/Accas/A_ETAPE.py index cfd20bd9..512a3648 100644 --- a/Accas/A_ETAPE.py +++ b/Accas/A_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_ETAPE from Validation import V_ETAPE from Ihm import I_ETAPE diff --git a/Accas/A_EVAL.py b/Accas/A_EVAL.py index dff258a9..ab40f123 100644 --- a/Accas/A_EVAL.py +++ b/Accas/A_EVAL.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_EVAL class EVAL(N_EVAL.EVAL): diff --git a/Accas/A_EXCLUS.py b/Accas/A_EXCLUS.py index 5473d01a..5bbf943e 100644 --- a/Accas/A_EXCLUS.py +++ b/Accas/A_EXCLUS.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_EXCLUS from Ihm import I_EXCLUS diff --git a/Accas/A_FACT.py b/Accas/A_FACT.py index d40a9c59..b2c8998e 100644 --- a/Accas/A_FACT.py +++ b/Accas/A_FACT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_FACT from Ihm import I_ENTITE import A_MCFACT diff --git a/Accas/A_FORM.py b/Accas/A_FORM.py index 132a24b9..ea61db3e 100644 --- a/Accas/A_FORM.py +++ b/Accas/A_FORM.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_FORM from Ihm import I_ENTITE import A_FORM_ETAPE diff --git a/Accas/A_FORM_ETAPE.py b/Accas/A_FORM_ETAPE.py index 9c6483bd..af4d7cf0 100644 --- a/Accas/A_FORM_ETAPE.py +++ b/Accas/A_FORM_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_FORM_ETAPE from Validation import V_MACRO_ETAPE from Ihm import I_FORM_ETAPE diff --git a/Accas/A_JDC.py b/Accas/A_JDC.py index b709e01f..9216fe5a 100644 --- a/Accas/A_JDC.py +++ b/Accas/A_JDC.py @@ -1,9 +1,30 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_JDC from Validation import V_JDC from Extensions import jdc from Ihm import I_JDC class JDC(jdc.JDC,I_JDC.JDC,V_JDC.JDC,N_JDC.JDC): + from A_ASSD import CO,assd + def __init__(self,*pos,**args): N_JDC.JDC.__init__(self,*pos,**args) V_JDC.JDC.__init__(self) diff --git a/Accas/A_JDC_CATA.py b/Accas/A_JDC_CATA.py index 0a810dc3..10cf409e 100644 --- a/Accas/A_JDC_CATA.py +++ b/Accas/A_JDC_CATA.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_JDC_CATA import A_JDC from Ihm import I_JDC_CATA diff --git a/Accas/A_MACRO.py b/Accas/A_MACRO.py index 311769f8..d4e3fd1d 100644 --- a/Accas/A_MACRO.py +++ b/Accas/A_MACRO.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MACRO from Ihm import I_ENTITE import A_MACRO_ETAPE diff --git a/Accas/A_MACRO_ETAPE.py b/Accas/A_MACRO_ETAPE.py index 29463bd5..9613ebb0 100644 --- a/Accas/A_MACRO_ETAPE.py +++ b/Accas/A_MACRO_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MACRO_ETAPE from Validation import V_MACRO_ETAPE from Ihm import I_MACRO_ETAPE diff --git a/Accas/A_MCBLOC.py b/Accas/A_MCBLOC.py index 3f931840..963ae8f1 100644 --- a/Accas/A_MCBLOC.py +++ b/Accas/A_MCBLOC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MCBLOC from Validation import V_MCBLOC from Ihm import I_MCBLOC diff --git a/Accas/A_MCFACT.py b/Accas/A_MCFACT.py index 96d172a6..5a1b2a96 100644 --- a/Accas/A_MCFACT.py +++ b/Accas/A_MCFACT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MCFACT from Validation import V_MCFACT from Ihm import I_MCFACT diff --git a/Accas/A_MCLIST.py b/Accas/A_MCLIST.py index e3fba40a..d2874c59 100644 --- a/Accas/A_MCLIST.py +++ b/Accas/A_MCLIST.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MCLIST from Validation import V_MCLIST from Ihm import I_MCLIST diff --git a/Accas/A_MCNUPLET.py b/Accas/A_MCNUPLET.py index 49bfa75b..76258bae 100644 --- a/Accas/A_MCNUPLET.py +++ b/Accas/A_MCNUPLET.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Extensions import mcnuplet from Ihm import I_MCCOMPO diff --git a/Accas/A_MCSIMP.py b/Accas/A_MCSIMP.py index 35854885..b517eb65 100644 --- a/Accas/A_MCSIMP.py +++ b/Accas/A_MCSIMP.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MCSIMP from Validation import V_MCSIMP from Ihm import I_MCSIMP diff --git a/Accas/A_NUPLET.py b/Accas/A_NUPLET.py index 1d19c2c0..6c1c5f4c 100644 --- a/Accas/A_NUPLET.py +++ b/Accas/A_NUPLET.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Extensions import nuplet import A_MCLIST diff --git a/Accas/A_OPER.py b/Accas/A_OPER.py index f7c6107b..50e3d340 100644 --- a/Accas/A_OPER.py +++ b/Accas/A_OPER.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_OPER from Ihm import I_ENTITE import A_ETAPE diff --git a/Accas/A_PRESENT_ABSENT.py b/Accas/A_PRESENT_ABSENT.py index ac2b0b30..fc77397c 100644 --- a/Accas/A_PRESENT_ABSENT.py +++ b/Accas/A_PRESENT_ABSENT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_PRESENT_ABSENT from Ihm import I_PRESENT_ABSENT diff --git a/Accas/A_PRESENT_PRESENT.py b/Accas/A_PRESENT_PRESENT.py index 96f52fd6..bb14edfb 100644 --- a/Accas/A_PRESENT_PRESENT.py +++ b/Accas/A_PRESENT_PRESENT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_PRESENT_PRESENT from Ihm import I_PRESENT_PRESENT diff --git a/Accas/A_PROC.py b/Accas/A_PROC.py index d0b56b07..2602a54d 100644 --- a/Accas/A_PROC.py +++ b/Accas/A_PROC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_PROC from Ihm import I_ENTITE import A_PROC_ETAPE diff --git a/Accas/A_PROC_ETAPE.py b/Accas/A_PROC_ETAPE.py index 9d7c0f89..26836709 100644 --- a/Accas/A_PROC_ETAPE.py +++ b/Accas/A_PROC_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_PROC_ETAPE from Validation import V_PROC_ETAPE from Ihm import I_PROC_ETAPE diff --git a/Accas/A_SIMP.py b/Accas/A_SIMP.py index 3cafb492..898c23bc 100644 --- a/Accas/A_SIMP.py +++ b/Accas/A_SIMP.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_SIMP from Ihm import I_ENTITE import A_MCSIMP diff --git a/Accas/A_UN_PARMI.py b/Accas/A_UN_PARMI.py index ee7a5058..55b281d3 100644 --- a/Accas/A_UN_PARMI.py +++ b/Accas/A_UN_PARMI.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_UN_PARMI from Ihm import I_UN_PARMI diff --git a/Accas/__init__.py b/Accas/__init__.py index b61776b3..f3930531 100644 --- a/Accas/__init__.py +++ b/Accas/__init__.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce package contient les classes qui seront effectivement utilisées dans les applications. C'est dans ce package que sont réalisées les combinaisons de classes de base @@ -39,11 +58,11 @@ from A_EXCLUS import EXCLUS from A_ENSEMBLE import ENSEMBLE from A_A_CLASSER import A_CLASSER -from Noyau.N_ASSD import ASSD,assd -from Noyau.N_GEOM import GEOM,geom -from Noyau.N_FONCTION import FONCTION -from Noyau.N_FONCTION import fonction -from Noyau.N_CO import CO +from A_ASSD import ASSD,assd +from A_ASSD import GEOM,geom +from A_ASSD import FONCTION, fonction +from A_ASSD import CO + from Noyau.N__F import _F from Noyau.N_Exception import AsException diff --git a/Aster/INSTALL b/Aster/INSTALL new file mode 100644 index 00000000..044599cc --- /dev/null +++ b/Aster/INSTALL @@ -0,0 +1,33 @@ + + +1- Installation standard + +Pour installer EFICAS a partir de la distribution : Eficas.tgz +faire : + tar xzvf Eficas.tgz + +ce qui a pour effet de créer un répertoire Eficas +Tel que Eficas est prêt à etre executé. + +ATTENTION : +Si Eficas est installé dans un répertoire particulier d'administration +dans lequel les utilisateurs n'ont pas le droit d'écriture, il faut que +l'administrateur lance Eficas avec les deux versions 5 et 6 pour générer +les fichiers et catalogues compilés .pyc et _pickled.py + +2- Utilisation d'Eficas + +Pour utiliser Eficas, aller dans le répertoire Aster et faire : + python eficas_aster.py + +3- Installation avec un noyau pré-installé + +Aller dans le répertoire Aster du répertoire Eficas +et modifier le fichier prefs.py comme suit : +Mettre dans la variable CODE_PATH le chemin absolu vers +le répertoire contenant les deux répertoires Noyau et Validation que vous voulez +utiliser à la place de ceux fournis dans la livraison d'Eficas + +Pour changer les catalogues, modifier le fichier editeur.ini dans le répertoire Aster + + diff --git a/Aster/LICENSE.TERMS b/Aster/LICENSE.TERMS new file mode 100644 index 00000000..8c88a1e5 --- /dev/null +++ b/Aster/LICENSE.TERMS @@ -0,0 +1,21 @@ + ====================================================================== + THIS PROGRAM IS FREE SOFTWARE. YOU CAN REDISTRIBUTE IT AND/OR MODIFY + IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY + THE FREE SOFTWARE FOUNDATION, EITHER VERSION 2 OF THE LICENSE, AND + ANY LATER VERSION. + THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT + WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF + MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + SEE THE GNU GENERAL PUBLIC LICENSE FOR MORE DETAILS. + ====================================================================== + TRADUCTION EDF ( POUR INFORMATION ) + ====================================================================== + CE PROGRAMME EST UN LOGICIEL LIBRE. VOUS POUVEZ LE DIFFUSER ET/OU LE + MODIFIER SELON LES DISPOSITIONS DE LA LICENCE GRAND PUBLIC GNU (GPL) + TELLE QU'ELLE EST PUBLIEE PAR LA FREE SOFTWARE FOUNDATION, VERSION 2 + DE LA LICENCE ET TOUTE VERSION ULTERIEURE. + CE PROGRAMME EST DIFFUSE AVEC L'ESPOIR QU'IL SERA UTILE, MAIS SANS + GARANTIE, SANS MEME LA GARANTIE IMPLICITE DE QUALIFICATION DE MISE SUR + LE MARCHE OU D'ADAPTATION A UNE UTILISATION PARTICULIERE. + VOIR POUR DE PLUS AMPLES DETAILS LA LICENCE GRAND PUBLIC GNU (GPL) + ====================================================================== diff --git a/Aster/README b/Aster/README new file mode 100644 index 00000000..0597ecbb --- /dev/null +++ b/Aster/README @@ -0,0 +1,2 @@ + +Pour installer EFICAS voir dans le fichier INSTALL diff --git a/Aster/editeur.ini b/Aster/editeur.ini index e86dc069..df65bcb5 100644 --- a/Aster/editeur.ini +++ b/Aster/editeur.ini @@ -1,3 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + import os import prefs diff --git a/Aster/eficas_aster.py b/Aster/eficas_aster.py index 2debb64d..ca862a94 100755 --- a/Aster/eficas_aster.py +++ b/Aster/eficas_aster.py @@ -1,4 +1,24 @@ #!/usr/bin/env python +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + """ Ce module sert à lancer EFICAS configuré pour Code_Aster """ diff --git a/Aster/prefs.py b/Aster/prefs.py index f3d82ae8..78c10406 100644 --- a/Aster/prefs.py +++ b/Aster/prefs.py @@ -1,3 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + import os # REPINI sert à localiser le fichier editeur.ini @@ -19,3 +39,40 @@ CODE_PATH = None # Par défaut on utilise le répertoire icons dans Editeur ICONDIR=os.path.join(INSTALLDIR,'Editeur','icons') +labels= ('Fichier','Edition','Jeu de commandes', + # 'Catalogue','Browsers','Options' + ) + +extensions=['readercata','bureau', + # 'browser','options' + ] + +menu_defs={ 'bureau': [ + ('Fichier',[ + ('Nouveau','newJDC'), + ('Ouvrir','openJDC'), + ('Enregistrer','saveJDC'), + ('Enregistrer sous','saveasJDC'), + None, + ('Fermer','closeJDC'), + ('Quitter','exitEFICAS'), + ] + ), + ('Edition',[ + ('Copier','copy'), + ('Couper','cut'), + ('Coller','paste'), + ] + ), + ('Jeu de commandes',[ + ('Rapport de validation','visuCRJDC'), + # ('Fichier à plat','visu_a_plat'), + ('Fichier format v6','visuJDC_py'), + ('Fichier source','visu_txt_brut_JDC'), + ('Paramètres Eficas','affichage_fichier_ini'), + ('Mots-clés inconnus','mc_inconnus'), + ] + ), + ] + } + diff --git a/Aster/sdist.py b/Aster/sdist.py new file mode 100644 index 00000000..830ccb73 --- /dev/null +++ b/Aster/sdist.py @@ -0,0 +1,116 @@ +""" + Ce module sert à construire les distributions d'EFICAS en fonction + du tag CVS courant + Les distributions sont : + - un tar.gz pour UNIX ne contenant pas mxTextTools + - un zip pour Windows contenant mx TextTools préinstallé + L'utilisation de ce module est la suivante : + 1- Se mettre dans un répertoire de travail + 2- Configurer son environnement pour utiliser le référentiel CVS EFICAS + 3- Exporter les sources d'EficasV1 par la commande : + cvs export -r TAG -d Eficas_export EficasV1 + ou TAG est le tag CVS de la version que l'on veut distribuer (par exemple V1_1p1) + 4- Copier le répertoire fourni par Aster (ACCAS6.2.0) au meme niveau que Eficas_export + 5- Aller dans le répertoire Eficas_export + 6- Executer le script sdist.py + python sdist.py + Ce qui a pour effet de creer un repertoire dist contenant les 2 distributions + et de les copier dans le répertoire indiqué par dir_download s'il est accessible + +""" +import os,shutil,glob,sys +import types + +version="$Name: $"[7:-2] or 'Test1_2' +# ==========Path du noyau fourni par Aster==================== +path_Noyau="../../../Tutorial/Superv" +# ============================================================ +nom_distrib="Eficas"+version+"AsterSTA6" +path_distrib=os.path.join("dist",nom_distrib) +path_TextTools="/home/eficas/pkg/mxTools/egenix2.0.2pourWindows/mx/TextTools" +dir_download= "/home/eficas/WWW/telechargement/eficas" + +def main(): + if os.path.isdir('dist'):shutil.rmtree('dist') + + copyfiles('.',path_distrib,['README','LICENSE.TERMS','INSTALL']) + + copyfiles('../Editeur',os.path.join(path_distrib,'Editeur'),['*.py','faqs.txt']) + copyfiles('../Ihm',os.path.join(path_distrib,'Ihm'),['*.py']) + copyfiles('../Extensions',os.path.join(path_distrib,'Extensions'),['*.py']) + copyfiles('../Accas',os.path.join(path_distrib,'Accas'),['*.py']) + copyfiles('../Aster',os.path.join(path_distrib,'Aster'),['prefs.py', + 'editeur.ini', + 'eficas_aster.py', + ]) + copyfiles('../convert',os.path.join(path_distrib,'convert'),['*.py']) + copyfiles('../convert/Parserv5',os.path.join(path_distrib,'convert','Parserv5'),['*.py']) + + copyfiles('../generator',os.path.join(path_distrib,'generator'),['*.py']) + + copyfiles('../Editeur/icons',os.path.join(path_distrib,'Editeur','icons'),['*.gif']) + + copyfiles(os.path.join(path_Noyau,'Noyau'),os.path.join(path_distrib,'Noyau'),['*.py']) + copyfiles(os.path.join(path_Noyau,'Validation'),os.path.join(path_distrib,'Validation'),['*.py']) + copyfiles(os.path.join(path_Noyau,'Cata'),os.path.join(path_distrib,'Aster','Cata'),['*.py', + ]) + + copyfiles('../Tools',os.path.join(path_distrib,'Tools'),['*.py']) + copyfiles('../Tools/foztools',os.path.join(path_distrib,'Tools','foztools'),['*.py']) + + tarball= maketarball('dist',nom_distrib,nom_distrib) + try: + shutil.copy(tarball,dir_download) + except: + print "Repertoire de download inconnu : ",dir_download + + try: + shutil.copytree(path_TextTools,os.path.join(path_distrib,'Tools','TextTools')) + except: + print "Impossible de recuperer mxTextTools : ",dir_download + sys.exit(1) + + zipfile= makezipfile('dist',nom_distrib,nom_distrib) + try: + shutil.copy(zipfile,dir_download) + except: + print "Repertoire de download inconnu : ",dir_download + +def make_dir(dir_cible): + if type(dir_cible) is not types.StringType: + raise "make_dir : dir_cible doit etre une string (%s)" % `dir_cible` + head,tail=os.path.split(dir_cible) + tails=[tail] + while head and tail and not os.path.isdir(head): + head,tail=os.path.split(head) + tails.insert(0, tail) + + for d in tails: + head = os.path.join(head, d) + if not os.path.isdir(head):os.mkdir(head) + + +def copyfiles(dir_origin,dir_cible,listfiles): + if not os.path.isdir(dir_cible):make_dir(dir_cible) + for glob_files in listfiles: + for file in glob.glob(os.path.join(dir_origin,glob_files)): + shutil.copy(file,dir_cible) + +def maketarball(dir_trav,dir_cible,nom_tar): + prev=os.getcwd() + print prev + os.chdir(dir_trav) + os.system("tar -cf "+nom_tar+".tar "+dir_cible) + os.system("gzip -f9 "+nom_tar+".tar ") + os.chdir(prev) + return os.path.join(dir_trav,nom_tar+".tar.gz") + +def makezipfile(dir_trav,dir_cible,nom_tar): + prev=os.getcwd() + os.chdir(dir_trav) + os.system("zip -rq "+nom_tar+".zip "+dir_cible) + os.chdir(prev) + return os.path.join(dir_trav,nom_tar+".zip") + +main() + diff --git a/Editeur/Interp.py b/Editeur/Interp.py index 5b320e19..752a44c7 100644 --- a/Editeur/Interp.py +++ b/Editeur/Interp.py @@ -1,9 +1,21 @@ -#@ MODIF Interp Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import Tkinter,ScrolledText diff --git a/Editeur/Objecttreeitem.py b/Editeur/Objecttreeitem.py index 7e9ff7db..3a4d23b3 100644 --- a/Editeur/Objecttreeitem.py +++ b/Editeur/Objecttreeitem.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # import généraux @@ -393,6 +412,12 @@ class SequenceTreeItem(ObjectTreeItem): def GetText(self): return " " + def additem(self,obj,pos): + # XXX Passer par addentite de MCList ??? + self.object.insert(pos,obj) + item = self.make_objecttreeitem(self.appli, obj.nom + ":", obj) + return item + def suppitem(self,item): if not self.object.isMCList():return 1 try : diff --git a/Editeur/__init__.py b/Editeur/__init__.py index e69de29b..427090e6 100644 --- a/Editeur/__init__.py +++ b/Editeur/__init__.py @@ -0,0 +1,19 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== diff --git a/Editeur/analyse_catalogue.py b/Editeur/analyse_catalogue.py index b52a564f..c06aafb3 100644 --- a/Editeur/analyse_catalogue.py +++ b/Editeur/analyse_catalogue.py @@ -1,9 +1,21 @@ -#@ MODIF analyse_catalogue Accas DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from string import split,strip,lowercase,uppercase import re,string,cPickle,os @@ -11,8 +23,8 @@ import re,string,cPickle,os from Noyau.N_CR import CR # -__Id__="$Id: analyse_catalogue.py,v 1.13.18.3 2001/06/19 12:24:48 iliade Exp $" -__version__="$Name: FR_28_06_10_00 $" +__Id__="$Id: analyse_catalogue.py,v 1.1.1.1 2002/03/26 09:08:45 eficas Exp $" +__version__="$Name: $" # l_noms_commandes = ['OPER','PROC','MACRO','FORM'] l_noms_composes=['FACT','BLOC','NUPL','FORM'] diff --git a/Editeur/appli.py b/Editeur/appli.py index f8b031f7..c00568ce 100644 --- a/Editeur/appli.py +++ b/Editeur/appli.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe APPLI qui est la classe mère de l'application EFICAS. Elle prend en charge l'organisation générale @@ -110,6 +129,7 @@ class APPLI: root.option_add('*background', 'grey') root.option_add('*foreground', 'black') root.option_add('*EntryField.Entry.background', 'white') + root.option_add('*Entry*background', 'white') root.option_add('*Listbox*background', 'white') root.option_add('*Listbox*selectBackground', '#00008b') root.option_add('*Listbox*selectForeground', 'white') diff --git a/Editeur/browser.py b/Editeur/browser.py index 0553c6e3..ba5b9eee 100644 --- a/Editeur/browser.py +++ b/Editeur/browser.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/bureau.py b/Editeur/bureau.py index 41840842..6b7e5bb1 100644 --- a/Editeur/bureau.py +++ b/Editeur/bureau.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe BUREAU qui gere les JDC ouverts """ @@ -10,6 +29,7 @@ from tkMessageBox import showinfo,askyesno,showerror # Modules Eficas import splash +import prefs import convert import generator from jdcdisplay import JDCDISPLAY @@ -58,6 +78,14 @@ class BUREAU: ('Delete24',"delete","Supprime l'objet courant",'jdc'), ('Help24',"view_doc","Documentation de l'objet courant",'jdc') ) + try: + menu_defs=prefs.menu_defs['bureau'] + except: + pass + try: + button_defs=prefs.button_defs['bureau'] + except: + pass def __init__(self,appli,parent): self.parent=parent @@ -108,6 +136,7 @@ class BUREAU: cata_ord_dico=self.cata_ordonne_dico, appli=self.appli) self.JDCName=J.nom + self.fileName=None self.ShowJDC(J,self.JDCName) self.appli.toolbar.active_boutons() @@ -196,7 +225,7 @@ class BUREAU: Demande à l'utilisateur quel JDC existant il veut ouvrir """ if self.code == 'ASTER': - filetypes = ( ("format "+self.appli.format_fichier.get(), ".comm"),) + filetypes = ( ("format "+self.appli.format_fichier.get(), ".comm"),("Tous",'*')) else: filetypes = ( ("format "+self.appli.format_fichier.get(), ".py"),) if not hasattr(self,'initialdir'): @@ -504,12 +533,16 @@ class BUREAU: """ if not hasattr(self,'JDC') : return titre = "fichier de commandes utilisateur" - texte = self.JDC.procedure - if texte == None: + #texte = self.JDC.procedure + #if texte == None: + if self.JDCDisplay_courant.fichier == None: self.appli.affiche_infos("Pas de fichier initial") - showerror("Impossible de visualiser le fichier initial","EFICAS ne peut visualiser le fichier \ - initial.\nIl s'agit d'un nouveau JDC") + showerror("Impossible de visualiser le fichier initial", + "EFICAS ne peut visualiser le fichier initial.\nIl s'agit d'un nouveau JDC") return + f=open(self.JDCDisplay_courant.fichier,'r') + texte=f.read() + f.close() self.visu_texte_JDC = Fenetre(self.appli,titre=titre,texte=texte) def affichage_fichier_ini(self): diff --git a/Editeur/catabrowser.py b/Editeur/catabrowser.py index 24535cbc..3ecc286f 100644 --- a/Editeur/catabrowser.py +++ b/Editeur/catabrowser.py @@ -1,9 +1,21 @@ -#@ MODIF catabrowser Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import os @@ -23,8 +35,8 @@ from Accas import OPER,PROC,MACRO,FORM from Accas import FACT,BLOC,SIMP # -__version__="$Name: V1_1p1 $" -__Id__="$Id: catabrowser.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: catabrowser.py,v 1.1.1.1 2002/03/26 09:08:46 eficas Exp $" # class Tableau: incr = 10 diff --git a/Editeur/cataediteur.py b/Editeur/cataediteur.py index 5cdbe211..728be924 100644 --- a/Editeur/cataediteur.py +++ b/Editeur/cataediteur.py @@ -1,9 +1,21 @@ -#@ MODIF cataediteur Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import os @@ -26,8 +38,8 @@ from Accas import ASSD,GEOM import definition_cata # -__version__="$Name: V1_1p1 $" -__Id__="$Id: cataediteur.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: cataediteur.py,v 1.1.1.1 2002/03/26 09:08:46 eficas Exp $" # Fonte_Niveau = fontes.canvas_gras_italique diff --git a/Editeur/centerwindow.py b/Editeur/centerwindow.py index 95d9d33b..6b80e0d3 100644 --- a/Editeur/centerwindow.py +++ b/Editeur/centerwindow.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la fonction utilitaire centerwindow qui sert à centrer une fenetre diff --git a/Editeur/compobloc.py b/Editeur/compobloc.py index 085c7d97..6f0682a0 100644 --- a/Editeur/compobloc.py +++ b/Editeur/compobloc.py @@ -1,9 +1,21 @@ -#@ MODIF compobloc Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw diff --git a/Editeur/compocomm.py b/Editeur/compocomm.py index 194730ed..d31e71de 100644 --- a/Editeur/compocomm.py +++ b/Editeur/compocomm.py @@ -1,9 +1,21 @@ -#@ MODIF compocomm Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw diff --git a/Editeur/compocommandecomm.py b/Editeur/compocommandecomm.py index 8b8c9237..cab37e89 100644 --- a/Editeur/compocommandecomm.py +++ b/Editeur/compocommandecomm.py @@ -1,9 +1,21 @@ -#@ MODIF compocommandecomm Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw diff --git a/Editeur/compofact.py b/Editeur/compofact.py index 0b52bbb3..7e0a7927 100644 --- a/Editeur/compofact.py +++ b/Editeur/compofact.py @@ -1,9 +1,21 @@ -#@ MODIF compofact Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import Pmw import Objecttreeitem diff --git a/Editeur/compoformule.py b/Editeur/compoformule.py index b2d640f9..345bacc7 100644 --- a/Editeur/compoformule.py +++ b/Editeur/compoformule.py @@ -1,9 +1,21 @@ -#@ MODIF compoformule Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== """ Ce module contient les classes permettant de définir les objets graphiques diff --git a/Editeur/compojdc.py b/Editeur/compojdc.py index 64461749..f331c612 100644 --- a/Editeur/compojdc.py +++ b/Editeur/compojdc.py @@ -1,17 +1,27 @@ -#@ MODIF compojdc Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== -#XXX est ce utile ?from Tkinter import * import Pmw import Objecttreeitem import panels from widgets import ListeChoix -# XXX temporairement supprimé :from Accas import commentaire class JDCPanel(panels.OngletPanel): def init(self): diff --git a/Editeur/compomacro.py b/Editeur/compomacro.py index ce439f5d..84f723e1 100644 --- a/Editeur/compomacro.py +++ b/Editeur/compomacro.py @@ -1,9 +1,21 @@ -#@ MODIF compomacro Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import os,sys,string @@ -23,8 +35,8 @@ import convert from widgets import Fenetre # -__version__="$Name: V1_1p1 $" -__Id__="$Id: compomacro.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: compomacro.py,v 1.3 2002/04/05 06:32:38 eficas Exp $" # class MACROPanel(panels.OngletPanel): @@ -187,6 +199,11 @@ class MACROTreeItem(compooper.EtapeTreeItem): Ce nom dépend de la validité de l'objet """ if self.object.isactif(): + if self.object.state != 'unchanged': + # Si des modifications ont eu lieu on force le calcul des concepts de sortie + # et celui du contexte glissant + self.object.get_type_produit(force=1) + self.object.parent.reset_context() if self.object.isvalid(): return "ast-green-square" else: @@ -230,6 +247,7 @@ class MACROTreeItem(compooper.EtapeTreeItem): # item.object = MCSIMP, MCFACT, MCBLOC ou MCList if item.object.isoblig() : self.appli.affiche_infos('Impossible de supprimer un mot-clé obligatoire ') + print "Impossible de supprimer un mot-clé obligatoire" return 0 else : self.object.suppentite(item.object) @@ -274,10 +292,6 @@ class MACROTreeItem(compooper.EtapeTreeItem): def verif_condition_bloc(self): return self.object.verif_condition_bloc() - def nomme_sd(self,nom): - """ Lance la méthode de nommage de la SD """ - return self.object.nomme_sd(nom) - def get_noms_sd_oper_reentrant(self): return self.object.get_noms_sd_oper_reentrant() diff --git a/Editeur/compomclist.py b/Editeur/compomclist.py index 74f5254e..e1ba88e4 100644 --- a/Editeur/compomclist.py +++ b/Editeur/compomclist.py @@ -1,9 +1,21 @@ -#@ MODIF compomclist Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw @@ -39,7 +51,35 @@ class MCListTreeItem(Objecttreeitem.SequenceTreeItem): Retourne 1 si l'objet pointé par self est un MCFact, 0 sinon """ return 0 - + + def isMCList(self): + """ + Retourne 1 si l'objet pointé par self est une MCList, 0 sinon + """ + return 1 + + def additem(self,obj,pos): + """ + Ajoute un objet MCFACT à la MCList (self.object) à la position pos + """ + self.object.init_modif() + obj.verif_existence_sd() + obj.reparent(self.object.parent) + self.object.insert(pos,obj) + item = self.make_objecttreeitem(self.appli, obj.nom + ":", obj) + return item + + def suppitem(self,item): + """ + Retire un objet MCFACT de la MCList (self.object) + """ + self.object.init_modif() + self.object.remove(item.object) + # la liste peut être retournée vide ! + message = "Mot-clé " + item.object.nom + " supprimé" + self.appli.affiche_infos(message) + return 1 + import Accas treeitem = MCListTreeItem objet = Accas.MCList diff --git a/Editeur/componiveau.py b/Editeur/componiveau.py index 67ed0df1..f16c2c13 100644 --- a/Editeur/componiveau.py +++ b/Editeur/componiveau.py @@ -1,9 +1,21 @@ -#@ MODIF componiveau Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * diff --git a/Editeur/componuplet.py b/Editeur/componuplet.py index d4e76fb9..04d11082 100644 --- a/Editeur/componuplet.py +++ b/Editeur/componuplet.py @@ -1,9 +1,21 @@ -#@ MODIF componuplet Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import types @@ -17,8 +29,8 @@ import Objecttreeitem import panels # -__version__="$Name: V1_1p1 $" -__Id__="$Id: componuplet.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: componuplet.py,v 1.1.1.1 2002/03/26 09:08:46 eficas Exp $" # myrepr = Repr() diff --git a/Editeur/compooper.py b/Editeur/compooper.py index eceb5cf8..154aa2ab 100644 --- a/Editeur/compooper.py +++ b/Editeur/compooper.py @@ -1,12 +1,25 @@ -#@ MODIF compooper Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw +import traceback import Objecttreeitem import panels import fontes @@ -68,7 +81,8 @@ class OPERPanel(panels.OngletPanel): choix = self.listbox.getcurselection()[0] self.valeur_choisie.set(choix) except: - pass + traceback.print_exc() + def choose_valeur_from_list(self,command): try: @@ -76,7 +90,7 @@ class OPERPanel(panels.OngletPanel): self.valeur_choisie.set(choix) apply(command,(),{}) except: - pass + traceback.print_exc() class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): panel = OPERPanel @@ -189,7 +203,9 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): def nomme_sd(self,nom): """ Lance la méthode de nommage de la SD """ - return self.object.nomme_sd(nom) + test,mess= self.object.nomme_sd(nom) + if test:self.object.parent.reset_context() + return test,mess def is_reentrant(self): return self.object.is_reentrant() @@ -218,6 +234,16 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): commande_comment.jdc = commande_comment.parent = self.object.jdc return commande_comment + def replace_child(self,old_item,new_item): + """ + Remplace old_item.object par new_item.object dans les fils de self.object + """ + index = self.object.mc_liste.index(old_item.object) + self.object.init_modif() + self.object.mc_liste.remove(old_item.object) + self.object.mc_liste.insert(index,new_item.object) + self.object.fin_modif() + import Accas treeitem = EtapeTreeItem objet = Accas.ETAPE diff --git a/Editeur/compoparam.py b/Editeur/compoparam.py index cd247e05..b5331466 100644 --- a/Editeur/compoparam.py +++ b/Editeur/compoparam.py @@ -1,9 +1,21 @@ -#@ MODIF compoparam Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== """ Ce module contient les classes permettant de définir les objets graphiques diff --git a/Editeur/compoparameval.py b/Editeur/compoparameval.py index 13bb98ba..2fa34a60 100644 --- a/Editeur/compoparameval.py +++ b/Editeur/compoparameval.py @@ -1,9 +1,21 @@ -#@ MODIF compoparameval Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== """ Ce module contient les classes permettant de définir les objets graphiques diff --git a/Editeur/compoproc.py b/Editeur/compoproc.py index 7cbc5edf..0fa5647d 100644 --- a/Editeur/compoproc.py +++ b/Editeur/compoproc.py @@ -1,9 +1,21 @@ -#@ MODIF compoproc Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw @@ -130,10 +142,6 @@ class ProcEtapeTreeItem(compooper.EtapeTreeItem): def verif_condition_bloc(self): return self.object.verif_condition_bloc() - def nomme_sd(self,nom): - """ Lance la méthode de nommage de la SD """ - return self.object.nomme_sd(nom) - def get_noms_sd_oper_reentrant(self): return self.object.get_noms_sd_oper_reentrant() diff --git a/Editeur/composimp.py b/Editeur/composimp.py index d7ec659b..9168f2d9 100644 --- a/Editeur/composimp.py +++ b/Editeur/composimp.py @@ -1,17 +1,32 @@ -#@ MODIF composimp Editeur DATE 05/09/2001 AUTEUR DURAND C.DURAND # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== +# Modules Python import string,types,os from Tkinter import * import Pmw from tkFileDialog import * from tkMessageBox import showinfo from copy import copy,deepcopy +import traceback +# Modules Eficas import Objecttreeitem import prefs import panels @@ -51,7 +66,8 @@ class newSIMPPanel(panels.OngletPanel): def record_valeur(self,name=None,mess='Valeur du mot-clé enregistrée'): """ - Enregistre val comme valeur de self.node.item.object SANS faire de test de validité + Enregistre val comme valeur de self.node.item.object SANS + faire de test de validité """ if self.parent.modified == 'n' : self.parent.init_modif() if name != None: @@ -67,9 +83,9 @@ class newSIMPPanel(panels.OngletPanel): self.node.racine.verif_all() else : self.node.parent.verif() + self.node.update() if self.node.item.isvalid(): self.node.parent.select() - self.node.update() # ---------------------------------------------------------------------------------------- # Méthodes utlisées pour la manipulation des items dans les listes de choix # ---------------------------------------------------------------------------------------- @@ -196,18 +212,18 @@ class PLUSIEURS_Panel(newSIMPPanel): self.record_valeur(valeur) if self.node.item.isvalid(): self.node.parent.select() - # fermeture de la fenêtre de sélection - if self.ajout_valeurs: - self.ajout_valeurs.quit() + # fermeture de la fenêtre de sélection + if self.ajout_valeurs: + self.ajout_valeurs.quit() def annule_modifs_valeur(self): """ RAZ de la liste des valeurs (annule toutes les valeurs saisies par l'utilisateur) """ self.node.select() - # fermeture de la fenêtre de sélection - if self.ajout_valeurs: - self.ajout_valeurs.quit() + # fermeture de la fenêtre de sélection + if self.ajout_valeurs: + self.ajout_valeurs.quit() def traite_reel(self,valeur): """ @@ -305,7 +321,7 @@ class PLUSIEURS_INTO_Panel(PLUSIEURS_Panel): """ Génère la page de saisie de plusieurs valeurs parmi un ensemble discret de possibles - """ + """ self.ajout_valeurs = None # On récupère la bulle d'aide du panneau, l'objet, min et max (cardinalité de la liste), # la liste des choix et la liste des valeurs @@ -424,12 +440,12 @@ class PLUSIEURS_BASE_Panel(PLUSIEURS_Panel): # Création de l'entry ou de la liste des SD self.label = Label(self.frame_choix,text="Valeur :") self.make_entry(frame = self.frame_choix,command = self.add_valeur_sans_into) - self.label.place(relx=0.05,rely=0.5) - # Création d'un bouton "Importer ..." sur le panel. - bouton_valeurs_fichier = Button(self.frame_choix, - text="Importer ...", - command=self.select_in_file) - bouton_valeurs_fichier.place(relx=0.28,rely=0.7,relwidth=0.6) + self.label.place(relx=0.05,rely=0.5) + # Création d'un bouton "Importer ..." sur le panel. + bouton_valeurs_fichier = Button(self.frame_choix, + text="Importer ...", + command=self.select_in_file) + bouton_valeurs_fichier.place(relx=0.28,rely=0.7,relwidth=0.6) self.ajout_valeurs = None # boutons Ajouter et Supprimer bouton_add = Button(self.frame_boutons_fleches, @@ -441,10 +457,12 @@ class PLUSIEURS_BASE_Panel(PLUSIEURS_Panel): bouton_add.place(relx=0.3,rely=0.35) bouton_sup.place(relx=0.3,rely=0.65) # affichage de l'aide + self.frame_aide.update() self.aide = Label(self.frame_aide, text = aide, justify='center', - anchor='center') + anchor='center', + wraplength=int(self.frame_aide.winfo_width()*0.8)) self.aide.place(relx=0.5,rely=0.5,anchor='center',relwidth=1) self.Liste_valeurs.affiche_liste() # boutons Accepter et Annuler @@ -456,21 +474,24 @@ class PLUSIEURS_BASE_Panel(PLUSIEURS_Panel): command = self.annule_modifs_valeur) for but in (bouton_accepter,bouton_annuler): but.pack(side='left',padx=5) - - def select_in_file(self): - """ Permet d'ouvrir un fichier choisi par l'utilisateur. """ - nom_fichier = askopenfilename(title="Choix fichier :") - if nom_fichier == "": - return - try: - f = open(nom_fichier, "rb") - selection_texte = f.read() - f.close() - self.ajout_valeurs = FenetreDeSelection(self, self.node.item, - titre="Sélection de valeurs", - texte=selection_texte) - except: - showinfo("Erreur de fichier","impossible d'ouvir le fichier "+nom_fichier) + + def select_in_file(self): + """ Permet d'ouvrir un fichier choisi par l'utilisateur. """ + nom_fichier = askopenfilename(title="Choix fichier :") + if nom_fichier == "": + return + try: + f = open(nom_fichier, "rb") + selection_texte = f.read() + f.close() + self.ajout_valeurs = FenetreDeSelection(self, + self.node.item, + self.parent.appli, + titre="Sélection de valeurs", + texte=selection_texte) + except: + traceback.print_exc() + showinfo("Erreur de fichier","impossible d'ouvir le fichier "+nom_fichier) def get_bulle_aide(self): """ @@ -700,22 +721,20 @@ class UNIQUE_Panel(newSIMPPanel): if not test : mess = "impossible d'évaluer : %s " %`valeur` self.parent.appli.affiche_infos("Valeur du mot-clé non autorisée :"+mess) - return elif self.node.item.isvalid() : self.parent.appli.affiche_infos('Valeur du mot-clé enregistrée') + if self.node.item.get_position()=='global': + self.node.etape.verif_all() + elif self.node.item.get_position()=='global_jdc': + self.node.racine.verif_all() + else : + self.node.parent.verif() + self.node.update() self.node.parent.select() else : cr = self.node.item.get_cr() mess = "Valeur du mot-clé non autorisée :"+cr.get_mess_fatal() self.record_valeur(anc_val,mess=mess) - return - if self.node.item.get_position()=='global': - self.node.etape.verif_all() - elif self.node.item.get_position()=='global_jdc': - self.node.racine.verif_all() - else : - self.node.parent.verif() - self.node.update() class UNIQUE_INTO_Panel(UNIQUE_Panel): """ @@ -878,7 +897,7 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): self.listbox.place(relx=0.5,rely=0.3,relheight=0.4,anchor='center') # affichage du bouton 'Nouveau concept' self.b_co = Pmw.OptionMenu(self.frame_valeur,labelpos='w',label_text = "Nouveau concept : ", - items = ('OUI','NON'),menubutton_width=10) + items = ('NON','OUI'),menubutton_width=10) self.b_co.configure(command = lambda e,s=self : s.ask_new_concept()) self.b_co.place(relx=0.05,rely=0.6,anchor='w') self.label_co = Label(self.frame_valeur,text='Nom du nouveau concept :') @@ -888,9 +907,12 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): self.l_resu = Label(self.frame_valeur,text='Structure de donnée choisie :') self.valeur_choisie = StringVar() self.label_valeur = Label(self.frame_valeur,textvariable=self.valeur_choisie) - self.aide = Label(self.frame_valeur, text = aide) + self.frame_valeur.update() + self.aide = Label(self.frame_valeur, + text = aide, + wraplength=int(self.frame_valeur.winfo_width()*0.8), + justify='center') self.aide.place(relx=0.5,rely=0.85,anchor='n') - self.b_co.invoke('NON') # affichage de la valeur courante self.display_valeur() @@ -902,13 +924,66 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): pour valoriser le mot-clé simple courant ou cliquez sur NOUVEAU CONCEPT pour entrer le nom d'un concept non encore existant""" + def valid_valeur(self): + """ + Teste si la valeur fournie par l'utilisateur est une valeur permise : + - si oui, l'enregistre + - si non, restaure l'ancienne valeur + """ + if self.parent.modified == 'n' : self.parent.init_modif() + valeur = self.get_valeur() + self.erase_valeur() + anc_val = self.node.item.get_valeur() + test_CO=self.node.item.is_CO(anc_val) + test = self.node.item.set_valeur(valeur) + if not test : + mess = "impossible d'évaluer : %s " %`valeur` + self.parent.appli.affiche_infos("Valeur du mot-clé non autorisée :"+mess) + return + elif self.node.item.isvalid() : + self.parent.appli.affiche_infos('Valeur du mot-clé enregistrée') + if test_CO: + # il faut egalement propager la destruction de l'ancien concept + self.node.item.delete_valeur_co(valeur=anc_val) + # et on force le recalcul des concepts de sortie de l'etape + self.node.item.object.etape.get_type_produit(force=1) + # et le recalcul du contexte + self.node.item.object.etape.parent.reset_context() + self.node.parent.select() + else : + cr = self.node.item.get_cr() + mess = "Valeur du mot-clé non autorisée :"+cr.get_mess_fatal() + self.record_valeur(anc_val,mess=mess) + return + if self.node.item.get_position()=='global': + self.node.etape.verif_all() + elif self.node.item.get_position()=='global_jdc': + self.node.racine.verif_all() + else : + self.node.parent.verif() + self.node.update() + def valid_nom_concept_co(self,event=None): """ Lit le nom donné par l'utilisateur au concept de type CO qui doit être la valeur du MCS courant et stocke cette valeur """ + if self.parent.modified == 'n' : self.parent.init_modif() + anc_val = self.node.item.get_valeur() nom_concept = self.entry_co.get() - self.node.item.set_valeur_co(nom_concept) + test,mess=self.node.item.set_valeur_co(nom_concept) + if not test: + # On n'a pas pu créer le concept + self.parent.appli.affiche_infos(mess) + return + elif self.node.item.isvalid() : + self.parent.appli.affiche_infos('Valeur du mot-clé enregistrée') + self.node.parent.select() + else : + cr = self.node.item.get_cr() + mess = "Valeur du mot-clé non autorisée :"+cr.get_mess_fatal() + self.record_valeur(anc_val,mess=mess) + return if self.node.item.get_position()=='global': self.node.etape.verif_all() elif self.node.item.get_position()=='global_jdc': @@ -932,6 +1007,9 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): self.label_valeur.place_forget() self.entry_co.focus() elif new_concept == 'NON': + # On est passe de OUI à NON, on supprime la valeur + self.node.item.delete_valeur_co() + self.record_valeur(name=None,mess="Suppression CO enregistrée") self.label_co.place_forget() self.entry_co.place_forget() self.l_resu.place(relx=0.05,rely=0.7) @@ -942,14 +1020,40 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): Affiche la valeur de l'objet pointé par self """ valeur = self.node.item.get_valeur() - if valeur == None : return # pas de valeur à afficher ... + if valeur == None or valeur == '': + self.valeur_choisie.set('') + return # pas de valeur à afficher ... # il faut configurer le bouton si la valeur est un objet CO # sinon afficher le nom du concept dans self.valeur_choisie - if valeur.__class__.__name__ != 'CO': - self.valeur_choisie.set(valeur.nom) - else: + if self.node.item.is_CO(): self.b_co.invoke('OUI') self.entry_co.insert(0,valeur.nom) + else: + self.valeur_choisie.set(valeur.nom) + + def record_valeur(self,name=None,mess='Valeur du mot-clé enregistrée'): + """ + Enregistre val comme valeur de self.node.item.object SANS faire de test de validité + """ + if self.parent.modified == 'n' : self.parent.init_modif() + if name != None: + valeur =name + else : + self.entry_co.delete(0,END) + valeur= self.entry_co.get() + self.node.item.set_valeur_co(valeur) + self.parent.appli.affiche_infos(mess) + # On met a jour le display dans le panneau + self.display_valeur() + if self.node.item.get_position()=='global': + self.node.etape.verif_all() + elif self.node.item.get_position()=='global_jdc': + self.node.racine.verif_all() + else : + self.node.parent.verif() + if self.node.item.isvalid(): + self.node.parent.select() + self.node.update() class UNIQUE_BASE_Panel(UNIQUE_Panel): @@ -980,7 +1084,11 @@ class UNIQUE_BASE_Panel(UNIQUE_Panel): self.entry.bind("",lambda e,c=self.valid_valeur:c()) self.entry.focus() # aide associée au panneau - self.aide = Label(self.frame_valeur, text = aide) + self.frame_valeur.update() + self.aide = Label(self.frame_valeur, + text = aide, + wraplength=int(self.frame_valeur.winfo_width()*0.8), + justify='center') self.aide.place(relx=0.5,rely=0.7,anchor='n') # affichage de la valeur du MCS self.display_valeur() @@ -1047,7 +1155,11 @@ class UNIQUE_COMP_Panel(UNIQUE_Panel): self.entry1.place(relx=0.27,rely = 0.5,relwidth=0.35) self.entry2.place(relx=0.65,rely = 0.5,relwidth=0.35) self.entry1.focus() - self.aide = Label(self.frame_valeur, text = aide) + self.frame_valeur.update() + self.aide = Label(self.frame_valeur, + text = aide, + wraplength=int(self.frame_valeur.winfo_width()*0.8), + justify='center') self.aide.place(relx=0.5,rely=0.7,anchor='n') def get_bulle_aide(self): @@ -1135,7 +1247,6 @@ class SIMPTreeItem(Objecttreeitem.AtomicObjectTreeItem): else: # on attend un entier, un réel ou une string self.panel = UNIQUE_BASE_Panel - def SetText(self, text): try: @@ -1218,42 +1329,47 @@ class SIMPTreeItem(Objecttreeitem.AtomicObjectTreeItem): def GetMinMax(self): """ Retourne les valeurs min et max de la définition de object """ return self.object.get_min_max() - - def GetMultiplicite(self): - """ A préciser. - Retourne la multiplicité des valeurs affectées à l'objet - représenté par l'item. Pour le moment retourne invariablement 1. - """ - return 1 - - def GetType(self): - """ Retourne le type de valeur attendu par l'objet représenté par l'item. - """ - return self.object.get_type() - - def GetIntervalle(self): - """ Retourne le domaine de valeur attendu par l'objet représenté par l'item. - """ - return self.object.getintervalle() - - def IsInIntervalle(self,valeur): - """ Retourne 1 si la valeur est dans l'intervalle permis par - l'objet représenté par l'item. - """ - return self.object.isinintervalle(valeur) + + def GetMultiplicite(self): + """ A préciser. + Retourne la multiplicité des valeurs affectées à l'objet + représenté par l'item. Pour le moment retourne invariablement 1. + """ + return 1 + + def GetType(self): + """ + Retourne le type de valeur attendu par l'objet représenté par l'item. + """ + return self.object.get_type() + + def GetIntervalle(self): + """ + Retourne le domaine de valeur attendu par l'objet représenté + par l'item. + """ + return self.object.getintervalle() + + def IsInIntervalle(self,valeur): + """ + Retourne 1 si la valeur est dans l'intervalle permis par + l'objet représenté par l'item. + """ + return self.object.isinintervalle(valeur) def set_valeur_co(self,nom_co): """ Affecte au MCS pointé par self l'objet de type CO et de nom nom_co """ - self.object.set_valeur_co(nom_co) + return self.object.set_valeur_co(nom_co) def get_sd_avant_du_bon_type(self): """ Retourne la liste des noms des SD présentes avant l'étape qui contient le MCS pointé par self et du type requis par ce MCS """ - return self.object.jdc.get_sd_avant_du_bon_type(self.object.etape,self.object.definition.type) + return self.object.etape.parent.get_sd_avant_du_bon_type(self.object.etape, + self.object.definition.type) def GetListeValeurs(self) : """ Retourne la liste des valeurs de object """ @@ -1272,6 +1388,34 @@ class SIMPTreeItem(Objecttreeitem.AtomicObjectTreeItem): - retourne 'valeur' (chaîne de caractères) sinon """ return self.object.eval_valeur(valeur) + def is_CO(self,valeur=None): + """ + Indique si valeur est un concept produit de la macro + Cette méthode n'a de sens que pour un MCSIMP d'une MACRO + Si valeur vaut None on teste la valeur du mot cle + """ + # Pour savoir si un concept est un nouveau concept de macro + # on regarde s'il est présent dans l'attribut sdprods de l'étape + # ou si son nom de classe est CO. + # Il faut faire les 2 tests car une macro non valide peut etre + # dans un etat pas tres catholique avec des CO pas encore types + # et donc pas dans sdprods (resultat d'une exception dans type_sdprod) + if not valeur:valeur=self.object.valeur + if valeur in self.object.etape.sdprods:return 1 + if type(valeur) is not types.ClassType:return 0 + if valeur.__class__.__name__ == 'CO':return 1 + return 0 + + def delete_valeur_co(self,valeur=None): + """ + Supprime la valeur du mot cle (de type CO) + il faut propager la destruction aux autres etapes + """ + if not valeur : valeur=self.object.valeur + # XXX faut il vraiment appeler del_sdprod ??? + #self.object.etape.parent.del_sdprod(valeur) + self.object.etape.parent.delete_concept(valeur) + import Accas treeitem = SIMPTreeItem objet = Accas.MCSIMP diff --git a/Editeur/configuration.py b/Editeur/configuration.py index 7a191d57..f63634c0 100644 --- a/Editeur/configuration.py +++ b/Editeur/configuration.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module sert pour charger les paramètres de configuration d'EFICAS """ diff --git a/Editeur/definition_cata.py b/Editeur/definition_cata.py index d4842980..eeed1410 100644 --- a/Editeur/definition_cata.py +++ b/Editeur/definition_cata.py @@ -1,9 +1,21 @@ -#@ MODIF definition_cata Accas DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import types diff --git a/Editeur/eficas.py b/Editeur/eficas.py index c1d683c1..a4da8d29 100644 --- a/Editeur/eficas.py +++ b/Editeur/eficas.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe EFICAS qui est l'application proprement dite. Elle est dérivée de la classe APPLI @@ -17,7 +36,10 @@ from widgets import Fenetre class EFICAS(appli.APPLI): - extensions=['readercata','bureau','browser','options'] + try: + from prefs import extensions + except: + extensions=['readercata','bureau','browser','options'] def get_texte_infos(self): texte=appli.APPLI.get_texte_infos(self) diff --git a/Editeur/eficas_go.py b/Editeur/eficas_go.py index 71f4bd09..3f4df08b 100644 --- a/Editeur/eficas_go.py +++ b/Editeur/eficas_go.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module permet de lancer l'application EFICAS en affichant un ecran Splash pour faire patentier l'utilisateur diff --git a/Editeur/faq.py b/Editeur/faq.py index 8caa7ef9..d480fe22 100644 --- a/Editeur/faq.py +++ b/Editeur/faq.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module sert a afficher le texte du FAQ EFICAS et à attendre l'acquittement par l'utilisateur diff --git a/Editeur/fenetre_mc_inconnus.py b/Editeur/fenetre_mc_inconnus.py index 113ec4e4..07e2455e 100644 --- a/Editeur/fenetre_mc_inconnus.py +++ b/Editeur/fenetre_mc_inconnus.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/fontes.py b/Editeur/fontes.py index 013f6d2e..997e77fe 100644 --- a/Editeur/fontes.py +++ b/Editeur/fontes.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== standard = ("Times",10) standard_italique = ("Times",10,'italic') standard_gras = ("Times",10,'bold') diff --git a/Editeur/images.py b/Editeur/images.py index 31f8e2e2..e586d5ba 100644 --- a/Editeur/images.py +++ b/Editeur/images.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module joue le role de cache pour les images stockées dans le repertoire ICONDIR diff --git a/Editeur/import_code.py b/Editeur/import_code.py index 1152f1b7..4d05e343 100644 --- a/Editeur/import_code.py +++ b/Editeur/import_code.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module réalise toutes les mises à jour du chemin pour les imports de modules Python diff --git a/Editeur/jdcdisplay.py b/Editeur/jdcdisplay.py index d85ab06a..7c706069 100644 --- a/Editeur/jdcdisplay.py +++ b/Editeur/jdcdisplay.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe JDCDISPLAY qui réalise l'affichage du jeu de commandes sous la forme d'un arbre et de panneaux qui portent @@ -25,6 +44,7 @@ class JDCDISPLAY: self.jdc=jdc self.nom_jdc=nom_jdc self.fichier=None + self.panel_courant=None if not appli: class Appli: @@ -78,13 +98,32 @@ class JDCDISPLAY: Lance la génération du panneau contextuel de l'objet sélectionné dans l'arbre """ + if self.panel_courant: + # On detruit le panneau + self.panel_courant.destroy() + o=self.panel_courant + self.panel_courant=None + # Mettre à 1 pour verifier les cycles entre objets + # pour les panneaux + withCyclops=0 + if withCyclops: + from Misc import Cyclops + z = Cyclops.CycleFinder() + z.register(o) + del o + z.find_cycles() + z.show_stats() + z.show_cycles() + + if node.item.isactif(): if hasattr(node.item,"panel"): - return node.item.panel(self,self.pane.pane('selected'),node) + self.panel_courant=node.item.panel(self,self.pane.pane('selected'),node) else: raise Exception("Le noeud sélectionné n'a pas de panel associé") else: - return panels.Panel_Inactif(self,self.pane.pane('selected'),node) + self.panel_courant = panels.Panel_Inactif(self,self.pane.pane('selected'),node) + return self.panel_courant def init_modif(self): """ @@ -148,7 +187,7 @@ class JDCDISPLAY: Ne permet que la copie d'objets de type Commande ou MCF """ objet_a_copier = self.appli.noeud_a_editer.item.get_copie_objet() - if objet_a_copier.__class__.__name__ in ('ETAPE','PROC_ETAPE','MACRO_ETAPE'): + if objet_a_copier.__class__.__name__ in ('ETAPE','PROC_ETAPE','MACRO_ETAPE','FORM_ETAPE'): self.doPaste_Commande(objet_a_copier) elif objet_a_copier.__class__.__name__ == "MCFACT": self.doPaste_MCF(objet_a_copier) @@ -159,14 +198,16 @@ class JDCDISPLAY: def doPaste_Commande(self,objet_a_copier): """ - Réalise la copie de l'objet passé en argument qui est nécessairement une commande + Réalise la copie de l'objet passé en argument qui est nécessairement + une commande """ # il faut vérifier que le noeud sélectionné (noeud courant) est bien # une commande ou un JDC sinon la copie est impossible ... if self.node_selected.item.isCommande() : child = self.node_selected.append_brother(objet_a_copier,retour='oui') elif self.node_selected.item.isJdc() : - child = self.node_selected.append_child(objet_a_copier,retour='oui') + child = self.node_selected.append_child(objet_a_copier,pos='first', + retour='oui') else: showinfo("Copie impossible", "Vous ne pouvez coller la commande copiée à ce niveau de l'arborescence !") @@ -195,10 +236,17 @@ class JDCDISPLAY: child = self.node_selected.append_child(objet_a_copier,retour='oui') elif self.node_selected.item.isMCList() : # le noeud courant est une MCList - child = self.node_selected.parent.append_child(objet_a_copier,retour='oui') + child = self.node_selected.parent.append_child(objet_a_copier,pos='first',retour='oui') elif self.node_selected.item.isMCFact(): # le noeud courant est un MCFACT - child = self.node_selected.parent.append_child(objet_a_copier,retour='oui') + if self.node_selected.parent.item.isMCList(): + # le noeud selectionne est un MCFACT dans une MCList + child = self.node_selected.parent.append_child(objet_a_copier, + pos=self.node_selected.item, + retour='oui') + else: + # le noeud MCFACT selectionne n'est pas dans une MCList + child = self.node_selected.parent.append_child(objet_a_copier,retour='oui') else: showinfo("Copie impossible", "Vous ne pouvez coller le mot-clé facteur copié à ce niveau de l'arborescence !") diff --git a/Editeur/menubar.py b/Editeur/menubar.py index ad2366e8..89c74406 100644 --- a/Editeur/menubar.py +++ b/Editeur/menubar.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ from Tkinter import Menu @@ -12,7 +31,10 @@ class MENUBAR: self.parent.configure(menu=self.menubar) self.init() - labels= ('Fichier','Edition','Jeu de commandes','Catalogue','Browsers','Options') + try: + from prefs import labels + except: + labels= ('Fichier','Edition','Jeu de commandes','Catalogue','Browsers','Options') def init(self): self.menudict={} @@ -21,11 +43,3 @@ class MENUBAR: self.menudict[label]=menu self.menubar.add_cascade(label=label,menu=menu) - #self.optionmenu.add_command(label='Catalogue développeur',command=self.choix_cata_developpeur) - - #self.browsermenu.add_command(label='Browser catalogue',command = self.browser_catalogue) - #self.browsermenu.add_command(label='Shell',command = self.shell) - #self.browsermenu.add_command(label='Editeur catalogue',command = self.edite_catalogue) - - - diff --git a/Editeur/options.py b/Editeur/options.py index 0101dd05..d08c6c2e 100644 --- a/Editeur/options.py +++ b/Editeur/options.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/panels.py b/Editeur/panels.py index 8338308a..5999c6c9 100644 --- a/Editeur/panels.py +++ b/Editeur/panels.py @@ -1,9 +1,21 @@ -#@ MODIF panels Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import string import os @@ -29,6 +41,32 @@ class Panel(Frame) : self.creer_boutons() self.init() + def destroy(self): + Frame.destroy(self) + self.panneau=None + self.parent=None + # Because on herite de Frame + self.master=None + # On supprime explicitement les references aux objets Tk + self.nb=None + self.fr_but=None + self.bouton_cata=None + self.bouton_doc=None + self.bouton_com=None + self.bouton_sup=None + self.frame_eval=None + self.label=None + self.frame_boutons=None + self.frame_comment=None + self.frame_param=None + # On termine la suppression de facon brutale (objets Tk et non Tk) + for k in self.__dict__.keys(): + # il est plus prudent de ne pas détruire le lien sur le Node + # si on voulait mettre l'attribut node à None, il faudrait + # que tous les appels à node.parent.select() apparaissent après + # toutes les autres actions liées au panel (node.item.isglobal(), ...) + if k != 'node' : setattr(self,k,None) + def creer_boutons(self): """ Méthode créant les boutons se trouvant dans la partie contextuelle d'EFICAS @@ -152,7 +190,6 @@ class Panel(Frame) : if self.parent.modified == 'n' : self.parent.init_modif() pere = self.node.parent self.node.delete() - pere.select() def affiche(self): """ Force l'affichage des fenêtres en cours """ diff --git a/Editeur/readercata.py b/Editeur/readercata.py index 47667a09..0472c3f7 100644 --- a/Editeur/readercata.py +++ b/Editeur/readercata.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module sert à lire un catalogue et à construire un objet CataItem pour Eficas. diff --git a/Editeur/splash.py b/Editeur/splash.py index c3e5339d..3002d375 100644 --- a/Editeur/splash.py +++ b/Editeur/splash.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module permet de créer, mettre à jour et détruire un écran Splash diff --git a/Editeur/statusbar.py b/Editeur/statusbar.py index 6c0687a1..604025a8 100644 --- a/Editeur/statusbar.py +++ b/Editeur/statusbar.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/toolbar.py b/Editeur/toolbar.py index e99a56de..bd93737a 100644 --- a/Editeur/toolbar.py +++ b/Editeur/toolbar.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/tooltip.py b/Editeur/tooltip.py index d43992c9..18d03d58 100644 --- a/Editeur/tooltip.py +++ b/Editeur/tooltip.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module propose la classe TOOLTIP pour mettre en oeuvre les bulles d'aide diff --git a/Editeur/treeitemincanvas.py b/Editeur/treeitemincanvas.py index 5ec26438..2a1c45ac 100644 --- a/Editeur/treeitemincanvas.py +++ b/Editeur/treeitemincanvas.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -25,7 +44,7 @@ class TREEITEMINCANVAS: self.parent=parent self.item=Objecttreeitem.make_objecttreeitem(self.appli,self.nom,self.object) - self.canvas=Pmw.ScrolledCanvas(self.parent,borderframe=1) + self.canvas=Pmw.ScrolledCanvas(self.parent,borderframe=1,canvas_background='gray95') self.canvas.pack(padx=10,pady=10,fill = 'both', expand = 1) if not sel: def sel(event=None): diff --git a/Editeur/treewidget.py b/Editeur/treewidget.py index a0d6554e..d7f63044 100644 --- a/Editeur/treewidget.py +++ b/Editeur/treewidget.py @@ -1,11 +1,23 @@ -#@ MODIF treewidget Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== -import os,sys,string,re,types +import os,sys,string,re,types,traceback from Tkinter import * @@ -13,8 +25,8 @@ import fontes import images # -__version__="$Name: V1_1p1 $" -__Id__="$Id: treewidget.py,v 1.1.1.1 2001/12/04 15:38:23 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: treewidget.py,v 1.4 2002/04/05 06:32:39 eficas Exp $" # Fonte_Standard = fontes.standard @@ -468,6 +480,7 @@ class Node : try: self.canvas.addtag_overlapping('move',bbox1[0],self.y +10,bbox1[2],bbox1[3]) except: + print "Erreur dans move :" print self print self.item print self.item.object @@ -493,6 +506,7 @@ class Node : try: child.trace_ligne() except: + print "Erreur dans trace_ligne :" print child print child.item.object @@ -521,21 +535,23 @@ class Node : def full_creation(self,name,pos=None): """ - Interface avec ACCAS : création de l'objet de nom name et - du noeud associé. Retourne le noeud fils ainsi créé + Interface avec ACCAS : création de l'objet de nom name et + du noeud associé. Retourne le noeud fils ainsi créé """ item = self.item.additem(name,pos) if item == None or item == 0: # impossible d'ajouter le noeud de nom : name return 0 nature = item.get_nature() - #if nature =="COMMANDE" or nature == "OPERATEUR" or nature == "PROCEDURE": if nature in ("COMMANDE","OPERATEUR","PROCEDURE","COMMENTAIRE", "PARAMETRE","COMMANDE_COMMENTARISEE","PARAMETRE_EVAL"): # on veut ajouter une commande ou un commentaire ou un paramètre # il ne faut pas rechercher un même objet déjà existant # à modifier : il faut tester l'attribut 'repetable' enfant = None + elif self.item.object.isMCList(): + # Dans ce cas on ne fait pas de remplacement. On ne cherche pas un objet de meme nom + enfant=None else : enfant = self.get_node_fils(item.get_nom()) if enfant : @@ -611,6 +627,9 @@ class Node : # on donne la position depuis l'extérieur # (appel de append_child par append_brother par exemple) index = pos + elif type(pos) == types.InstanceType: + # pos est un item. Il faut inserer name apres pos + index = self.item.get_index(pos) +1 else : if type(name) == types.InstanceType: index = self.item.get_index_child(name.nom) @@ -676,6 +695,7 @@ class Node : print 'Erreur dans la destruction de ',self.item.get_nom(),' dans delete' nbnew = pere.get_nb_children() pere.redraw(nbnew-nbold) + pere.select() def copynode(self,node,pos) : """ node est le noeud à copier à la position pos de self ( = parent de node) """ @@ -690,15 +710,16 @@ class Node : try : child.item.object.mc_liste = objet_copie.mc_liste except: - pass + traceback.print_exc() #-------------------------------------------------------------- # Méthodes de vérification du contexte et de validité du noeud #-------------------------------------------------------------- - def traite_mclist(self): + def traite_mclist_OLD(self): """ Dans le cas d'une MCList il faut vérifier qu'elle n'est pas vide ou réduite à un seul élément suite à une destruction """ # self représente une MCList + print "on passe par traite_mclist ",len(self.item) if len(self.item) == 0 : # la liste est vide : il faut la supprimer self.delete() @@ -709,6 +730,8 @@ class Node : noeud = self.children[0] if self.parent.delete_child(self): self.parent.append_node_child(noeud.item,pos=index,verif='non') + else: + print "destruction de self impossible !" #if self.parent.delete_child(self): # self.parent.copynode(self.children[0],index) #else : @@ -716,6 +739,26 @@ class Node : else : return + def traite_mclist(self): + """ Dans le cas d'une MCList il faut vérifier qu'elle n'est pas vide + ou réduite à un seul élément suite à une destruction + """ + # self représente une MCList + if len(self.item) == 0 : + # la liste est vide : il faut la supprimer + self.delete() + elif len(self.item) == 1: + # il ne reste plus qu'un élément dans la liste + # il faut supprimer la liste et créer directement l'objet + index = self.parent.children.index(self) + noeud = self.children[0] + noeud.parent = self.parent + self.parent.delete_node_child(self) + self.parent.item.replace_child(self.item,noeud.item) + self.parent.children.insert(index,noeud) + else : + return + def verif_all(self): self.verif_all_children() diff --git a/Editeur/utils.py b/Editeur/utils.py index 9f09ecd4..b3980a63 100644 --- a/Editeur/utils.py +++ b/Editeur/utils.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient des utilitaires divers """ diff --git a/Editeur/widgets.py b/Editeur/widgets.py index 5b5d4ea2..0c02a3c8 100644 --- a/Editeur/widgets.py +++ b/Editeur/widgets.py @@ -1,9 +1,21 @@ -#@ MODIF widgets Editeur DATE 05/09/2001 AUTEUR DURAND C.DURAND # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # ---------------------------------------------------------- # Cette classe sert à définir les widgets utilisés par diff --git a/Exemples/ex11/main.py b/Exemples/ex11/main.py index 08352a34..942472b5 100644 --- a/Exemples/ex11/main.py +++ b/Exemples/ex11/main.py @@ -28,6 +28,16 @@ class concept: """ Retourne 1 si sd est du bon type par rapport à la classe """ return 0 +class cata: + def __init__(self): + CONTEXT.unset_current_cata() + CONTEXT.set_current_cata(self) + + def enregistre(self,commande): + return + +c=cata() + OP1 = OPER(nom='OP1',op=1,sd_prod=concept,reentrant='f', a=SIMP(typ='I'), c=SIMP(typ='I',position='global'), diff --git a/Extensions/__init__.py b/Extensions/__init__.py index e69de29b..427090e6 100644 --- a/Extensions/__init__.py +++ b/Extensions/__init__.py @@ -0,0 +1,19 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== diff --git a/Extensions/commande_comm.py b/Extensions/commande_comm.py index 68bd102d..28b91a3b 100644 --- a/Extensions/commande_comm.py +++ b/Extensions/commande_comm.py @@ -1,9 +1,21 @@ -#@ MODIF commande_comm Accas DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import os,traceback,string @@ -30,6 +42,7 @@ class COMMANDE_COMM: self.definition=self self.nom = '' self.niveau = self.parent.niveau + self.actif=1 #self.appel = N_utils.callee_where(niveau=2) if reg=='oui' : self.register() @@ -216,3 +229,19 @@ class COMMANDE_COMM: """ return [] + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.get_jdc_root() + self.etape=self + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + --> sans objet pour les commandes commentarisées + """ + pass + diff --git a/Extensions/commentaire.py b/Extensions/commentaire.py index 733a2016..db79f3f7 100644 --- a/Extensions/commentaire.py +++ b/Extensions/commentaire.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe COMMENTAIRE qui sert dans EFICAS pour gérer les commentaires dans un JDC @@ -145,5 +164,12 @@ class COMMENTAIRE : """ return [] + def get_sdprods(self,nom_sd): + """ + Retourne les concepts produits par la commande + """ + return None + def verif_existence_sd(self): + pass diff --git a/Extensions/etape_niveau.py b/Extensions/etape_niveau.py index 31c7c20a..dbd72fea 100644 --- a/Extensions/etape_niveau.py +++ b/Extensions/etape_niveau.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe ETAPE_NIVEAU qui sert à concrétiser les niveaux au sein d'un JDC diff --git a/Extensions/interpreteur_formule.py b/Extensions/interpreteur_formule.py index 7e2dbdf9..4d1b93d4 100644 --- a/Extensions/interpreteur_formule.py +++ b/Extensions/interpreteur_formule.py @@ -1,9 +1,21 @@ -#@ MODIF interpreteur_formule Accas DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import string,re,sys,exceptions,types @@ -145,6 +157,8 @@ class Interpreteur_Formule: texte = [texte,] for text_arg in texte: text_arg = string.replace(text_arg,'\n','') + # Enleve les espaces + text_arg = string.replace(text_arg,' ','') try: self.l_operateurs.append(self.split_operateurs(text_arg)) except InterpreteurException,e: diff --git a/Extensions/jdc.py b/Extensions/jdc.py index 8b7cdf29..313ec043 100644 --- a/Extensions/jdc.py +++ b/Extensions/jdc.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe mixin qui porte les méthodes pour traiter les niveaux au sein d'un JDC diff --git a/Extensions/mcnuplet.py b/Extensions/mcnuplet.py index da997b6d..6db18fda 100644 --- a/Extensions/mcnuplet.py +++ b/Extensions/mcnuplet.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -32,6 +51,7 @@ class MCNUPLET(V_MCCOMPO.MCCOMPO,N_MCCOMPO.MCCOMPO): self.niveau = None self.etape = None self.state = 'undetermined' + self.actif=1 self.mc_liste=self.build_mc() def build_mc(self): diff --git a/Extensions/niveau.py b/Extensions/niveau.py index b5df8fdf..8b6f0822 100644 --- a/Extensions/niveau.py +++ b/Extensions/niveau.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe NIVEAU qui sert à définir des groupes de commandes dans le catalogue diff --git a/Extensions/nuplet.py b/Extensions/nuplet.py index 63da3689..0ec02ba6 100644 --- a/Extensions/nuplet.py +++ b/Extensions/nuplet.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe de définition pour les nuplets NUPL """ diff --git a/Extensions/parametre.py b/Extensions/parametre.py index 94f028f0..20455bfe 100644 --- a/Extensions/parametre.py +++ b/Extensions/parametre.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe PARAMETRE qui sert à définir des objets paramètres qui sont compréhensibles et donc affichables @@ -33,6 +52,7 @@ class PARAMETRE : self.definition=self self.jdc = self.parent = CONTEXT.get_current_step() self.niveau=self.parent.niveau + self.actif=1 self.register() def interprete_valeur(self,val): @@ -249,7 +269,8 @@ class PARAMETRE : """ return [] - + def verif_existence_sd(self): + pass diff --git a/Extensions/parametre_eval.py b/Extensions/parametre_eval.py index 73bf9bd6..b45546d9 100644 --- a/Extensions/parametre_eval.py +++ b/Extensions/parametre_eval.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe PARAMETRE_EVAL qui sert à définir des objets paramètres qui sont compréhensibles et donc affichables @@ -36,6 +55,7 @@ class PARAMETRE_EVAL(parametre.PARAMETRE) : self.jdc = self.parent = CONTEXT.get_current_step() self.definition=self self.niveau = self.parent.niveau + self.actif=1 # Ceci est-il indispensable ??? #self.appel = N_utils.callee_where(niveau=2) self.register() @@ -60,6 +80,8 @@ class PARAMETRE_EVAL(parametre.PARAMETRE) : """ if not val : return None d={} + val = string.strip(val) + if val[-1] == ';' : val = val[0:-1] d['EVAL'] = Accas.EVAL try: valeur = eval(val,{},d) diff --git a/Extensions/pluginloader.py b/Extensions/pluginloader.py index 659027d2..378500c0 100644 --- a/Extensions/pluginloader.py +++ b/Extensions/pluginloader.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le chargeur dynamique de plugins (emprunté à HappyDoc) """ diff --git a/Ihm/I_ASSD.py b/Ihm/I_ASSD.py new file mode 100644 index 00000000..004d0b86 --- /dev/null +++ b/Ihm/I_ASSD.py @@ -0,0 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +class ASSD: + def __repr__(self): + return "concept %s de type %s" % (self.get_name(),self.__class__.__name__) diff --git a/Ihm/I_A_CLASSER.py b/Ihm/I_A_CLASSER.py index 16853f5f..e1f19ca5 100644 --- a/Ihm/I_A_CLASSER.py +++ b/Ihm/I_A_CLASSER.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ diff --git a/Ihm/I_ENTITE.py b/Ihm/I_ENTITE.py index 3a070e1c..4a2ac465 100644 --- a/Ihm/I_ENTITE.py +++ b/Ihm/I_ENTITE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== class ENTITE: def get_docu(self): if hasattr(self,'docu') : diff --git a/Ihm/I_ETAPE.py b/Ihm/I_ETAPE.py index 8937c110..dfebffa2 100644 --- a/Ihm/I_ETAPE.py +++ b/Ihm/I_ETAPE.py @@ -1,9 +1,35 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python import string,types from copy import copy +# import rajoutés suite à l'ajout de Build_sd --> à résorber +import traceback +import Noyau +from Noyau import N_Exception +from Noyau.N_Exception import AsException +# fin import à résorber + # Modules EFICAS import I_MCCOMPO @@ -63,7 +89,8 @@ class ETAPE(I_MCCOMPO.MCCOMPO): """ if self.isvalid() : if type(self.definition.op_init) == types.FunctionType : - apply(self.definition.op_init,(self,self.master.g_context)) + # XXX Normalement en mode editeur g_context ne peut pas etre utilisé + apply(self.definition.op_init,(self,self.parent.g_context)) self.state = 'modified' def nomme_sd(self,nom) : @@ -82,7 +109,9 @@ class ETAPE(I_MCCOMPO.MCCOMPO): # Cas particulier des opérateurs réentrants if not self.isvalid(sd='non') : return 0,"Nommage du concept refusé : l'opérateur n'est pas valide" if self.definition.reentrant == 'o': - self.sd = self.reuse = self.jdc.get_sdprod(nom) + # FR : appel à get_sdprod incorrect : il faut appeler get_sd_avant_etape + #self.sd = self.reuse = self.jdc.get_sdprod(nom) + self.sd = self.reuse = self.jdc.get_sd_avant_etape(nom,self) if self.sd != None : return 1,"Concept existant" else: @@ -90,8 +119,12 @@ class ETAPE(I_MCCOMPO.MCCOMPO): if self.definition.reentrant == 'f' : sd = self.jdc.get_sd_avant_etape(nom,self) if sd != None : - self.sd = self.reuse = sd - return 1,"Opérateur facultativement réentrant et concept existant trouvé" + # FR : il faut tester que la sd trouvée est du bon type !!!!!!!!!!!!!!!!! + if isinstance(sd,self.get_type_produit()) : + self.sd = self.reuse = sd + return 1,"Opérateur facultativement réentrant et concept existant trouvé" + else: + return 0,"Concept déjà existant et de mauvais type" else : # il faut éventuellement enlever le lien vers une SD existante car si on passe ici # cela signifie que l'opérateur n'est pas utilisé en mode réentrant. @@ -234,9 +267,11 @@ class ETAPE(I_MCCOMPO.MCCOMPO): etape.state = 'modified' etape.reuse = None etape.sdnom = None + etape.etape=etape etape.mc_liste=[] for objet in self.mc_liste: new_obj = objet.copy() + new_obj.reparent(etape) etape.mc_liste.append(new_obj) return etape @@ -270,3 +305,103 @@ class ETAPE(I_MCCOMPO.MCCOMPO): l.extend(child.get_sd_utilisees()) return l + def get_genealogie(self): + """ + Retourne la liste des noms des ascendants de l'objet self + en s'arretant à la première ETAPE rencontrée + """ + return [self.nom] + + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.get_jdc_root() + self.etape=self + for mocle in self.mc_liste: + mocle.reparent(self) + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + """ + for motcle in self.mc_liste : + motcle.verif_existence_sd() + + def Build_sd(self,nom): + """ + Construit le concept produit de l'opérateur. Deux cas + peuvent se présenter : + + - le parent n'est pas défini. Dans ce cas, l'étape prend en charge la création + et le nommage du concept. + + - le parent est défini. Dans ce cas, l'étape demande au parent la création et + le nommage du concept. + + """ + if not self.isactif():return + # FR : attention cette méthode ne devrait pas se trouver là car elle surcharge celle qui + # se trouve dans N_ETAPE.py et elle est partie intégrante du noyau, mais, suite à l'absence de + # test de validité de l'opérateur avant d'essayer de déterminer la sd produite, on n'arrivait + # pas à relire avec EFICAS un fichier contenant une étape encore incomplète du style : + # sansnom = AFFE_CHAR_CINE(MODELE=None) + # Suite à la stabilisation du noyau d'Aster, je n'ai pas eu d'autre solution que de surcharger + # cette méthode ici en rajoutant le test manquant ... + # CCAR : cette modification ne corrige le probleme qu'en partie. Il faudrait probablement + # supprimer les erreurs fatales (exception ) et retourner systematiquement un objet produit + # meme en cas d'erreur et reporter l'emission du message d'erreur a la phase de validation + if not self.isvalid(sd='non') : return + else:self.state='undetermined' + try: + if self.parent: + sd= self.parent.create_sdprod(self,nom) + if type(self.definition.op_init) == types.FunctionType: + apply(self.definition.op_init,(self,self.parent.g_context)) + else: + sd=self.get_sd_prod() + # On n'utilise pas self.definition.op_init car self.parent + # n'existe pas + if sd != None and self.reuse == None: + # On ne nomme le concept que dans le cas de non reutilisation + # d un concept + sd.nom=nom + if self.jdc and self.jdc.par_lot == "NON" : + self.Execute() + return sd + except AsException,e: + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1],e) + except EOFError: + # XXX Normalement le contexte courant doit etre le parent. + # Il n'y a pas de raison de remettre le contexte au parent + #self.reset_current_step() + raise + except : + l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1]+'\n', + string.join(l)) + + + + + + + + + + + + + + + + + + + + + diff --git a/Ihm/I_EXCLUS.py b/Ihm/I_EXCLUS.py index e53ead8e..844d61f0 100644 --- a/Ihm/I_EXCLUS.py +++ b/Ihm/I_EXCLUS.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ @@ -13,7 +32,8 @@ class EXCLUS(I_REGLE.REGLE): if not regle_active : return liste_a_purger for mc in self.mcs: - if mc in liste_a_purger: + # Il ne faut pas purger un mot cle present. Sa cardinalite est verifiee par ailleurs + if mc in liste_a_purger and mc not in liste_mc_presents: liste_a_purger.remove(mc) return liste_a_purger diff --git a/Ihm/I_FONCTION.py b/Ihm/I_FONCTION.py new file mode 100644 index 00000000..b708dee6 --- /dev/null +++ b/Ihm/I_FONCTION.py @@ -0,0 +1,41 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +from I_ASSD import ASSD + +class FONCTION(ASSD): + def __init__(self,etape=None,sd=None,reg='oui'): + #ASSD.__init__(self,etape=etape,sd=sd,reg=reg) + if reg=='oui': + self.jdc.register_fonction(self) + + def get_formule(self): + """ + Retourne une formule décrivant self sous la forme d'un tuple : + (nom,type_retourne,arguments,corps) + """ + if hasattr(self.etape,'get_formule'): + # on est dans le cas d'une formule Aster + return self.etape.get_formule() + else: + # on est dans le cas d'une fonction + return (self.nom,'REEL','(REEL:x)','''bidon''') + +class fonction(FONCTION) : pass + diff --git a/Ihm/I_FORM_ETAPE.py b/Ihm/I_FORM_ETAPE.py index 51100165..80689be4 100644 --- a/Ihm/I_FORM_ETAPE.py +++ b/Ihm/I_FORM_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ import string,traceback @@ -56,6 +75,15 @@ class FORM_ETAPE(MACRO_ETAPE): else: return '' + def get_formule(self): + """ + Retourne un tuple décrivant la formule : + (nom,type_retourne,arguments,corps) + """ + t,a,c = self.analyse_formule() + n = self.get_nom() + return (n,t,a,c) + def verif_arguments(self,arguments = None): """ Vérifie si les arguments passés en argument (si aucun prend les arguments courants) diff --git a/Ihm/I_JDC.py b/Ihm/I_JDC.py index 2c26ab8e..125fb617 100644 --- a/Ihm/I_JDC.py +++ b/Ihm/I_JDC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -6,9 +25,8 @@ import string,linecache # Modules Eficas import I_OBJECT -from Noyau.N_ASSD import assd +from Noyau.N_ASSD import ASSD from Noyau.N_ETAPE import ETAPE -from Noyau.N_CO import CO from Noyau.N_Exception import AsException from Extensions import commentaire,parametre,parametre_eval @@ -21,6 +39,7 @@ class JDC(I_OBJECT.OBJECT): self.niveau=self self.params=[] self.fonctions=[] + self._etape_context=None def get_cmd(self,nomcmd): """ @@ -38,20 +57,32 @@ class JDC(I_OBJECT.OBJECT): l=[] for k,v in d.items(): if type(v) != types.InstanceType : continue - if assd in types_permis or CO in types_permis : - l.append(k) - continue - for type_ok in types_permis: - if type_ok in ('R','I','C','TXM') and v in self.params : l.append(k) - elif type_ok == 'R' and v.__class__.__name__ == 'reel' : l.append(k) - elif type_ok == 'I' and v.__class__.__name__ == 'entier' : l.append(k) - elif type_ok == 'C' and v.__class__.__name__ == 'complexe' : l.append(k) - elif type_ok == 'TXM' and v.__class__.__name__ == 'chaine' : l.append(k) - elif type(type_ok) != types.ClassType : continue - elif v.__class__ == type_ok or issubclass(v.__class__,type_ok): l.append(k) + # On considère que seul assd indique un type quelconque pas CO + elif self.assd in types_permis : + l.append(k) + elif self.est_permis(v,types_permis): + l.append(k) l.sort() return l + def est_permis(self,v,types_permis): + for type_ok in types_permis: + if type_ok in ('R','I','C','TXM') and v in self.params : + return 1 + elif type_ok == 'R' and v.__class__.__name__ == 'reel' : + return 1 + elif type_ok == 'I' and v.__class__.__name__ == 'entier' : + return 1 + elif type_ok == 'C' and v.__class__.__name__ == 'complexe' : + return 1 + elif type_ok == 'TXM' and v.__class__.__name__ == 'chaine' : + return 1 + elif type(type_ok) != types.ClassType : + continue + elif v.__class__ == type_ok or issubclass(v.__class__,type_ok): + return 1 + return 0 + def addentite(self,name,pos): """ Ajoute une entite : @@ -83,6 +114,7 @@ class JDC(I_OBJECT.OBJECT): if pos == None : pos = 0 self.etapes.insert(pos,objet) self.editmode=0 + self.reset_context() self.active_etapes() return objet elif name == "PARAMETRE_EVAL": @@ -93,6 +125,7 @@ class JDC(I_OBJECT.OBJECT): if pos == None : pos = 0 self.etapes.insert(pos,objet) self.editmode=0 + self.reset_context() self.active_etapes() return objet elif type(name)==types.InstanceType: @@ -100,10 +133,8 @@ class JDC(I_OBJECT.OBJECT): # existante (par copie donc) # on est donc nécessairement en mode editeur ... objet = name - objet.jdc = objet.parent = self - #XXX current_step n'existe plus. A priori le parent devrait etre self - # ainsi que le step courant. - #objet.parent = self.current_step + # Il ne faut pas oublier de reaffecter le parent d'obj (si copie) + objet.reparent(self) self.set_current_step() if isinstance(objet,ETAPE): if objet.nom_niveau_definition == 'JDC': @@ -115,8 +146,12 @@ class JDC(I_OBJECT.OBJECT): objet.parent.dict_niveaux[objet.nom_niveau_definition].register(objet) objet.niveau = objet.parent.dict_niveaux[objet.nom_niveau_definition] self.etapes.insert(pos,objet) + # il faut vérifier que les concepts utilisés par objet existent bien + # à ce niveau d'arborescence + objet.verif_existence_sd() self.active_etapes() self.editmode=0 + self.reset_context() return objet else : # On veut ajouter une nouvelle commande @@ -125,11 +160,13 @@ class JDC(I_OBJECT.OBJECT): cmd=self.get_cmd(name) # L'appel a make_objet n'a pas pour effet d'enregistrer l'étape # auprès du step courant car editmode vaut 1 + # Par contre elle a le bon parent grace a set_current_step e=cmd.make_objet() if pos == None : pos = 0 self.etapes.insert(pos,e) self.reset_current_step() self.editmode=0 + self.reset_context() self.active_etapes() return e except: @@ -151,13 +188,15 @@ class JDC(I_OBJECT.OBJECT): def get_sd_avant_etape(self,nom_sd,etape): return self.get_contexte_avant(etape).get(nom_sd,None) - def get_sd_apres_etape(self,nom_sd,etape): + def get_sd_apres_etape(self,nom_sd,etape,avec='non'): """ Cette méthode retourne la SD de nom nom_sd qui est éventuellement - définie apres etape + définie apres etape + Si avec vaut 'non' exclut etape de la recherche """ ietap=self.etapes.index(etape) - for e in self.etapes[ietap+1:]: + if avec == 'non':ietap=ietap+1 + for e in self.etapes[ietap:]: sd=e.get_sdprods(nom_sd) if sd: if hasattr(e,'reuse'): @@ -165,16 +204,17 @@ class JDC(I_OBJECT.OBJECT): return sd return None - def get_sd_autour_etape(self,nom_sd,etape): + def get_sd_autour_etape(self,nom_sd,etape,avec='non'): """ Fonction: retourne la SD de nom nom_sd qui est éventuellement définie avant ou apres etape Permet de vérifier si un concept de meme nom existe dans le périmètre d'une étape + Si avec vaut 'non' exclut etape de la recherche """ sd=self.get_sd_avant_etape(nom_sd,etape) if sd:return sd - return self.get_sd_apres_etape(nom_sd,etape) + return self.get_sd_apres_etape(nom_sd,etape,avec) def active_etapes(self): """ @@ -267,6 +307,12 @@ class JDC(I_OBJECT.OBJECT): """ self.params.append(param) + def register_fonction(self,fonction): + """ + Cette méthode sert à ajouter une fonction dans la liste des fonctions + """ + self.fonctions.append(fonction) + def delete_param(self,param): """ Supprime le paramètre param de la liste des paramètres @@ -297,6 +343,14 @@ class JDC(I_OBJECT.OBJECT): nom = form.nom if not nom : continue if d.has_key(nom): l_fonctions.append(form.get_formule()) + + # on ajoute les concepts produits par DEFI_VALEUR + # XXX On pourrait peut etre faire plutot le test sur le type + # de concept : entier, reel, complexe, etc. + for k,v in d.items(): + if hasattr(v,'etape') and v.etape.nom in ('DEFI_VALEUR',): + l_constantes.append(k) + # on retourne les deux listes return l_constantes,l_fonctions @@ -373,3 +427,69 @@ class JDC(I_OBJECT.OBJECT): linecache.cache[file]=0,0,string.split(text,'\n'),file return file,text + + def get_genealogie(self): + """ + Retourne la liste des noms des ascendants de l'objet self + jusqu'à la première ETAPE parent. + """ + return [] + + def NommerSdprod(self,sd,sdnom): + """ + Nomme la SD apres avoir verifie que le nommage est possible : nom + non utilise + Si le nom est deja utilise, leve une exception + Met le concept créé dans le concept global g_context + """ + # XXX En mode editeur dans EFICAS, le nommage doit etre géré différemment + # Le dictionnaire g_context ne représente pas le contexte + # effectif avant une étape. + # Il faut utiliser get_contexte_avant avec une indication de l'étape + # traitée. Pour le moment, il n'y a pas de moyen de le faire : ajouter + # un attribut dans le JDC ??? + if CONTEXT.debug : print "JDC.NommerSdprod ",sd,sdnom + if self._etape_context: + o=self.get_contexte_avant(self._etape_context).get(sdnom,None) + else: + o=self.g_context.get(sdnom,None) + if isinstance(o,ASSD): + raise AsException("Nom de concept deja defini : %s" % sdnom) + + # ATTENTION : Il ne faut pas ajouter sd dans sds car il s y trouve deja. + # Ajoute a la creation (appel de reg_sd). + self.g_context[sdnom]=sd + sd.nom=sdnom + + def set_etape_context(self,etape): + """ + Positionne l'etape qui sera utilisee dans NommerSdProd pour + decider si le concept passé pourra etre nommé + """ + self._etape_context=etape + + def reset_context(self): + """ + Cette methode reinitialise le contexte glissant pour pouvoir + tenir compte des modifications de l'utilisateur : création + de commandes, nommage de concepts, etc. + """ + self.current_context={} + self.index_etape_courante=0 + + def del_param(self,param): + """ + Supprime le paramètre param de la liste des paramètres + et du contexte gobal + """ + if param in self.params : self.params.remove(param) + if self.g_context.has_key(param.nom) : del self.g_context[param.nom] + + def del_fonction(self,fonction): + """ + Supprime la fonction fonction de la liste des fonctions + et du contexte gobal + """ + if fonction in self.fonctions : self.fonctions.remove(fonction) + if self.g_context.has_key(fonction.nom) : del self.g_context[fonction.nom] + diff --git a/Ihm/I_JDC_CATA.py b/Ihm/I_JDC_CATA.py index 945ced80..751cacda 100644 --- a/Ihm/I_JDC_CATA.py +++ b/Ihm/I_JDC_CATA.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_JDC_CATA class JDC_CATA: diff --git a/Ihm/I_MACRO_ETAPE.py b/Ihm/I_MACRO_ETAPE.py index be318d25..59ddb8e9 100644 --- a/Ihm/I_MACRO_ETAPE.py +++ b/Ihm/I_MACRO_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -7,10 +26,19 @@ import traceback,types,string import I_ETAPE from Noyau.N_ASSD import ASSD +# import rajoutés suite à l'ajout de Build_sd --> à résorber +import Noyau +from Noyau import N_Exception +from Noyau.N_Exception import AsException +# fin import à résorber + class MACRO_ETAPE(I_ETAPE.ETAPE): def __init__(self): I_ETAPE.ETAPE.__init__(self) + # XXX CCAR : ne suis pas certain que typret doive etre + # initialise à None (a verifier) + self.typret=None def get_sdprods(self,nom_sd): """ @@ -61,6 +89,10 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): context_ini = context_ini, appli=self.jdc.appli) j.analyse() + # XXX en passant par un jdc auxiliaire, on risque de rendre les etapes inactives + # on les force dans l'etat actif + for etape in j.etapes: + etape.active() except: traceback.print_exc() return None @@ -146,3 +178,51 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): # On met g_context à blanc self.g_context={} + def Build_sd(self,nom): + """ + Construit le concept produit de l'opérateur. Deux cas + peuvent se présenter : + + - le parent n'est pas défini. Dans ce cas, l'étape prend en charge + la création et le nommage du concept. + + - le parent est défini. Dans ce cas, l'étape demande au parent la + création et le nommage du concept. + + """ + if not self.isactif():return + # CCAR : meme modification que dans I_ETAPE + if not self.isvalid(sd='non') : return + else:self.state='undetermined' + try: + # On positionne la macro self en tant que current_step pour que les + # étapes créées lors de l'appel à sd_prod et à op_init aient la macro + # comme parent + self.set_current_step() + if self.parent: + sd= self.parent.create_sdprod(self,nom) + if type(self.definition.op_init) == types.FunctionType: + apply(self.definition.op_init,(self,self.parent.g_context)) + else: + sd=self.get_sd_prod() + if sd != None and self.reuse == None: + # On ne nomme le concept que dans le cas de non reutilisation + # d un concept + sd.nom=nom + self.reset_current_step() + if self.jdc and self.jdc.par_lot == "NON" : + self.Execute() + return sd + except AsException,e: + self.reset_current_step() + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1],e) + except EOFError: + #self.reset_current_step() + raise + except : + self.reset_current_step() + l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1]+'\n', + string.join(l)) diff --git a/Ihm/I_MCBLOC.py b/Ihm/I_MCBLOC.py index 7b8281d8..7b548225 100644 --- a/Ihm/I_MCBLOC.py +++ b/Ihm/I_MCBLOC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== import I_MCCOMPO class MCBLOC(I_MCCOMPO.MCCOMPO): def makeobjet(self): diff --git a/Ihm/I_MCCOMPO.py b/Ihm/I_MCCOMPO.py index 24f71cca..8b9c2a80 100644 --- a/Ihm/I_MCCOMPO.py +++ b/Ihm/I_MCCOMPO.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ import string,types @@ -25,24 +44,6 @@ class MCCOMPO(I_OBJECT.OBJECT): else: return self.nom - def get_genealogie(self): - """ - Retourne la liste des noms des ascendants (noms de MCSIMP,MCFACT,MCBLOC - ou ETAPE) de self jusqu'au premier objet etape rencontré - """ - l=[] - objet = self - while objet.definition.label != 'JDC' : - if not objet.isMCList() : - l.append(string.strip(objet.nom)) - else : - pass - # Si objet.etape == etape c'est que objet est l'étape origine de la généalogie - if objet.etape == objet: break - objet = objet.parent - l.reverse() - return l - def get_liste_mc_ordonnee(self,liste,dico): """ Retourne la liste ordonnée (suivant le catalogue) des mots-clés @@ -113,6 +114,20 @@ class MCCOMPO(I_OBJECT.OBJECT): liste.remove(k) if self.definition.entites[k].label=='BLOC': liste.remove(k) + # Pour corriger les exces qui pourraient etre commis dans la methode purge_liste + # des regles, on essaie de compenser comme suit : + # on ajoute les mots cles facteurs presents dont l'occurence n'est pas atteinte + for k in liste_mc_presents: + if k in liste:continue + objet = self.get_child(k,restreint = 'oui') + if isinstance(objet,MCFACT): + # un mot-clé facteur ne peut pas être répété plus de self.max fois + if objet.definition.max > 1: + liste.append(k) + elif isinstance(objet,MCList): + nb_occur_maxi = objet[0].definition.max + if len(objet) < nb_occur_maxi: + liste.append(k) return liste def liste_mc_presents(self): @@ -178,6 +193,7 @@ class MCCOMPO(I_OBJECT.OBJECT): """ self.init_modif() if type(name)==types.StringType : + # on est en mode création d'un motcle if self.ispermis(name) == 0 : return 0 objet=self.definition.entites[name](val=None,nom=name,parent=self) if hasattr(objet.definition,'position'): @@ -186,7 +202,9 @@ class MCCOMPO(I_OBJECT.OBJECT): elif objet.definition.position == 'global_jdc' : self.append_mc_global_jdc(objet) else : + # dans ce cas on est en mode copie d'un motcle objet = name + objet.verif_existence_sd() # si un objet de même nom est déjà présent dans la liste # et si l'objet est répétable # il faut créer une MCList et remplacer l'objet de la liste @@ -219,6 +237,8 @@ class MCCOMPO(I_OBJECT.OBJECT): new_obj.init(objet.nom,self) new_obj.append(old_obj) new_obj.append(objet) + # Il ne faut pas oublier de reaffecter le parent d'obj + objet.reparent(self) self.mc_liste.remove(old_obj) self.mc_liste.insert(index,new_obj) self.fin_modif() @@ -227,12 +247,16 @@ class MCCOMPO(I_OBJECT.OBJECT): # une liste d'objets de même type existe déjà #print "une liste d'objets de même type existe déjà" old_obj.append(objet) + # Il ne faut pas oublier de reaffecter le parent d'obj + objet.reparent(self) self.fin_modif() return old_obj if pos == None : self.mc_liste.append(objet) else : self.mc_liste.insert(pos,objet) + # Il ne faut pas oublier de reaffecter le parent d'obj (si copie) + objet.reparent(self) self.fin_modif() return objet @@ -304,11 +328,18 @@ class MCCOMPO(I_OBJECT.OBJECT): def copy(self): """ Retourne une copie de self """ objet = self.makeobjet() + # FR : attention !!! avec makeobjet, objet a le même parent que self + # ce qui n'est pas du tout bon dans le cas d'une copie !!!!!!! + # FR : peut-on passer par là autrement que dans le cas d'une copie ??? + # FR --> je suppose que non + # XXX CCAR : le pb c'est qu'on vérifie ensuite quel parent avait l'objet + # Il me semble preferable de changer le parent a la fin quand la copie est acceptee objet.valeur = copy(self.valeur) objet.val = copy(self.val) objet.mc_liste=[] for obj in self.mc_liste: new_obj = obj.copy() + new_obj.reparent(objet) objet.mc_liste.append(new_obj) return objet @@ -365,3 +396,20 @@ class MCCOMPO(I_OBJECT.OBJECT): liste_retraits.append(k) return liste_ajouts,liste_retraits + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.get_jdc_root() + self.etape=parent.etape + for mocle in self.mc_liste: + mocle.reparent(self) + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + """ + for motcle in self.mc_liste : + motcle.verif_existence_sd() diff --git a/Ihm/I_MCFACT.py b/Ihm/I_MCFACT.py index 08ab1f16..39670364 100644 --- a/Ihm/I_MCFACT.py +++ b/Ihm/I_MCFACT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== import I_MCCOMPO class MCFACT(I_MCCOMPO.MCCOMPO): def isrepetable(self): diff --git a/Ihm/I_MCLIST.py b/Ihm/I_MCLIST.py index c08a3834..e8782dff 100644 --- a/Ihm/I_MCLIST.py +++ b/Ihm/I_MCLIST.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from copy import copy class MCList: @@ -28,9 +47,13 @@ class MCList: return 0 def isoblig(self): - for i in self.data: - if i.isoblig():return 1 - return 0 + """ + Une MCList n'est jamais obligatoire (même si le MCFACT qu'elle représente l'est + """ + return 0 + #for i in self.data: + # if i.isoblig():return 1 + #return 0 def liste_mc_presents(self): return [] @@ -49,11 +72,17 @@ class MCList: child.delete_concept(sd) def copy(self): + """ + Réalise la copie d'une MCList + """ liste = self.data[0].definition.list_instance() - # XXX Pas de parent ?? - liste.init(self.nom) + # FR -->Il faut spécifier un parent pour la méthode init qui attend 2 arguments ... + liste.init(self.nom,self.parent) for objet in self: new_obj = objet.copy() + # Pour etre coherent avec le constructeur de mots cles facteurs N_FACT.__call__ + # dans lequel le parent de l'element d'une MCList est le parent de la MCList + new_obj.reparent(self.parent) liste.append(new_obj) return liste @@ -93,3 +122,72 @@ class MCList: # Sans objet pour une liste de mots clés facteurs return [],[] + def init_modif(self): + """ + Met l'état de l'objet à modified et propage au parent + qui vaut None s'il n'existe pas + """ + self.state = 'modified' + if self.parent: + self.parent.init_modif() + + def get_etape(self): + """ + Retourne l'étape à laquelle appartient self + Un objet de la catégorie etape doit retourner self pour indiquer que + l'étape a été trouvée + XXX double emploi avec self.etape ??? + """ + if self.parent == None: return None + return self.parent.get_etape() + + def get_genealogie(self): + """ + Retourne la liste des noms des ascendants. + Un objet MCList n'est pas enregistré dans la genealogie. + XXX Meme si le MCFACT fils ne l'est pas lui non plus ???? + """ + if self.parent: + return self.parent.get_genealogie() + else: + return [] + + def get_liste_mc_ordonnee_brute(self,liste,dico): + """ + Retourne la liste ordonnée (suivant le catalogue) BRUTE des mots-clés + d'une entité composée dont le chemin complet est donné sous forme + d'une liste du type :ETAPE + MCFACT ou MCBLOC + ... + """ + for arg in liste: + objet_cata = dico[arg] + dico=objet_cata.dico + return objet_cata.liste + + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.jdc + self.etape=parent.etape + for mcfact in self.data: + mcfact.reparent(parent) + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + """ + for motcle in self.data : + motcle.verif_existence_sd() + + def get_sd_utilisees(self): + """ + Retourne la liste des concepts qui sont utilisés à l'intérieur de self + ( comme valorisation d'un MCS) + """ + l=[] + for motcle in self.data: + l.extend(motcle.get_sd_utilisees()) + return l + diff --git a/Ihm/I_MCSIMP.py b/Ihm/I_MCSIMP.py index 96fe6ccd..4fa441de 100644 --- a/Ihm/I_MCSIMP.py +++ b/Ihm/I_MCSIMP.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== import types,string import traceback from copy import copy @@ -7,10 +26,21 @@ myrepr.maxstring = 100 myrepr.maxother = 100 from Noyau.N_utils import repr_float + +# Attention : les classes ASSD,.... peuvent etre surchargées +# dans le package Accas. Il faut donc prendre des précautions si +# on utilise les classes du Noyau pour faire des tests (isxxxx, ...) +# Si on veut créer des objets comme des CO avec les classes du noyau +# ils n'auront pas les conportements des autres packages (pb!!!) +# Il vaut mieux les importer d'Accas mais problème d'import circulaire, +# on ne peut pas les importer au début. +# On fait donc un import local quand c'est nécessaire (peut occasionner +# des pbs de prformance). from Noyau.N_ASSD import ASSD,assd from Noyau.N_GEOM import GEOM,geom from Noyau.N_CO import CO -from Noyau.N_EVAL import EVAL +# fin attention + from Extensions import parametre import I_OBJECT @@ -82,7 +112,8 @@ class MCSIMP(I_OBJECT.OBJECT): """ for typ in self.definition.type: if type(typ) == types.ClassType : - if typ is CO : return 1 + if issubclass(typ,CO) : + return 1 return 0 def wait_assd(self): @@ -104,7 +135,7 @@ class MCSIMP(I_OBJECT.OBJECT): """ for typ in self.definition.type: if type(typ) == types.ClassType : - if typ in (GEOM,ASSD,geom,assd) or issubclass(typ,GEOM) : + if typ.__name__ in ("GEOM","ASSD","geom","assd") or issubclass(typ,GEOM) : return 1 return 0 @@ -165,6 +196,8 @@ class MCSIMP(I_OBJECT.OBJECT): # type de nom new_valeur if self.wait_co(): try: + # Pour avoir la classe CO avec tous ses comportements + from Accas import CO self.valeur=CO(new_valeur) except: traceback.print_exc() @@ -204,6 +237,8 @@ class MCSIMP(I_OBJECT.OBJECT): return sd,1 else: d={} + # On veut EVAL avec tous ses comportements. On utilise Accas. Perfs ?? + from Accas import EVAL d['EVAL']=EVAL try : objet = eval(new_valeur,d) @@ -238,9 +273,13 @@ class MCSIMP(I_OBJECT.OBJECT): def copy(self): """ Retourne une copie de self """ objet = self.makeobjet() - #XXX est ce utile ?? - objet.valeur = copy(self.valeur) - objet.val = copy(self.val) + # il faut copier les listes et les tuples mais pas les autres valeurs + # possibles (réel,SD,...) + if type(self.valeur) in (types.ListType,types.TupleType): + objet.valeur = copy(self.valeur) + else: + objet.valeur = self.valeur + objet.val = objet.valeur return objet def makeobjet(self): @@ -257,3 +296,100 @@ class MCSIMP(I_OBJECT.OBJECT): if issubclass(self.valeur.__class__,ASSD) : l.append(self.valeur) return l + + def set_valeur_co(self,nom_co): + """ + Affecte à self l'objet de type CO et de nom nom_co + """ + step=self.etape.parent + if nom_co == None or nom_co == '': + new_objet=None + else: + # Pour le moment on importe en local le CO de Accas. + # Si problème de perfs, il faudra faire autrement + from Accas import CO + # Avant de créer un concept il faut s'assurer du contexte : step + # courant + sd= step.get_sd_autour_etape(nom_co,self.etape,avec='oui') + if sd: + # Si un concept du meme nom existe deja dans la portée de l'étape + # on ne crée pas le concept + return 0,"un concept de meme nom existe deja" + # Il n'existe pas de concept de meme nom. On peut donc le créer + # Il faut néanmoins que la méthode NommerSdProd de step gère les + # contextes en mode editeur + # Normalement la méthode du Noyau doit etre surchargée + # On déclare l'étape du mot clé comme etape courante pour NommerSdprod + cs= CONTEXT.get_current_step() + CONTEXT.unset_current_step() + CONTEXT.set_current_step(step) + step.set_etape_context(self.etape) + new_objet = CO(nom_co) + CONTEXT.unset_current_step() + CONTEXT.set_current_step(cs) + self.valeur = new_objet + self.val = new_objet + self.init_modif() + step.reset_context() + # On force l'enregistrement de new_objet en tant que concept produit + # de la macro en appelant get_type_produit avec force=1 + self.etape.get_type_produit(force=1) + return 1,"Concept créé" + + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.jdc + self.etape=parent.etape + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + """ + l_sd_avant_etape = self.jdc.get_contexte_avant(self.etape).values() + if type(self.valeur) in (types.TupleType,types.ListType) : + l=[] + for sd in self.valeur: + if isinstance(sd,ASSD) : + if sd in l_sd_avant_etape : + l.append(sd) + else: + l.append(sd) + self.valeur=l + self.init_modif() + else: + if isinstance(self.valeur,ASSD) : + if self.valeur not in l_sd_avant_etape : + self.valeur = None + self.init_modif() + + + def get_min_max(self): + """ + Retourne les valeurs min et max admissibles pour la valeur de self + """ + return self.definition.min,self.definition.max + + + def get_type(self): + """ + Retourne le type attendu par le mot-clé simple + """ + return self.definition.type + + + + + + + + + + + + + + diff --git a/Ihm/I_OBJECT.py b/Ihm/I_OBJECT.py index 559ebcd5..ee6a848d 100644 --- a/Ihm/I_OBJECT.py +++ b/Ihm/I_OBJECT.py @@ -1,7 +1,32 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ +import string + +import Noyau class OBJECT: + from Noyau.N_CO import CO + from Noyau.N_ASSD import assd + def isMCList(self): """ Retourne 1 si self est une MCList (liste de mots-clés), @@ -80,4 +105,23 @@ class OBJECT: """ return [],[] + def get_genealogie(self): + """ + Retourne la liste des noms des ascendants (noms de MCSIMP,MCFACT,MCBLOC + ou ETAPE) de self jusqu'au premier objet etape rencontré + """ + if self.parent: + l=self.parent.get_genealogie() + l.append(string.strip(self.nom)) + return l + else: + return [string.strip(self.nom)] + + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.jdc + diff --git a/Ihm/I_PRESENT_ABSENT.py b/Ihm/I_PRESENT_ABSENT.py index 5ddd4a80..796d777a 100644 --- a/Ihm/I_PRESENT_ABSENT.py +++ b/Ihm/I_PRESENT_ABSENT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ @@ -9,8 +28,9 @@ class PRESENT_ABSENT(I_REGLE.REGLE): if self.mcs[0] in liste_mc_presents:regle_active=1 if not regle_active : return liste_a_purger - for mc in self.mcs: - if mc in liste_a_purger: + # Il ne faut pas purger le mot cle present + for mc in self.mcs[1:]: + if mc in liste_a_purger : liste_a_purger.remove(mc) return liste_a_purger diff --git a/Ihm/I_PRESENT_PRESENT.py b/Ihm/I_PRESENT_PRESENT.py index e6a841e3..fbd6f681 100644 --- a/Ihm/I_PRESENT_PRESENT.py +++ b/Ihm/I_PRESENT_PRESENT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ diff --git a/Ihm/I_PROC_ETAPE.py b/Ihm/I_PROC_ETAPE.py index ddfdabeb..81d6c810 100644 --- a/Ihm/I_PROC_ETAPE.py +++ b/Ihm/I_PROC_ETAPE.py @@ -1,4 +1,32 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== import I_ETAPE + + +# import rajoutés suite à l'ajout de Build_sd --> à résorber +import traceback,types +import Noyau +from Noyau import N_Exception +from Noyau.N_Exception import AsException +# fin import à résorber + class PROC_ETAPE(I_ETAPE.ETAPE): def get_sdname(self): return "" @@ -24,3 +52,30 @@ class PROC_ETAPE(I_ETAPE.ETAPE): for child in self.mc_liste : child.delete_concept(sd) + def Build_sd(self): + """ + Cette methode applique la fonction op_init au contexte du parent + et lance l'exécution en cas de traitement commande par commande + Elle doit retourner le concept produit qui pour une PROC est toujours None + En cas d'erreur, elle leve une exception : AsException ou EOFError + """ + if not self.isactif():return + try: + if self.parent: + if type(self.definition.op_init) == types.FunctionType: + apply(self.definition.op_init,(self,self.parent.g_context)) + else: + pass + if self.jdc.par_lot == "NON" : + self.Execute() + except AsException,e: + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1],e) + except EOFError: + self.reset_current_step() + raise + except : + l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1]+'\n', + string.join(l)) diff --git a/Ihm/I_REGLE.py b/Ihm/I_REGLE.py index 1ff738f3..52a0c47a 100644 --- a/Ihm/I_REGLE.py +++ b/Ihm/I_REGLE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ import string diff --git a/Ihm/I_UN_PARMI.py b/Ihm/I_UN_PARMI.py index a600514d..bd1ef701 100644 --- a/Ihm/I_UN_PARMI.py +++ b/Ihm/I_UN_PARMI.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ @@ -14,8 +33,9 @@ class UN_PARMI(I_REGLE.REGLE): if not regle_active : return liste_a_purger # Si un des mots clés est présent, on les enlève tous + # sauf celui ci for mc in self.mcs: - if mc in liste_a_purger: + if mc in liste_a_purger and mc not in liste_mc_presents: liste_a_purger.remove(mc) return liste_a_purger diff --git a/Ihm/__init__.py b/Ihm/__init__.py index a2c6164b..f12fbf81 100644 --- a/Ihm/__init__.py +++ b/Ihm/__init__.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce package contient les fonctionnalités supplémentaires nécessaires pour l'éditeur graphique EFICAS diff --git a/Minicode/cata_saturne.py b/Minicode/cata_saturne.py index 40975a2d..4c742a6a 100755 --- a/Minicode/cata_saturne.py +++ b/Minicode/cata_saturne.py @@ -3,6 +3,8 @@ import Accas from Accas import * +#CONTEXT.debug=1 + import ops JdC = JDC_CATA(code='SATURNE', @@ -11,13 +13,21 @@ JdC = JDC_CATA(code='SATURNE', AU_MOINS_UN('FIN'), A_CLASSER(('DEBUT','POURSUITE'),'FIN') ) - ); + ) # P. RASCLE MMN # remarques diverses sur le catalogue Saturne # - dans les blocs, il faut au moins un mot clé de statut obligatoire # probleme de rafraichissement des blocs dépendants quand la valeur d'un mot cle global (ITURB) passe de 1 à 0 +# Type le plus general +class entier (ASSD):pass +class reel (ASSD):pass +class complexe(ASSD):pass +class liste (ASSD):pass +class chaine (ASSD):pass + + class sonde(ASSD):pass class varsca(ASSD):pass class flusca(ASSD):pass @@ -36,7 +46,35 @@ class tsr23(ASSD):pass class resti(ASSD):pass class maillage(ASSD):pass -class listr8 (ASSD):pass +class modele(ASSD):pass +class matr_asse(ASSD):pass +class cham_elem_sief_r(ASSD):pass +class theta_geom(ASSD):pass +class cham_mater(ASSD):pass +class cara_elem(ASSD):pass +class char_ther(ASSD):pass +class char_meca(ASSD):pass +class nume_ddl(ASSD):pass +class char_acou(ASSD):pass +class listr8 (ASSD):pass +class matr_elem(ASSD):pass +class matr_elem_depl_c(matr_elem):pass +class matr_elem_depl_r(matr_elem):pass +class matr_elem_pres_c(matr_elem):pass +class matr_elem_temp_r(matr_elem):pass + +# matr_asse : +#-------------------------------- +class matr_asse(ASSD):pass +class matr_asse_depl_c(matr_asse):pass +class matr_asse_depl_r(matr_asse):pass +class matr_asse_gene_r(matr_asse):pass +class matr_asse_gene_c(matr_asse):pass +class matr_asse_pres_c(matr_asse):pass +class matr_asse_pres_r(matr_asse):pass +class matr_asse_temp_c(matr_asse):pass +class matr_asse_temp_r(matr_asse):pass + # fin entete @@ -101,6 +139,33 @@ FORMULE = FORM( nom='FORMULE',op=-5,sd_prod=fonction, COMPLEXE = SIMP(typ = 'shell',max=1), ) ; +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=modele,docu="U4.41.01-f1", + fr="Affectation des éléments finis sur le maillage",reentrant='n', + MAILLAGE =SIMP(statut='o',typ=(maillage) ), + INFO =SIMP(statut='f',typ='I',defaut=1,into=(1,2) ), + VERIF =SIMP(statut='f',typ='TXM',max=2,into=("MAILLE","NOEUD") ), + ); +NUME_DDL=OPER(nom="NUME_DDL",op=11,sd_prod=nume_ddl,docu="U4.61.11-f",reentrant='n', + fr="Etablissement de la numérotation des ddl avec ou sans renumérotation et du stockage de la matrice", + MATR_RIGI =SIMP(statut='f',typ=(matr_elem_depl_r ,matr_elem_depl_c, + matr_elem_temp_r,matr_elem_pres_c),max=100 ), + MODELE =SIMP(statut='f',typ=modele ), + b_modele =BLOC(condition = "MODELE != None", + CHARGE =SIMP(statut='f',max='**',typ=(char_meca,char_ther,char_acou, ),), + ), + METHODE =SIMP(statut='f',typ='TXM',defaut="MULT_FRONT",into=("MULT_FRONT","LDLT","GCPC") ), + b_mult_front =BLOC(condition="METHODE=='MULT_FRONT'",fr="paramètres associés à la méthode multifrontale", + RENUM =SIMP(statut='f',typ='TXM',into=("MD","MDA","METIS"),defaut="METIS" ), + ), + b_ldlt =BLOC(condition="METHODE=='LDLT'",fr="paramètres associés à la méthode LDLT", + RENUM =SIMP(statut='f',typ='TXM',into=("RCMK","SANS"),defaut="RCMK" ), + ), + b_gcpc =BLOC(condition="METHODE=='GCPC'",fr="paramètres associés à la méthode gradient conjugué", + RENUM =SIMP(statut='f',typ='TXM',into=("RCMK","SANS"),defaut="RCMK" ), + ), + INFO =SIMP(statut='f',typ='I',into=(1,2)), +) ; + DEFI_SONDE = OPER(nom="DEFI_SONDE",op= 1,sd_prod=sonde, docu="U2D1", fr="définition d'une sonde historique avec ses coordonnées", @@ -1229,3 +1294,258 @@ FIN=PROC(nom="FIN",op=9999,repetable='n',fr="Fin d'une ) ; +def macro_matr_asse_ops(self,MODELE,CHAM_MATER,CARA_ELEM,MATR_ASSE, + SOLVEUR,NUME_DDL,CHARGE,INST,**args): + """ + Ecriture de la macro MACRO_MATR_ASSE + """ + ier=0 + # On met le mot cle NUME_DDL dans une variable locale pour le proteger + numeddl=NUME_DDL + # On importe les definitions des commandes a utiliser dans la macro + # Le nom de la variable doit etre obligatoirement le nom de la commande + CALC_MATR_ELEM=self.get_cmd('CALC_MATR_ELEM') + NUME_DDL =self.get_cmd('NUME_DDL') + ASSE_MATRICE =self.get_cmd('ASSE_MATRICE') + # La macro compte pour 1 dans la numerotation des commandes + self.icmd=1 + + if SOLVEUR: + methode=SOLVEUR['METHODE'] + if methode=='LDLT': + if SOLVEUR['RENUM']: + renum=SOLVEUR['RENUM'] + else: + renum='RCMK' + if renum not in ('SANS','RCMK'): + ier=ier+1 + self.cr.fatal("Avec methode LDLT, RENUM doit etre SANS ou RCMK.") + return ier + elif methode=='MULT_FRONT': + if SOLVEUR['RENUM']: + renum=SOLVEUR['RENUM'] + else: + renum='MDA' + if renum not in ('MDA','MD','METIS'): + ier=ier+1 + self.cr.fatal("Avec methode MULT_FRONT, RENUM doit etre MDA, MD ou RCMK.") + return ier + elif methode=='GCPC': + if SOLVEUR['RENUM']: + renum=SOLVEUR['RENUM'] + else: + renum='SANS' + if renum not in ('SANS','RCMK'): + ier=ier+1 + self.cr.fatal("Avec methode GCPC, RENUM doit etre SANS ou RCMK.") + return ier + else: + methode='MULT_FRONT' + renum ='MDA' + + if numeddl in self.sdprods: + # Si le concept numeddl est dans self.sdprods + # il doit etre produit par la macro + # il faudra donc appeler la commande NUME_DDL + lnume = 1 + else: + lnume = 0 + lrigel = 0 + lmasel = 0 + + iocc=0 + for m in MATR_ASSE: + iocc=iocc+1 + option=m['OPTION'] + if iocc == 1 and lnume == 1 and option not in ('RIGI_MECA','RIGI_MECA_LAGR', + 'RIGI_THER','RIGI_ACOU') : + ier=ier+1 + self.cr.fatal("LA PREMIERE OPTION DOIT ETRE RIGI_MECA OU RIGI_THER OU RIGI_ACOU OU RIGI_MECA_LAGR") + return ier + + if m['SIEF_ELGA']!=None and option!='RIGI_GEOM': + ier=ier+1 + self.cr.fatal("SIEF_ELGA N EST ADMIS QU AVEC L OPTION RIGI_GEOM") + return ier + + if m['MODE_FOURIER']!=None and option not in ('RIGI_MECA','RIGI_FLUI_STRU','RIGI_THER'): + ier=ier+1 + self.cr.fatal("MODE_FOURIER N EST ADMIS QU AVEC UNE DES OPTIONS RIGI_MECA RIGI_FLUI_STRU RIGI_THER") + return ier + + if (m['THETA']!=None or m['PROPAGATION']!=None) and option!='RIGI_MECA_LAGR': + ier=ier+1 + self.cr.fatal("PROPAGATION ET,OU THETA NE SONT ADMIS QU AVEC L OPTION RIGI_MECA_LAGR") + return ier + motscles={'OPTION':option} + if option == 'AMOR_MECA': + if (not lrigel or not lmasel): + ier=ier+1 + self.cr.fatal("""POUR CALCULER AMOR_MECA, IL FAUT AVOIR CALCULE + RIGI_MECA ET MASS_MECA AUPARAVANT (DANS LE MEME APPEL)""") + return ier + if CHAM_MATER != None: + motscles['RIGI_MECA'] =rigel + motscles['MASS_MECA'] =masel + if CHARGE != None: + if option[0:9] not in ('MASS_THER','RIGI_GEOM','MASS_ID_M'): + motscles['CHARGE'] =CHARGE + if CHAM_MATER != None: motscles['CHAM_MATER'] =CHAM_MATER + if CARA_ELEM != None: motscles['CARA_ELEM'] =CARA_ELEM + if INST != None: motscles['INST'] =INST + if m['SIEF_ELGA'] : motscles['SIEF_ELGA'] =m['SIEF_ELGA'] + if m['MODE_FOURIER']: motscles['MODE_FOURIER']=m['MODE_FOURIER'] + if m['THETA'] : motscles['THETA'] =m['THETA'] + if m['PROPAGATION'] : motscles['PROPAGATION'] =m['PROPAGATION'] + __a=CALC_MATR_ELEM(MODELE=MODELE,**motscles) + + if option == 'RIGI_MECA': + rigel = __a + lrigel = 1 + if option == 'MASS_MECA': + masel = __a + lmasel = 1 + + if lnume and option in ('RIGI_MECA','RIGI_THER','RIGI_ACOU','RIGI_MECA_LAGR'): + self.DeclareOut('num',numeddl) + # On peut passer des mots cles egaux a None. Ils sont ignores + num=NUME_DDL(MATR_RIGI=__a,METHODE=methode,RENUM=renum) + else: + num=numeddl + + self.DeclareOut('mm',m['MATRICE']) + mm=ASSE_MATRICE(MATR_ELEM=__a,NUME_DDL=num) + return ier + +def macro_matr_asse_prod(self,NUME_DDL,MATR_ASSE,**args): + if not MATR_ASSE: raise AsException("Impossible de typer les concepts resultats") + if not NUME_DDL: raise AsException("Impossible de typer les concepts resultats") + self.type_sdprod(NUME_DDL,nume_ddl) + for m in MATR_ASSE: + opti=m['OPTION'] + + if opti in ( "RIGI_MECA","RIGI_FLUI_STRU","RIGI_MECA_LAGR" , + "MASS_MECA" , "MASS_FLUI_STRU" ,"RIGI_GEOM" ,"RIGI_ROTA", + "AMOR_MECA","IMPE_MECA","MASS_ID_MDEP_R","MASS_ID_MDNS_R", + "ONDE_FLUI","MASS_MECA_DIAG" ) : t=matr_asse_depl_r + + if opti in ( "RIGI_ACOU","MASS_ACOU","AMOR_ACOU",) : t=matr_asse_pres_c + + if opti in ( "RIGI_THER","MASS_THER","RIGI_THER_CONV" , + "RIGI_THER_CONV_D","MASS_ID_MTEM_R","MASS_ID_MTNS_R",) : t=matr_asse_temp_r + + if opti == "RIGI_MECA_HYST" : t= matr_asse_depl_c + + self.type_sdprod(m['MATRICE'],t) + return None + +MACRO_MATR_ASSE=MACRO(nom="MACRO_MATR_ASSE",op=macro_matr_asse_ops,docu="U4.61.21-c", + sd_prod=macro_matr_asse_prod, + fr="Calcul des matrices assemblées (matr_asse_gd) par exemple de rigidité, de masse ", + MODELE =SIMP(statut='o',typ=modele), + CHAM_MATER =SIMP(statut='f',typ=cham_mater), + CARA_ELEM =SIMP(statut='f',typ=cara_elem), + CHARGE =SIMP(statut='f',typ=(char_meca,char_ther,char_acou)), + INST =SIMP(statut='f',typ='R'), + NUME_DDL =SIMP(statut='o',typ=(nume_ddl,CO)), + SOLVEUR =FACT(statut='d',min=01,max=01, + METHODE =SIMP(statut='f',typ='TXM',defaut="MULT_FRONT", + into=("LDLT","MULT_FRONT","GCPC")), + RENUM =SIMP(statut='f',typ='TXM',into=("SANS","RCMK","MD","MDA","METIS")), + ), + MATR_ASSE =FACT(statut='o',min=01,max='**', + MATRICE =SIMP(statut='o',typ=(matr_asse,CO)), + OPTION =SIMP(statut='o',typ='TXM', + into=("RIGI_MECA","MASS_MECA","MASS_MECA_DIAG", + "AMOR_MECA","RIGI_MECA_HYST","IMPE_MECA", + "ONDE_FLUI","RIGI_FLUI_STRU","MASS_FLUI_STRU", + "RIGI_ROTA","RIGI_GEOM","RIGI_MECA_LAGR", + "RIGI_THER","MASS_THER", + "RIGI_ACOU","MASS_ACOU","AMOR_ACOU", + "MASS_ID_MTEM_R","MASS_ID_MTNS_R","MASS_ID_MDEP_R","MASS_ID_MDNS_R",) + ), + SIEF_ELGA =SIMP(statut='f',typ=cham_elem_sief_r), + MODE_FOURIER =SIMP(statut='f',typ='I'), + THETA =SIMP(statut='f',typ=theta_geom), + PROPAGATION =SIMP(statut='f',typ='R'), + ), + TITRE =SIMP(statut='f',typ='TXM',max='**'), + INFO =SIMP(statut='f',typ='I',defaut=1,into=(1,2)), +) ; + + +def defi_valeur_prod(self,IS=None,R8=None,TX=None,C8=None,LS=None): + if IS != None : return entier + if R8 != None : return reel + if TX != None : return chaine + if C8 != None : return complexe + if LS != None : return liste + raise AsException("type de concept resultat non prevu") + +DEFI_VALEUR=MACRO(nom="DEFI_VALEUR",op=-4,sd_prod=defi_valeur_prod, + fr="Affectation d une valeur à une variable Superviseur", + docu="U4.31.04-e1",reentrant='f', + regles=(UN_PARMI('IS','R8','TX','C8','LS'),), + IS =SIMP(statut='f',typ='I',max='**'), + R8 =SIMP(statut='f',typ='R',max='**'), + TX =SIMP(statut='f',typ='TXM',max='**'), + C8 =SIMP(statut='f',typ='C',max='**'), + LS =SIMP(statut='f',typ='L',max='**'), +) ; + +def macro2_prod(self,MODELE,**args): + return maillage + +MACRO2 =MACRO(nom="MACRO2",op= -5 ,docu="U4.61.21-c", + sd_prod=macro2_prod, + fr="Calcul des matrices assemblées (matr_asse_gd) par exemple de rigidité, de masse ", + MODELE =SIMP(statut='o',typ=modele), +); + +class concept(ASSD):pass + +def op1_prod(x,**args): + if x == 0:return concept + if x == 1:return concept + raise AsException("type de concept resultat non prevu") + +OP1 = OPER(nom='OP1',op=1,sd_prod=op1_prod,reentrant='f', + a=SIMP(statut='o',typ='I',into=(0,1,2)), + b=SIMP(typ=concept), + ccc=FACT(statut='d',d=SIMP(typ='I'),e=SIMP(typ='I')), + b_1=BLOC(condition="a==0", + x=SIMP(statut='o',typ='I',into=(0,1)), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + b_2=BLOC(condition="a==1", + x=SIMP(statut='o',typ='I',into=(0,1)), + b_2=BLOC(condition="1", + cc=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + ), + ); + + +def op2_prod(self,x,**args): + if x == 0:return concept + if x == 1:return concept + raise AsException("type de concept resultat non prevu") + +OP2 = MACRO(nom='OP2',op=1,sd_prod=op2_prod,reentrant='f', + a=SIMP(statut='o',typ='I',into=(0,1,2)), + b=SIMP(typ=concept), + ccc=FACT(statut='d',d=SIMP(typ='I'),e=SIMP(typ='I')), + b_1=BLOC(condition="a==0", + x=SIMP(statut='o',typ='I',into=(0,1)), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + b_2=BLOC(condition="a==1", + x=SIMP(statut='o',typ='I',into=(0,1)), + b_2=BLOC(condition="1", + cc=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + ), + ); + diff --git a/Minicode/eficas_mini.py b/Minicode/eficas_mini.py index c8a97ac1..281ccc8e 100755 --- a/Minicode/eficas_mini.py +++ b/Minicode/eficas_mini.py @@ -3,19 +3,44 @@ Ce module sert à lancer EFICAS configuré pour Code_Mini """ # Modules Python -import sys +import sys,os # Modules Eficas import prefs sys.path[:0]=[prefs.INSTALLDIR] +args=sys.argv[1:] +for a in args: + if a == "-display": + os.environ['DISPLAY']=args[args.index("-display")+1] + import Editeur from Editeur import eficas_go -if len(sys.argv) > 1 : - # on veut ouvrir un fichier directement au lancement d'Eficas - eficas_go.lance_eficas(code='SATURNE',fichier = sys.argv[1]) +def main(): + if len(sys.argv) > 1 : + # on veut ouvrir un fichier directement au lancement d'Eficas + eficas_go.lance_eficas(code='SATURNE',fichier = sys.argv[1]) + else: + # on veut ouvrir Eficas 'vide' + eficas_go.lance_eficas(code='SATURNE') + +def hidez(): + from Misc import Cyclops + z = Cyclops.CycleFinder() + z.run(main) + z.find_cycles() + z.show_stats() + z.show_cycles() + # z.show_cycleobjs() + # z.show_sccs() + z.show_arcs() + +withCyclops=0 + +if withCyclops: + hidez() else: - # on veut ouvrir Eficas 'vide' - eficas_go.lance_eficas(code='SATURNE') + main() + diff --git a/Minicode/prefs.py b/Minicode/prefs.py index f3d82ae8..aa3f6929 100644 --- a/Minicode/prefs.py +++ b/Minicode/prefs.py @@ -14,6 +14,7 @@ INSTALLDIR=os.path.join(REPINI,'..') # Peut valoir None (defaut) CODE_PATH = None #CODE_PATH = os.path.join(REPINI,'../../Superv') +CODE_PATH = "/home01/chris/projet_Eficas/Devel/SUPER6_3/Aster6_3/bibpyt" # ICONDIR sert à localiser le répertoire contenant les icones # Par défaut on utilise le répertoire icons dans Editeur diff --git a/Tools/__init__.py b/Tools/__init__.py index 0366cee6..c060d833 100644 --- a/Tools/__init__.py +++ b/Tools/__init__.py @@ -1,8 +1,20 @@ -#@ MODIF __init__ Tools DATE 15/02/2001 AUTEUR YESSAYAN A.YESSAYAN # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== __all__=['foztools'] diff --git a/Validation/V_ETAPE.py b/Validation/V_ETAPE.py index 1152f81f..a5105d37 100644 --- a/Validation/V_ETAPE.py +++ b/Validation/V_ETAPE.py @@ -7,7 +7,7 @@ utilisée par héritage multiple pour composer les traitements. """ # Modules Python -import string,types +import string,types,sys import traceback # Modules EFICAS @@ -118,7 +118,11 @@ class ETAPE(V_MCCOMPO.MCCOMPO): # Erreur pendant le calcul du type retourné if CONTEXT.debug:traceback.print_exc() self.sd=None - if cr == 'oui' : self.cr.fatal('Impossible d affecter un type au résultat') + if cr == 'oui' : + l=traceback.format_exception(sys.exc_info()[0], + sys.exc_info()[1], + sys.exc_info()[2]) + self.cr.fatal('Impossible d affecter un type au résultat\n'+ string.join(l[2:])) return 0 # on teste maintenant si la SD est r\351utilis\351e ou s'il faut la cr\351er if self.reuse: diff --git a/Validation/V_MACRO_ETAPE.py b/Validation/V_MACRO_ETAPE.py index b0531a12..f4ce1892 100644 --- a/Validation/V_MACRO_ETAPE.py +++ b/Validation/V_MACRO_ETAPE.py @@ -7,7 +7,7 @@ utilisée par héritage multiple pour composer les traitements. """ # Modules Python -import string,types +import string,types,sys import traceback # Modules EFICAS @@ -120,7 +120,11 @@ class MACRO_ETAPE(V_ETAPE.ETAPE): # Erreur pendant le calcul du type retourné if CONTEXT.debug:traceback.print_exc() self.sd=None - if cr == 'oui' : self.cr.fatal('Impossible d affecter un type au résultat') + if cr == 'oui' : + l=traceback.format_exception(sys.exc_info()[0], + sys.exc_info()[1], + sys.exc_info()[2]) + self.cr.fatal('Impossible d affecter un type au résultat\n'+string.join(l[2:])) return 0 # on teste maintenant si la SD est r\351utilis\351e ou s'il faut la cr\351er if self.reuse: diff --git a/convert/Parserv5/Translate.py b/convert/Parserv5/Translate.py index 66ddd27c..4cab28d5 100644 --- a/convert/Parserv5/Translate.py +++ b/convert/Parserv5/Translate.py @@ -1,3 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + #!/bin/env python -d #!/tools/net/app/Python-1.5.2/bin/python1.5 diff --git a/convert/Parserv5/__init__.py b/convert/Parserv5/__init__.py index 96e6d4d3..21ab883a 100644 --- a/convert/Parserv5/__init__.py +++ b/convert/Parserv5/__init__.py @@ -1,3 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + try: import mx.TextTools import sys diff --git a/convert/Parserv5/conv.py b/convert/Parserv5/conv.py index 8f9621c2..4f4aba8b 100644 --- a/convert/Parserv5/conv.py +++ b/convert/Parserv5/conv.py @@ -1,17 +1,30 @@ -#@ MODIF conv Parsers DATE 17/10/2001 AUTEUR DURAND C.DURAND # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== + import sys,string import TextTools from tables import ERRORS # -__version__="$Name: V1_1p1 $" -__Id__="$Id: conv.py,v 1.1.1.1 2001/12/04 15:38:23 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: conv.py,v 1.1.1.1 2002/03/26 09:08:45 eficas Exp $" # Keywords=('MAILLE_1','MAILLE_2','MAILLE_ESCL','MAILLE_FOND','MAILLE_MAIT','MAILLE_ORIG','MAILLE', diff --git a/convert/Parserv5/tables.py b/convert/Parserv5/tables.py index 513b0011..b258354d 100644 --- a/convert/Parserv5/tables.py +++ b/convert/Parserv5/tables.py @@ -1,4 +1,23 @@ -#@ MODIF tables Parsers DATE 15/02/2001 AUTEUR YESSAYAN A.YESSAYAN +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + """ Ce fichier définit une table de tags à utiliser avec le package mxTextTools pour décoder un fichier au format Asterv5. @@ -10,7 +29,7 @@ from TextTools import * # __version__="$Name: $" -__Id__="$Id: tables.tag,v 1.11.18.1 2001/06/15 17:20:24 iliade Exp $" +__Id__="$Id: tables.tag,v 1.1.1.1 2002/03/26 09:08:45 eficas Exp $" # err0='ERR0 , erreur non identifiee : ' @@ -24,9 +43,10 @@ err7='ERR7 , mot cle facteur errone : ' err8='ERR8 , signe = ou ( attendu : ' err9='ERR9 , ( attendue : ' err10='ERR10 , vexpr attendue : ' +err11='ERR11 , ) attendue : ' ERRORS=(err0,err1,err2,err3,err4,err5,err6,err7,err8,err9, - err10) + err10,err11) white_set=set(whitespace) @@ -170,6 +190,16 @@ t_complexe = \ (err7,Table,t_err,MatchFail,MatchOk), )) +# Table pour identifier le keyword PI + +t_PI = \ + ('PI',Table,( + (None,Word,'PI',MatchFail), + (None,IsIn,alpha+'_'+number,MatchOk,+1), + (None,Skip,-1), + (None,Jump,To,MatchFail), + )) + t_vexpr = ( ('par',Is,'(',+5,+1), commespaces + (+1,), @@ -181,7 +211,7 @@ t_vexpr = ( ('sign',IsIn,'+-',+3,+1), commespaces + (+1,), ('vexpr',Table,ThisTable,+19,+10), - ("PI",Word,'PI',+1,+9), + t_PI + (+1,+9), t_ident + (MatchFail,), commespaces + (+1,), ('listpar',Is,'(',+6,+1), # on peut avoir une liste de parametres @@ -307,9 +337,9 @@ t_formule = \ commespaces + (+1,), ('vexpr',Table,t_vexpr,+9), commespaces + (+1,), - (None,Is,')',+8), + (None,Is,')',+9), commespaces + (+1,), - (None,Is,')',+6), + (None,Is,')',+7), commespaces + (+1,), (None,Is,';',+3), (None,AllNotIn,'\n',+1), @@ -318,6 +348,8 @@ t_formule = \ (err0,Table,t_err,MatchFail,MatchOk), # (err9,Table,t_err,MatchFail,MatchOk), + # + (err11,Table,t_err,MatchFail,MatchOk), )) t_nom_ope = \ diff --git a/convert/Parserv5/tables.tag b/convert/Parserv5/tables.tag index 2a28f072..309dd497 100755 --- a/convert/Parserv5/tables.tag +++ b/convert/Parserv5/tables.tag @@ -1,4 +1,23 @@ -#@ MODIF tables Parsers DATE 15/02/2001 AUTEUR YESSAYAN A.YESSAYAN +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + """ Ce fichier définit une table de tags à utiliser avec le package mxTextTools pour décoder un fichier au format Asterv5. @@ -10,7 +29,7 @@ from TextTools import * # __version__="$Name: $" -__Id__="$Id: tables.tag,v 1.11.18.1 2001/06/15 17:20:24 iliade Exp $" +__Id__="$Id: tables.tag,v 1.1.1.1 2002/03/26 09:08:45 eficas Exp $" # err0='ERR0 , erreur non identifiee : ' @@ -24,9 +43,10 @@ err7='ERR7 , mot cle facteur errone : ' err8='ERR8 , signe = ou ( attendu : ' err9='ERR9 , ( attendue : ' err10='ERR10 , vexpr attendue : ' +err11='ERR11 , ) attendue : ' ERRORS=(err0,err1,err2,err3,err4,err5,err6,err7,err8,err9, - err10) + err10,err11) white_set=set(whitespace) @@ -158,6 +178,15 @@ t_complexe is: err7 = Table t_err F:MatchFail T:MatchOk +# Table pour identifier le keyword PI + +t_PI is: + 'PI' = Table is: + Word 'PI' F:MatchFail + IsIn alpha+'_'+number F:MatchOk T:next + Skip back + Jump To MatchFail + t_vexpr = Table is: 'par' = Is '(': commespaces F:next @@ -169,7 +198,7 @@ t_vexpr = Table is: 'sign' = IsIn '+-': commespaces F:next 'vexpr' = Table ThisTable F: T: - "PI" = Word 'PI' F:next T: + t_PI F:next T: t_ident F:MatchFail commespaces F:next 'listpar' = Is '(': # on peut avoir une liste de parametres @@ -287,9 +316,9 @@ t_formule is: commespaces F:next 'vexpr' = Table t_vexpr F: commespaces F:next - Is ')' F: + Is ')' F: commespaces F:next - Is ')' F: + Is ')' F: commespaces F:next Is ';' F: AllNotIn '\n' F:next @@ -298,6 +327,8 @@ t_formule is: err0 = Table t_err F:MatchFail T:MatchOk err9 = Table t_err F:MatchFail T:MatchOk + + err11 = Table t_err F:MatchFail T:MatchOk t_nom_ope is: 'nom_ope' = Table is: diff --git a/convert/__init__.py b/convert/__init__.py index c6d52220..e731b26d 100644 --- a/convert/__init__.py +++ b/convert/__init__.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce package contient tous les convertisseurs de formats d'entrée en objets compréhensibles par EFICAS. diff --git a/convert/convert_asterv5.py b/convert/convert_asterv5.py index 780626d8..e025eec2 100644 --- a/convert/convert_asterv5.py +++ b/convert/convert_asterv5.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin convertisseur de fichier au format asterv5 pour EFICAS. diff --git a/convert/convert_ini.py b/convert/convert_ini.py index aa32a725..811bc6a5 100644 --- a/convert/convert_ini.py +++ b/convert/convert_ini.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin convertisseur de fichier au format ini pour EFICAS. diff --git a/convert/convert_pyth.py b/convert/convert_pyth.py index 30f3b28a..b408ff21 100644 --- a/convert/convert_pyth.py +++ b/convert/convert_pyth.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin convertisseur de fichier au format python pour EFICAS. diff --git a/convert/convert_python.py b/convert/convert_python.py index a5a69cb2..cfe54a6a 100644 --- a/convert/convert_python.py +++ b/convert/convert_python.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin convertisseur de fichier au format python pour EFICAS. diff --git a/convert/parseur_python.py b/convert/parseur_python.py index b999b6ba..b5a45897 100644 --- a/convert/parseur_python.py +++ b/convert/parseur_python.py @@ -1,9 +1,21 @@ -#@ MODIF parseur_python Parsers DATE 05/09/2001 AUTEUR DURAND C.DURAND # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import sys,string,re diff --git a/generator/Formatage.py b/generator/Formatage.py index d54d464c..aaa531a5 100644 --- a/generator/Formatage.py +++ b/generator/Formatage.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe Formatage qui permet le formatage d'une liste de chaines de caractères dans une syntaxe représentative d'un diff --git a/generator/__init__.py b/generator/__init__.py index 89d4cb40..39110152 100644 --- a/generator/__init__.py +++ b/generator/__init__.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce package contient tous les générateurs de formats de sortie à partir des objets d' EFICAS. diff --git a/generator/generator_aplat.py b/generator/generator_aplat.py index c12b6dac..25c3265f 100644 --- a/generator/generator_aplat.py +++ b/generator/generator_aplat.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format aplat pour EFICAS. @@ -268,7 +287,7 @@ class AplatGenerator: text = '' init = self.init + self.sep + obj.nom old_init=self.init - for data in self.data : + for data in obj.data : i=i+1 self.init = init + self.sep + "occurrence n°"+`i` text = text + self.generator(data) @@ -283,7 +302,7 @@ class AplatGenerator: if type(obj.valeur) in (types.TupleType,types.ListType) : # On est en présence d'une liste de valeur rep = '(' - for val in self.valeur: + for val in obj.valeur: if type(val) == types.InstanceType : rep = rep + self.generator(val) +',' else: diff --git a/generator/generator_asterv5.py b/generator/generator_asterv5.py index fa3b9499..d634158a 100644 --- a/generator/generator_asterv5.py +++ b/generator/generator_asterv5.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format asterv5 pour EFICAS. diff --git a/generator/generator_ini.py b/generator/generator_ini.py index 64b5bfd8..2e2ac93b 100644 --- a/generator/generator_ini.py +++ b/generator/generator_ini.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format ini pour EFICAS. diff --git a/generator/generator_pyth.py b/generator/generator_pyth.py index 6d911224..34fa5cf7 100644 --- a/generator/generator_pyth.py +++ b/generator/generator_pyth.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format pyth pour EFICAS. diff --git a/generator/generator_python.py b/generator/generator_python.py index 6220c818..87c55ca5 100644 --- a/generator/generator_python.py +++ b/generator/generator_python.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format python pour EFICAS. @@ -453,6 +472,8 @@ class PythonGenerator: if hasattr(obj.etape,'sdprods'): if val in obj.etape.sdprods : s = s + "CO('"+ self.generator(val) +"')" + elif val.__class__.__name__ == 'CO': + s = s + "CO('"+ self.generator(val) +"')" else: s = s + self.generator(val) elif isinstance(val,PARAMETRE): @@ -472,6 +493,8 @@ class PythonGenerator: if hasattr(obj.etape,'sdprods'): if val in obj.etape.sdprods : s = "CO('"+ self.generator(val) +"')" + elif val.__class__.__name__ == 'CO': + s = "CO('"+ self.generator(val) +"')" else: s = self.generator(val) elif isinstance(val,PARAMETRE): -- 2.39.2