1 #ifndef DRIVERFACTORY_HXX
2 #define DRIVERFACTORY_HXX
4 #include "MEDMEM_GenDriver.hxx"
5 #include "MEDMEM_VtkFieldDriver.hxx"
6 #include "MEDMEM_MedFieldDriver.hxx"
12 template<class T> class FIELD;
15 namespace DRIVERFACTORY {
16 GENDRIVER *buildDriverForMesh(driverTypes driverType, const std::string & fileName, MESH *mesh,const string & driverName);
18 GENDRIVER *buildDriverForField(driverTypes driverType, const std::string & fileName, FIELD<T> *field);
19 GENDRIVER *buildDriverForMed(driverTypes driverType, const std::string & fileName, MED *med);
23 GENDRIVER *DRIVERFACTORY::buildDriverForField(driverTypes driverType, const std::string & fileName, FIELD<T> *field)
29 ret=new MED_FIELD_RDWR_DRIVER<T>(fileName,field);
34 ret=new VTK_FIELD_DRIVER<T>(fileName,field);
39 throw MED_EXCEPTION ("driverType other than MED_DRIVER and VTK_DRIVER has been specified to the method which is not allowed for the object FIELD");
43 case PORFLOW_DRIVER : {
44 throw MED_EXCEPTION ("driverType other than MED_DRIVER and VTK_DRIVER has been specified to the method which is not allowed for the object FIELD");
49 throw MED_EXCEPTION ("driverType other than MED_DRIVER and VTK_DRIVER has been specified to the method which is not allowed for the object FIELD");
53 MED_EXCEPTION ("driverType other than MED_DRIVER and VTK_DRIVER has been specified to the method which is not allowed for the object FIELD");