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 ENSIGHT_MED_DRIVER_HXX
24 #define ENSIGHT_MED_DRIVER_HXX
27 #include "MEDMEM_STRING.hxx"
28 #include "MEDMEM_Utilities.hxx"
29 #include "MEDMEM_Exception.hxx"
31 #include "MEDMEM_EnsightUtils.hxx"
43 // ==============================================================================
45 * \brief Base of EnSight drivers
47 // ==============================================================================
49 class MEDMEM_EXPORT ENSIGHT_MED_DRIVER : public MEDMEM_ENSIGHT::_CaseFileDriver_User
53 virtual void openConst() const;
57 ENSIGHT_MED_DRIVER(const string & fileName, MED_EN::med_mode_acces accessMode);
58 ENSIGHT_MED_DRIVER(const ENSIGHT_MED_DRIVER & driver);
59 virtual ~ENSIGHT_MED_DRIVER();
65 // ==============================================================================
67 * \brief Reading EnSight driver
69 // ==============================================================================
71 class MEDMEM_EXPORT ENSIGHT_MED_RDONLY_DRIVER : public virtual ENSIGHT_MED_DRIVER
74 ENSIGHT_MED_RDONLY_DRIVER();
75 ENSIGHT_MED_RDONLY_DRIVER(const string & fileName, std::vector< FIELD_* >& fields);
76 ENSIGHT_MED_RDONLY_DRIVER(const ENSIGHT_MED_RDONLY_DRIVER & driver);
77 virtual ~ENSIGHT_MED_RDONLY_DRIVER();
78 virtual void write ( void ) const throw (MEDEXCEPTION) ;
79 virtual void read ( void ) ;
80 virtual void readFileStruct ( void ) ;
81 GENDRIVER * copy ( void ) const;
84 std::vector< FIELD_* > * _fields;
85 bool _isFileStructRead;
88 // ==============================================================================
90 * \brief Writing EnSight driver.
91 * To set writing format use
92 * setEnSightFormatForWriting(EnSightFormat) and
93 * setEnSightBinaryFormatForWriting(bool)
95 // ==============================================================================
97 class MEDMEM_EXPORT ENSIGHT_MED_WRONLY_DRIVER : public virtual ENSIGHT_MED_DRIVER
99 const std::vector< const FIELD_* > _fields;
101 ENSIGHT_MED_WRONLY_DRIVER();
102 ENSIGHT_MED_WRONLY_DRIVER(const string & fileName, const std::vector< const FIELD_* >& fields);
103 ENSIGHT_MED_WRONLY_DRIVER(const ENSIGHT_MED_WRONLY_DRIVER & driver);
104 virtual ~ENSIGHT_MED_WRONLY_DRIVER();
105 virtual void write ( void ) const throw (MEDEXCEPTION) ;
106 virtual void read ( void ) throw (MEDEXCEPTION) ;
107 GENDRIVER * copy ( void ) const;
113 #endif /* ENSIGTH_MED_DRIVER_HXX */