1 #include "MEDMEM_DriverFactory.hxx"
3 #include "MEDMEM_Mesh.hxx"
4 #include "MEDMEM_MedMeshDriver.hxx"
5 #include "MEDMEM_GibiMeshDriver.hxx"
6 #include "MEDMEM_PorflowMeshDriver.hxx"
7 #include "MEDMEM_VtkMeshDriver.hxx"
9 #include "MEDMEM_Med.hxx"
10 #include "MEDMEM_MedMedDriver.hxx"
11 #include "MEDMEM_VtkMedDriver.hxx"
13 //#include "MEDMEM_Field.hxx"
15 #include "MEDMEM_Exception.hxx"
16 //#include "MEDMEM_STRING.hxx"
17 //#include "utilities.h"
19 using namespace MEDMEM;
21 GENDRIVER *DRIVERFACTORY::buildDriverForMesh(driverTypes driverType, const std::string & fileName, MESH *mesh,const string & driverName)
27 MED_MESH_RDWR_DRIVER *retmed=new MED_MESH_RDWR_DRIVER(fileName,mesh);
28 retmed->setMeshName(driverName);
33 ret=new GIBI_MESH_RDWR_DRIVER(fileName,mesh);
37 case PORFLOW_DRIVER : {
38 ret=new PORFLOW_MESH_RDWR_DRIVER(fileName,mesh);
43 ret=new VTK_MESH_DRIVER(fileName,mesh);
48 throw MED_EXCEPTION ("NO_DRIVER has been specified to the method which is not allowed");
51 throw MED_EXCEPTION ("other driver than MED_DRIVER GIBI_DRIVER PORFLOW_DRIVER and VT_DRIVER has been specified to the method which is not allowed");
55 GENDRIVER *DRIVERFACTORY::buildDriverForMed(driverTypes driverType, const std::string & fileName, MED *med)
61 ret=new MED_MED_RDWR_DRIVER(fileName,med);
66 ret=new VTK_MED_DRIVER(fileName,med);
71 throw MED_EXCEPTION ("GIBI_DRIVER has been specified to the method which is not allowed because there is no GIBI driver for the MED object");
75 case PORFLOW_DRIVER : {
76 throw MED_EXCEPTION ("PORFLOW_DRIVER has been specified to the method which is not allowed because there is no PORFLOW driver for the MED object");
81 throw MED_EXCEPTION ("NO_DRIVER has been specified to the method which is not allowed");
85 throw MED_EXCEPTION ("NO_DRIVER has been specified to the method which is not allowed");