1 #ifndef MED_MED_DRIVER22_HXX
2 #define MED_MED_DRIVER22_HXX
4 #include "MEDMEM_MedMedDriver.hxx"
6 #include "MEDMEM_Utilities.hxx"
7 #include "MEDMEM_Exception.hxx"
8 #include "MEDMEM_GenDriver.hxx"
9 #include "MEDMEM_define.hxx"
15 Generic part : implement open and close methods.
19 // This driver pilots within a MED class read/write accesses of fields/meshes
25 class MED_MED_DRIVER22 : public virtual MED_MED_DRIVER
29 med_2_2::med_idt _medIdt; // The _medIdt used to write/read Meshes to ::_filename
42 MED_MED_DRIVER22(const string & fileName, MED * const ptrMed);
46 MED_MED_DRIVER22(const string & fileName, MED * const ptrMed,
47 MED_EN::med_mode_acces accessMode);
49 // OPERATEUR DE RECOPIE AVEC _medIdt ??
53 MED_MED_DRIVER22(const MED_MED_DRIVER22 & driver);
58 virtual ~MED_MED_DRIVER22() ;
60 void open() throw (MEDEXCEPTION) ;
63 //virtual void write ( void ) const = 0 ;
64 virtual void write ( void ) const ;
65 //virtual void writeFrom ( void ) const = 0 ;
66 virtual void writeFrom ( void ) const ;
67 //virtual void read ( void ) = 0 ;
68 virtual void read ( void ) ;
69 //virtual void readFileStruct ( void ) = 0 ;
70 virtual void readFileStruct ( void ) ;
73 //virtual GENDRIVER * copy ( void ) const = 0 ;
74 virtual GENDRIVER * copy ( void ) const ;
80 Driver Med for MED : Read only.
82 Implement read method.
86 class MED_MED_RDONLY_DRIVER22 : public virtual IMED_MED_RDONLY_DRIVER, public virtual MED_MED_DRIVER22
92 MED_MED_RDONLY_DRIVER22();
96 MED_MED_RDONLY_DRIVER22(const string & fileName, MED * const ptrMed);
100 MED_MED_RDONLY_DRIVER22(const MED_MED_RDONLY_DRIVER22 & driver);
105 virtual ~MED_MED_RDONLY_DRIVER22();
108 Return a MEDEXCEPTION : it is the read-only driver.
110 void write ( void ) const throw (MEDEXCEPTION) ;
112 Return a MEDEXCEPTION : it is the read-only driver.
114 void writeFrom ( void ) const throw (MEDEXCEPTION) ;
116 Read all from the file.
118 void read ( void ) throw (MEDEXCEPTION);
120 Read only table of contents of the file.
122 All objects are created but there values are not read.
124 void readFileStruct ( void ) throw (MEDEXCEPTION) ;
127 virtual GENDRIVER * copy ( void ) const ;
133 Driver Med for MED : Write only.
135 Implement write method.
139 class MED_MED_WRONLY_DRIVER22 : public virtual IMED_MED_WRONLY_DRIVER, public virtual MED_MED_DRIVER22
146 MED_MED_WRONLY_DRIVER22();
150 MED_MED_WRONLY_DRIVER22(const string & fileName, MED * const ptrMed);
154 MED_MED_WRONLY_DRIVER22(const MED_MED_WRONLY_DRIVER22 & driver);
159 virtual ~MED_MED_WRONLY_DRIVER22();
164 void write ( void ) const throw (MEDEXCEPTION);
166 Write only objects created from this MED driver in file.
168 void writeFrom ( void ) const throw (MEDEXCEPTION);
170 Return a MEDEXCEPTION : it is the write-only driver.
172 void read ( void ) throw (MEDEXCEPTION) ;
174 Return a MEDEXCEPTION : it is the write-only driver.
176 void readFileStruct ( void ) throw (MEDEXCEPTION) ;
179 virtual GENDRIVER * copy ( void ) const ;
185 Driver Med for MED : Read write.
186 - Use read method from MED_MED_RDONLY_DRIVER
187 - Use write method from MED_MED_WDONLY_DRIVER
191 class MED_MED_RDWR_DRIVER22 : public virtual MED_MED_RDONLY_DRIVER22,
192 public virtual MED_MED_WRONLY_DRIVER22,
193 public virtual IMED_MED_RDWR_DRIVER
200 MED_MED_RDWR_DRIVER22();
204 MED_MED_RDWR_DRIVER22(const string & fileName, MED * const ptrMed);
208 MED_MED_RDWR_DRIVER22(const MED_MED_RDWR_DRIVER22 & driver);
213 ~MED_MED_RDWR_DRIVER22();
218 void write ( void ) const throw (MEDEXCEPTION);
220 Write only objects created from this MED driver in file.
222 void writeFrom ( void ) const throw (MEDEXCEPTION);
224 Read all from the file.
226 void read ( void ) throw (MEDEXCEPTION);
228 Read only table of contents of the file.
230 All objects are created but there values are not read.
232 void readFileStruct ( void ) throw (MEDEXCEPTION);
235 virtual GENDRIVER * copy ( void ) const ;
240 #endif /* MED_MED_DRIVER22_HXX */