1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef MED_MED_DRIVER21_HXX
23 #define MED_MED_DRIVER21_HXX
25 #include "MEDMEM_MedMedDriver.hxx"
27 #include "MEDMEM_Utilities.hxx"
28 #include "MEDMEM_Exception.hxx"
29 #include "MEDMEM_GenDriver.hxx"
30 #include "MEDMEM_define.hxx"
36 Generic part : implement open and close methods.
40 // This driver pilots within a MED class read/write accesses of fields/meshes
46 class MED_MED_DRIVER21 : public virtual MED_MED_DRIVER
50 med_2_1::med_idt _medIdt; // The _medIdt used to write/read Meshes to ::_filename
54 MED_MED_DRIVER21(const string & fileName, MED * const ptrMed);
55 MED_MED_DRIVER21(const string & fileName, MED * const ptrMed,
56 MED_EN::med_mode_acces accessMode);
57 MED_MED_DRIVER21(const MED_MED_DRIVER21 & driver);
58 virtual ~MED_MED_DRIVER21();
59 void open() throw (MEDEXCEPTION) ;
61 virtual void write ( void ) const ;
62 virtual void writeFrom ( void ) const ;
63 virtual void read ( void ) ;
64 virtual void readFileStruct ( void ) ;
66 virtual GENDRIVER * copy ( void ) const ;
71 Driver Med for MED : Read only.
73 Implement read method.
77 class MED_MED_RDONLY_DRIVER21 : public virtual IMED_MED_RDONLY_DRIVER, public virtual MED_MED_DRIVER21
80 MED_MED_RDONLY_DRIVER21();
81 MED_MED_RDONLY_DRIVER21(const string & fileName, MED * const ptrMed);
82 MED_MED_RDONLY_DRIVER21(const MED_MED_RDONLY_DRIVER21 & driver);
83 virtual ~MED_MED_RDONLY_DRIVER21();
84 void write ( void ) const throw (MEDEXCEPTION) ;
85 void writeFrom ( void ) const throw (MEDEXCEPTION) ;
86 void read ( void ) throw (MEDEXCEPTION);
87 void readFileStruct ( void ) throw (MEDEXCEPTION) ;
89 virtual GENDRIVER * copy ( void ) const ;
92 class MED_MED_WRONLY_DRIVER21 : public virtual IMED_MED_WRONLY_DRIVER, public virtual MED_MED_DRIVER21
96 MED_MED_WRONLY_DRIVER21();
97 MED_MED_WRONLY_DRIVER21(const string & fileName, MED * const ptrMed);
98 MED_MED_WRONLY_DRIVER21(const MED_MED_WRONLY_DRIVER21 & driver);
99 virtual ~MED_MED_WRONLY_DRIVER21();
100 void write ( void ) const throw (MEDEXCEPTION);
101 void writeFrom ( void ) const throw (MEDEXCEPTION);
102 void read ( void ) throw (MEDEXCEPTION) ;
103 void readFileStruct ( void ) throw (MEDEXCEPTION) ;
105 virtual GENDRIVER * copy ( void ) const ;
108 class MED_MED_RDWR_DRIVER21 : public MED_MED_RDONLY_DRIVER21,
109 public MED_MED_WRONLY_DRIVER21,
110 public IMED_MED_RDWR_DRIVER
113 MED_MED_RDWR_DRIVER21();
114 MED_MED_RDWR_DRIVER21(const string & fileName, MED * const ptrMed);
115 MED_MED_RDWR_DRIVER21(const MED_MED_RDWR_DRIVER21 & driver);
116 ~MED_MED_RDWR_DRIVER21();
117 void write ( void ) const throw (MEDEXCEPTION);
118 void writeFrom ( void ) const throw (MEDEXCEPTION);
119 void read ( void ) throw (MEDEXCEPTION);
120 void readFileStruct ( void ) throw (MEDEXCEPTION);
122 virtual GENDRIVER * copy ( void ) const ;
127 #endif /* MED_MED_DRIVER21_HXX */