Salome HOME
1er mise en coherence avec la 7_6
[tools/eficas.git] / Noyau / __init__.py
1 # coding=utf-8
2 # ======================================================================
3 # COPYRIGHT (C) 1991 - 2015  EDF R&D                  WWW.CODE-ASTER.ORG
4 # THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
5 # IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
6 # THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
7 # (AT YOUR OPTION) ANY LATER VERSION.
8 #
9 # THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
10 # WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
11 # MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
12 # GENERAL PUBLIC LICENSE FOR MORE DETAILS.
13 #
14 # YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
15 # ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
16 #    1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
17 #
18 #
19 # ======================================================================
20
21
22 """
23     Ce package fournit les classes de base d'EFICAS.
24     Ces classes permettent d'effectuer quelques opérations basiques :
25
26       - la création
27
28       - la vérification des définitions
29
30       - la création d'objets de type OBJECT à partir d'une définition de type ENTITE
31 """
32 # Avant toutes choses, on met le module context dans le global de l'interpreteur (__builtin__)
33 # sous le nom CONTEXT afin d'avoir accès aux fonctions
34 # get_current_step, set_current_step et unset_current_step de n'importe où
35 import context
36 import __builtin__
37 __builtin__.CONTEXT = context
38
39
40 def _(msg):
41     """Differs translation."""
42     # 'codex' should install its translation functions later
43     return msg
44 __builtin__._ = _
45
46 # Classes de base
47 from N_SIMP import SIMP
48 from N_FACT import FACT
49
50 # structures de données
51 import asojb
52 from asojb import AsBase
53
54 # Only the first MAXSIZE objects will be checked
55 # This is used for the number of MCFACT, the number of MCSIMP and the number of
56 # values in a MCSIMP.
57 MAXSIZE = 500
58
59 MAXSIZE_MSGCHK = ' <I> Only the first {0} occurrences (total: {1}) have been checked.'
60 MAXSIZE_MSGKEEP = ' <I> Only the first {0} occurrences (total: {1}) have been printed.'