Back to index

salome-med  6.5.0
MEDMEM_DriverFactory.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef DRIVERFACTORY_HXX
00024 #define DRIVERFACTORY_HXX
00025 
00026 #include <MEDMEM.hxx>
00027 
00028 #include "MEDMEM_MedVersion.hxx"
00029 #include "MEDMEM_GenDriver.hxx"
00030 #include "MEDMEM_define.hxx"
00031 
00032 #include "MEDMEM_FieldForward.hxx"
00033 
00034 #include <string>
00035 
00036 namespace MEDMEM {
00037 
00038   class GMESH;
00039   //class MED;
00040   class GENDRIVER;
00041 
00042   namespace DRIVERFACTORY {
00043 
00044     MEDMEM_EXPORT extern bool globalVtkBinaryFormatForWriting;
00045 
00046     MEDMEM_EXPORT bool getVtkBinaryFormatForWriting();
00047 
00048     MEDMEM_EXPORT void setVtkBinaryFormatForWriting(bool isBinary);
00049 
00050     MEDMEM_EXPORT driverTypes deduceDriverTypeFromFileName(const std::string & fileName);
00051 
00052     driverTypes deduceDriverTypeFromFileName(const std::string & fileName);
00053 
00054     MEDMEM_EXPORT GENDRIVER * buildDriverForMesh(driverTypes driverType,
00055                                                  const std::string & fileName,
00056                                                  GMESH *mesh,const string &  driverName,
00057                                                  MED_EN::med_mode_acces access);
00058 
00059     template<class T, class INTERLACING_TAG>
00060     GENDRIVER * buildDriverForField(driverTypes driverType,
00061                                     const std::string & fileName,
00062                                     FIELD<T,INTERLACING_TAG> *fielde,
00063                                     MED_EN::med_mode_acces access);
00064     MEDMEM_EXPORT GENDRIVER * buildMeshDriverFromFile(const string & fileName,
00065                                                       GMESH * ptrMesh,
00066                                                       MED_EN::med_mode_acces access);
00067     template<class T, class INTERLACING_TAG>
00068     GENDRIVER * buildFieldDriverFromFile(const string & fileName,
00069                                          FIELD<T,INTERLACING_TAG> * ptrField,
00070                                          MED_EN::med_mode_acces access);
00071     MEDMEM_EXPORT GENDRIVER * buildConcreteMedDriverForMesh(const std::string & fileName,
00072                                                             GMESH *mesh,
00073                                                             const string & driverName,
00074                                                             MED_EN::med_mode_acces access,
00075                                                             MED_EN::medFileVersion version);
00076     template<class T, class INTERLACING_TAG>
00077     GENDRIVER * buildConcreteMedDriverForField(const std::string & fileName,
00078                                                FIELD<T,INTERLACING_TAG> *fielde,
00079                                                MED_EN::med_mode_acces access,
00080                                                MED_EN::medFileVersion version);
00081   }
00082 }
00083 
00084 #include"MEDMEM_DriverFactory.ixx"
00085 
00086 #endif