1 #include "MEDMEM_TopLevel.hxx"
2 #include "MEDMEM_Med.hxx"
3 #include "MEDMEM_Mesh.hxx"
4 #include "MEDMEM_Field.hxx"
5 #include "MEDMEM_DriverFactory.hxx"
6 #include "MEDMEM_MedMedDriver.hxx"
8 using namespace MED_EN;
9 using namespace MEDMEM;
11 MED *::MEDMEM::readMedInFile(const std::string& fileName) throw(MEDEXCEPTION)
13 MED *myMedObj=new MED;
14 driverTypes type=DRIVERFACTORY::deduceDriverTypeFromFileName(fileName);
15 int id=myMedObj->addDriver(type,fileName,MED_REMP);
20 MESH *::MEDMEM::readMeshInFile(const std::string& fileName, const std::string& meshName)
23 driverTypes type=DRIVERFACTORY::deduceDriverTypeFromFileName(fileName);
24 int id=mesh->addDriver(type,fileName,mesh->getName(),MED_REMP);
29 void ::MEDMEM::writeMedToFile(const MED *medObj, const std::string& fileName)
31 MED *medObjNoC=(MED *)medObj;//MED::write should be a const method ... As it's not the case
32 driverTypes type=DRIVERFACTORY::deduceDriverTypeFromFileName(fileName);
33 int id=medObjNoC->addDriver(type,fileName,MED_REMP);
37 void ::MEDMEM::writeMeshToFile(const MESH *meshObj, const std::string& fileName)
39 MESH *meshObjNoC=(MESH *)meshObj;//MED::write should be a const method ... As it's not the case
40 driverTypes type=DRIVERFACTORY::deduceDriverTypeFromFileName(fileName);
41 int id=meshObjNoC->addDriver(type,fileName,meshObjNoC->getName(),MED_REMP);
42 meshObjNoC->write(id);