Salome HOME
version 19 mars
[tools/eficas.git] / Noyau / __init__.py
1 # coding=utf-8
2 # Copyright (C) 2007-2013   EDF R&D
3 #
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.
8 #
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.
13 #
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
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19
20
21 """
22     Ce package fournit les classes de base d'EFICAS.
23     Ces classes permettent d'effectuer quelques opérations basiques :
24
25       - la création
26
27       - la vérification des définitions
28
29       - la création d'objets de type OBJECT à partir d'une définition de type ENTITE
30 """
31 # Avant toutes choses, on met le module context dans le global de l'interpreteur (__builtin__)
32 # sous le nom CONTEXT afin d'avoir accès aux fonctions
33 # get_current_step, set_current_step et unset_current_step de n'importe où
34 import context
35 import __builtin__
36 __builtin__.CONTEXT = context
37
38
39 def _(msg):
40     """Differs translation."""
41     # 'codex' should install its translation functions later
42     return msg
43 __builtin__._ = _
44
45 # Classes de base
46 from N_SIMP import SIMP
47 from N_FACT import FACT
48
49 # structures de données
50 import asojb
51 from asojb import AsBase
52
53 # Only the first MAXSIZE objects will be checked
54 # This is used for the number of MCFACT, the number of MCSIMP and the number of
55 # values in a MCSIMP.
56 MAXSIZE = 500
57
58 MAXSIZE_MSGCHK = ' <A> Only the first {0} occurrences (total: {1}) have been checked.'
59 MAXSIZE_MSGKEEP = ' <A> Only the first {0} occurrences (total: {1}) have been kept.'