Salome HOME
sources v1.2
[modules/med.git] / src / MEDMEM / MEDMEM_DriversDef.hxx
1 //  MED MEDMEM : MED files in memory
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : MEDMEM_DriversDef.hxx
25 //  Module : MED
26
27 # ifndef DRIVERS_DEF_HXX
28 # define DRIVERS_DEF_HXX
29
30 // STL
31 # include <string>
32 # include <list>
33 # include <map>
34
35 using namespace std ;
36
37 #include "MEDMEM_define.hxx"
38 namespace MED_FR 
39 {
40
41 /*!  This Class inherits from  map. /n
42      It is a constant map association int (which is a med_geometrie_element) and string. /n
43      Operator [] returns the (string) name of the geometry of an element 
44      given by a med_geometrie_element value. /n 
45      Such a static map is instancied and can be used in any code to have
46      the name of the geometry of an element : MED_FR:GEO_NAME 
47      A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
48 //----------------------------------------
49 class GEO_NAME : public map<int,string>
50 //----------------------------------------
51 {
52   
53 public :
54   
55   GEO_NAME();
56   string & operator[]( const MED_FR::med_geometrie_element &c ) const;
57 } ;
58
59 static const GEO_NAME geoNames ;
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 string. /n
65     Operator[] returns the (string) name of the type of an entity given by 
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:ENT_NAME 
69     A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
70
71 //----------------------------------------
72 class ENT_NAME : public map<int,string>
73 //----------------------------------------
74 {
75   
76 public :
77
78   ENT_NAME ();
79   string & operator[]( const MED_FR::med_entite_maillage &c ) const;
80 } ;
81
82 static const ENT_NAME entNames ;
83
84 //                              ____________________________    
85
86 /*! This Class inherits from map. /n
87     It is a constant map association int (which is a med_entite_maillage) and  a list. /n
88     Operator[] returns the list of all exisiting med_geometrie_element for 
89     a med_entite_maillage value. /n
90     Such a static map is instancied and can be used in any code to have
91     the name of the geometry of an element : MED_FR:MESH_ENTITIES
92     A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
93
94
95 //--------------------------------------------------------------------------------
96 class MESH_ENTITIES : public map<int, const list<MED_FR::med_geometrie_element> >
97 //--------------------------------------------------------------------------------
98 {
99
100 public :
101
102   MESH_ENTITIES ();
103   const list<MED_FR::med_geometrie_element> & operator[]( const  MED_FR::med_entite_maillage &c ) const;
104   
105 private:
106                                         /*! This operator is used to initialize class objects of 
107                                             type  const list<med_geometrie_element> */
108   list<MED_FR::med_geometrie_element> & operator[]( const  MED_FR::med_entite_maillage &c );
109   
110 } ;
111
112 static const MESH_ENTITIES meshEntities ;
113
114 } // End Of NameSpace MED_FR
115
116 #endif
117