Salome HOME
remove a reference to the $MED_ROOT_DIR in the Makefile.in wich is useless
[modules/med.git] / src / MEDMEM / MEDMEM_VtkMeshDriver.hxx
1 #ifndef VTK_MESH_DRIVER_HXX
2 #define VTK_MESH_DRIVER_HXX
3
4 #include <string>
5 #include <vector>
6 #include "MEDMEM_define.hxx"
7 #include "MEDMEM_GenDriver.hxx"
8
9 #include "MEDMEM_STRING.hxx"
10 #include "MEDMEM_Exception.hxx"
11 #include "utilities.h"
12
13 #include <fstream>
14
15
16 /*!
17
18   Driver Vtk for MESH (only for writing).
19
20   Generic part : implement open and close methods.
21
22 */
23 namespace MEDMEM {
24 class MESH;
25 class FAMILY;
26 class GROUP;
27 class CONNECTIVITY;
28 class VTK_MESH_DRIVER : public GENDRIVER
29 {
30 protected:
31
32   MESH *   _ptrMesh;
33   ofstream *        _vtkFile ;     // The _vtkFile used to write Meshes and Fields to _filename
34   string         _meshName;
35
36 public :
37
38   /*!
39     Constructor.
40   */
41   VTK_MESH_DRIVER() ;
42   /*!
43     Constructor.
44   */
45   VTK_MESH_DRIVER(const string & fileName,  MESH * ptrMesh) ;
46   /*!
47     Copy constructor.
48   */
49   VTK_MESH_DRIVER(const VTK_MESH_DRIVER & driver) ;
50
51   /*!
52     Destructor.
53   */
54   ~VTK_MESH_DRIVER() ;
55
56   void open() ;
57   void close() ;
58
59   void openConst() const throw (MEDEXCEPTION);
60   void closeConst() const throw (MEDEXCEPTION);
61
62   void write( void ) const throw (MEDEXCEPTION) ;
63   void read ( void ) throw (MEDEXCEPTION) ;
64
65   /*!
66     Set the name of the MESH asked in file.
67
68     It could be different than the name of the MESH object.
69   */
70   void   setMeshName(const string & meshName) ;
71   /*!
72     Get the name of the MESH asked in file.
73   */
74   string getMeshName() const ;
75
76 private:
77   GENDRIVER * copy ( void ) const;
78
79 };
80 };
81
82 #endif /* VTK_MESH_DRIVER_HXX */