1 # -*- coding: iso-8859-1 -*-
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 from Noyau.N_info import message, SUPERV
25 # Le "current step" est l'étape courante.
26 # Une macro se déclare étape courante dans sa méthode Build avant de construire
27 # ses étapes filles ou dans BuildExec avant de les exécuter.
28 # Les étapes simples le font aussi : dans Execute et BuildExec.
29 # (Build ne fait rien pour une étape)
31 def set_current_step(step):
33 Fonction qui permet de changer la valeur de l'étape courante
36 if _root : raise Exception("Impossible d'affecter _root. Il devrait valoir None")
38 #message.debug(SUPERV, "current_step = %s", step and step.nom, stack_id=-1)
40 def get_current_step():
42 Fonction qui permet d'obtenir la valeur de l'étape courante
46 def unset_current_step():
48 Fonction qui permet de remettre à None l'étape courante
53 def set_current_cata(cata):
55 Fonction qui permet de changer l'objet catalogue courant
58 if _cata : raise Exception("Impossible d'affecter _cata. Il devrait valoir None")
61 def get_current_cata():
63 Fonction qui retourne l'objet catalogue courant
67 def unset_current_cata():
69 Fonction qui permet de remettre à None le catalogue courant