1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2007-2013 EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 # import rajoutés suite à l'ajout de Build_sd --> à résorber
25 import traceback,types,string
27 from Noyau import N_Exception
28 from Noyau.N_Exception import AsException
29 from Extensions.eficas_exception import EficasException
31 class PROC_ETAPE(I_ETAPE.ETAPE):
35 def get_sdprods(self,nom_sd):
37 Fonction : retourne le concept produit par l etape de nom nom_sd
38 s il existe sinon None
39 Une PROC ne produit aucun concept
43 def supprime_sdprods(self):
45 Fonction: Lors d'une destruction d'etape, detruit tous les concepts produits
46 Une procedure n'en a aucun
50 def delete_concept(self,sd):
52 Fonction : Mettre a jour les mots cles de l etape
53 suite à la disparition du concept sd
54 Seuls les mots cles simples MCSIMP font un traitement autre
55 que de transmettre aux fils
60 for child in self.mc_liste :
61 child.delete_concept(sd)
63 def replace_concept(self,old_sd,sd):
65 Fonction : Mettre a jour les mots cles de l etape
66 suite au remplacement du concept old_sd
69 - old_sd=concept remplacé
72 for child in self.mc_liste :
73 child.replace_concept(old_sd,sd)
75 #ATTENTION SURCHARGE: a garder en synchro ou a reintegrer dans le Noyau
78 Methode de Noyau surchargee pour poursuivre malgre tout
79 si une erreur se produit pendant la creation du concept produit
82 sd=Noyau.N_PROC_ETAPE.PROC_ETAPE.Build_sd(self)
84 # Une erreur s'est produite lors de la construction du concept
85 # Comme on est dans EFICAS, on essaie de poursuivre quand meme
86 # Si on poursuit, on a le choix entre deux possibilités :
87 # 1. on annule la sd associée à self
88 # 2. on la conserve mais il faut la retourner
89 # En plus il faut rendre coherents sdnom et sd.nom
92 self.state="unchanged"