]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/MEDMEM_VtkMedDriver.hxx
Salome HOME
Fix problem of make distcheck
[modules/med.git] / src / MEDMEM / MEDMEM_VtkMedDriver.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef VTK_MED_DRIVER_HXX
24 #define VTK_MED_DRIVER_HXX
25
26 #include "MEDMEM.hxx"
27
28 #include <string>
29 #include "MEDMEM_STRING.hxx"
30 #include "MEDMEM_Utilities.hxx"
31 #include "MEDMEM_Exception.hxx"
32
33 #include "MEDMEM_GenDriver.hxx"
34
35 #include <fstream>
36 #include <vector>
37
38 using namespace std ;
39
40
41 namespace MEDMEM {
42 class GMESH;
43 class SUPPORT;
44 class FIELD_;
45 class MED;
46 // This driver pilots within a VTK class read/write accesses of fields/meshes
47 class MEDMEM_EXPORT VTK_MED_DRIVER : public GENDRIVER
48 {
49 protected:
50
51   const std::vector< const FIELD_* > _fields;
52   
53 private:
54   VTK_MED_DRIVER();
55
56   void open()   ;
57   void close()  ;
58   void openConst()  const ;
59   void closeConst() const ;
60
61 public :
62   VTK_MED_DRIVER(const string & fileName, const std::vector< const FIELD_* >& fields);
63   VTK_MED_DRIVER(const VTK_MED_DRIVER & driver);
64   ~VTK_MED_DRIVER();
65   // OPERATEUR DE RECOPIE AVEC _vtkFile ??
66
67   //virtual void write          ( void )  ;
68   void write                 ( void ) const ;
69   virtual void read          ( void )  {} ;
70   //  virtual void writeFrom      ( void ) const ;
71   //  virtual void read           ( void ) ;
72   GENDRIVER * copy (void ) const ;
73
74 private :
75   void writeMesh(const GMESH * myMesh) const ;
76   void writeField(const FIELD_ * myField, std::string name) const ;
77 //   void writeSupport(SUPPORT * mySupport) const ;
78
79 };
80 }
81
82
83 #endif /* VTK_MED_DRIVER_HXX */