]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/MEDMEM_DriversDef.hxx
Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/med.git] / src / MEDMEM / MEDMEM_DriversDef.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 # ifndef DRIVERS_DEF_HXX
23 # define DRIVERS_DEF_HXX
24
25 #include <MEDMEM.hxx>
26
27 // STL
28 # include <string>
29 # include <list>
30 # include <map>
31
32 using namespace std ;
33
34 #include "MEDMEM_define.hxx"
35 #include "MEDMEM_Utilities.hxx"
36
37 namespace MED_EN {
38 /*!  This Class inherits from  map. \n
39      It is a constant map association int (which is a med_geometrie_element) and string. \n
40      Operator [] returns the (string) name of the geometry of an element 
41      given by a med_geometrie_element 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:GEO_NAME 
44      A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
45 //----------------------------------------
46 class MEDMEM_EXPORT GEO_NAME : public map<int,string>
47 //----------------------------------------
48 {
49   
50 public :
51   
52   GEO_NAME();
53   ~GEO_NAME();
54   string & operator[]( const MED_EN::medGeometryElement &c ) const;
55 } ;
56
57 static const GEO_NAME geoNames ;
58
59 //                              ____________________________    
60   
61 /*! This Class inherits from map. \n
62     It is a constant map association int (which is a med_entite_maillage) and string. \n
63     Operator[] returns the (string) name of the type of an entity given by 
64     a med_entite_maillage value. \n
65     Such a static map is instancied and can be used in any code to have
66     the name of the geometry of an element : MED_FR:ENT_NAME 
67     A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
68
69 //----------------------------------------
70 class MEDMEM_EXPORT ENT_NAME : public map<int,string>
71 //----------------------------------------
72 {
73   
74 public :
75
76   ENT_NAME ();
77   ~ENT_NAME();
78   string & operator[]( const MED_EN::medEntityMesh &c ) const;
79 } ;
80
81 static const ENT_NAME entNames ;
82
83 //                              ____________________________    
84
85 /*! This Class inherits from map. \n
86     It is a constant map association int (which is a med_entite_maillage) and  a list. \n
87     Operator[] returns the list of all exisiting med_geometrie_element for 
88     a med_entite_maillage value. \n
89     Such a static map is instancied and can be used in any code to have
90     the name of the geometry of an element : MED_FR:MESH_ENTITIES
91     A simple test/use case can be found in test/testUGeoNameMeshEntities.cxx  */
92
93
94 //--------------------------------------------------------------------------------
95 class MEDMEM_EXPORT MESH_ENTITIES : public map<int, const list<MED_EN::medGeometryElement> >
96 //--------------------------------------------------------------------------------
97 {
98
99 public :
100
101   MESH_ENTITIES ();
102   ~MESH_ENTITIES();
103   const list<MED_EN::medGeometryElement> & operator[]( const  MED_EN::medEntityMesh &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_EN::medGeometryElement> & operator[]( const  MED_EN::medEntityMesh &c );
109   
110 } ;
111
112 static const MESH_ENTITIES meshEntities ;
113
114 } // End Of NameSpace MED_EN
115
116 #endif
117