1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef DRIVERFACTORY_HXX
24 #define DRIVERFACTORY_HXX
28 #include "MEDMEM_MedVersion.hxx"
29 #include "MEDMEM_GenDriver.hxx"
30 #include "MEDMEM_define.hxx"
32 #include "MEDMEM_FieldForward.hxx"
42 namespace DRIVERFACTORY {
44 MEDMEM_EXPORT extern bool globalVtkBinaryFormatForWriting;
46 MEDMEM_EXPORT bool getVtkBinaryFormatForWriting();
48 MEDMEM_EXPORT void setVtkBinaryFormatForWriting(bool isBinary);
50 MEDMEM_EXPORT driverTypes deduceDriverTypeFromFileName(const std::string & fileName);
52 driverTypes deduceDriverTypeFromFileName(const std::string & fileName);
54 MEDMEM_EXPORT GENDRIVER * buildDriverForMesh(driverTypes driverType,
55 const std::string & fileName,
56 GMESH *mesh,const string & driverName,
57 MED_EN::med_mode_acces access);
59 template<class T, class INTERLACING_TAG>
60 GENDRIVER * buildDriverForField(driverTypes driverType,
61 const std::string & fileName,
62 FIELD<T,INTERLACING_TAG> *fielde,
63 MED_EN::med_mode_acces access);
64 MEDMEM_EXPORT GENDRIVER * buildMeshDriverFromFile(const string & fileName,
66 MED_EN::med_mode_acces access);
67 template<class T, class INTERLACING_TAG>
68 GENDRIVER * buildFieldDriverFromFile(const string & fileName,
69 FIELD<T,INTERLACING_TAG> * ptrField,
70 MED_EN::med_mode_acces access);
71 MEDMEM_EXPORT GENDRIVER * buildConcreteMedDriverForMesh(const std::string & fileName,
73 const string & driverName,
74 MED_EN::med_mode_acces access,
75 MED_EN::medFileVersion version);
76 template<class T, class INTERLACING_TAG>
77 GENDRIVER * buildConcreteMedDriverForField(const std::string & fileName,
78 FIELD<T,INTERLACING_TAG> *fielde,
79 MED_EN::med_mode_acces access,
80 MED_EN::medFileVersion version);
84 #include"MEDMEM_DriverFactory.ixx"