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