Salome HOME
58710d3c045b1534b36c6e83e0bfd0582f215b74
[modules/med.git] / src / MEDMEM / MEDMEM_DriversDef.hxx
1 # ifndef DRIVERS_DEF_HXX
2 # define DRIVERS_DEF_HXX
3
4 // STL
5 # include <string>
6 # include <list>
7 # include <map>
8
9 using namespace std ;
10
11 #include "MEDMEM_define.hxx"
12 #include "MEDMEM_Utilities.hxx"
13
14 namespace MED_EN {
15 /*!  This Class inherits from  map. \n
16      It is a constant map association int (which is a med_geometrie_element) and string. \n
17      Operator [] returns the (string) name of the geometry of an element 
18      given by a med_geometrie_element value. \n 
19      Such a static map is instancied and can be used in any code to have
20      the name of the geometry of an element : MED_FR:GEO_NAME 
21      A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
22 //----------------------------------------
23 class GEO_NAME : public map<int,string>
24 //----------------------------------------
25 {
26   
27 public :
28   
29   GEO_NAME();
30   ~GEO_NAME();
31   string & operator[]( const MED_EN::medGeometryElement &c ) const;
32 } ;
33
34 static const GEO_NAME geoNames ;
35
36 //                              ____________________________    
37   
38 /*! This Class inherits from map. \n
39     It is a constant map association int (which is a med_entite_maillage) and string. \n
40     Operator[] returns the (string) name of the type of an entity given by 
41     a med_entite_maillage value. \n
42     Such a static map is instancied and can be used in any code to have
43     the name of the geometry of an element : MED_FR:ENT_NAME 
44     A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
45
46 //----------------------------------------
47 class ENT_NAME : public map<int,string>
48 //----------------------------------------
49 {
50   
51 public :
52
53   ENT_NAME ();
54   ~ENT_NAME();
55   string & operator[]( const MED_EN::medEntityMesh &c ) const;
56 } ;
57
58 static const ENT_NAME entNames ;
59
60 //                              ____________________________    
61
62 /*! This Class inherits from map. \n
63     It is a constant map association int (which is a med_entite_maillage) and  a list. \n
64     Operator[] returns the list of all exisiting med_geometrie_element for 
65     a med_entite_maillage value. \n
66     Such a static map is instancied and can be used in any code to have
67     the name of the geometry of an element : MED_FR:MESH_ENTITIES
68     A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
69
70
71 //--------------------------------------------------------------------------------
72 class MESH_ENTITIES : public map<int, const list<MED_EN::medGeometryElement> >
73 //--------------------------------------------------------------------------------
74 {
75
76 public :
77
78   MESH_ENTITIES ();
79   ~MESH_ENTITIES();
80   const list<MED_EN::medGeometryElement> & operator[]( const  MED_EN::medEntityMesh &c ) const;
81   
82 private:
83                                         /*! This operator is used to initialize class objects of 
84                                             type  const list<med_geometrie_element> */
85   list<MED_EN::medGeometryElement> & operator[]( const  MED_EN::medEntityMesh &c );
86   
87 } ;
88
89 static const MESH_ENTITIES meshEntities ;
90
91 } // End Of NameSpace MED_EN
92
93 #endif
94