1 #ifndef GIBI_MESH_DRIVER_HXX
2 #define GIBI_MESH_DRIVER_HXX
8 #include "MEDMEM_define.hxx"
9 #include "MEDMEM_GenDriver.hxx"
11 #include "MEDMEM_STRING.hxx"
12 #include "MEDMEM_Exception.hxx"
13 #include "utilities.h"
24 Generic part : implement the readopen and close methods.
33 class GIBI_MESH_DRIVER : public GENDRIVER
38 // A VOIR FILE DESCRIPTEUR ? MED_FR::med_idt _medIdt;
43 // tableau de correspondance des types géométriques de CASTEM -> MED
44 static const size_t nb_geometrie_gibi=47;
45 static const medGeometryElement geomGIBItoMED[nb_geometrie_gibi];
57 GIBI_MESH_DRIVER(const string & fileName,
59 med_mode_acces accessMode) ;
63 GIBI_MESH_DRIVER(const GIBI_MESH_DRIVER & driver) ;
68 virtual ~GIBI_MESH_DRIVER() ;
70 void open() throw (MEDEXCEPTION);
71 void close() throw (MEDEXCEPTION);
73 virtual void write( void ) const = 0 ;
74 virtual void read ( void ) = 0 ;
77 Set the name of the MESH asked in file.
79 It could be different than the name of the MESH object.
81 void setMeshName(const string & meshName) ;
83 Get the name of the MESH asked in file.
85 string getMeshName() const ;
88 virtual GENDRIVER * copy ( void ) const = 0 ;
93 class GIBI_MESH_RDONLY_DRIVER : public virtual GIBI_MESH_DRIVER
101 GIBI_MESH_RDONLY_DRIVER() ;
105 GIBI_MESH_RDONLY_DRIVER(const string & fileName, MESH * ptrMesh) ;
109 GIBI_MESH_RDONLY_DRIVER(const GIBI_MESH_RDONLY_DRIVER & driver) ;
114 virtual ~GIBI_MESH_RDONLY_DRIVER() ;
117 Return a MEDEXCEPTION : it is the read-only driver.
119 void write( void ) const throw (MEDEXCEPTION);
121 Read MESH in the specified file.
123 void read ( void ) throw (MEDEXCEPTION);
127 GENDRIVER * copy ( void ) const ;
133 Driver Med for MESH : Write only.
135 Implement write method.
139 class GIBI_MESH_WRONLY_DRIVER : public virtual GIBI_MESH_DRIVER {
146 GIBI_MESH_WRONLY_DRIVER() ;
150 GIBI_MESH_WRONLY_DRIVER(const string & fileName, MESH * ptrMesh) ;
154 GIBI_MESH_WRONLY_DRIVER(const GIBI_MESH_WRONLY_DRIVER & driver) ;
159 virtual ~GIBI_MESH_WRONLY_DRIVER() ;
162 Write MESH in the specified file.
164 void write( void ) const throw (MEDEXCEPTION);
166 Return a MEDEXCEPTION : it is the write-only driver.
168 void read ( void ) throw (MEDEXCEPTION);
172 GENDRIVER * copy ( void ) const ;
178 Driver GIBI for MESH : Read write.
179 - Use read method from GIBI_MESH_RDONLY_DRIVER
180 - Use write method from GIBI_MESH_WRONLY_DRIVER
184 class GIBI_MESH_RDWR_DRIVER : public GIBI_MESH_RDONLY_DRIVER, public GIBI_MESH_WRONLY_DRIVER {
191 GIBI_MESH_RDWR_DRIVER() ;
195 GIBI_MESH_RDWR_DRIVER(const string & fileName, MESH * ptrMesh) ;
199 GIBI_MESH_RDWR_DRIVER(const GIBI_MESH_RDWR_DRIVER & driver) ;
204 ~GIBI_MESH_RDWR_DRIVER() ;
207 Write MESH in the specified file.
209 void write(void) const throw (MEDEXCEPTION);
211 Read MESH in the specified file.
213 void read (void) throw (MEDEXCEPTION);
216 GENDRIVER * copy(void) const ;
222 #endif /* GIBI_MESH_DRIVER_HXX */