-// MED MEDMEM : MED files in memory
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : MEDMEM_GenDriver.hxx
-// Module : MED
-
#ifndef GENDRIVER_HXX
#define GENDRIVER_HXX
#include <string>
#include "MEDMEM_define.hxx"
-#include "utilities.h"
+#include "MEDMEM_Utilities.hxx"
/* Generic Read/Write Driver Class for Meshes & Fields */
-/* Modify the following line to add a new driver type (step 1) */
-typedef enum { MED_DRIVER = 0, GIBI_DRIVER = 1, VTK_DRIVER = 254, NO_DRIVER = 255 } driverTypes;
-
-using namespace MED_EN;
using namespace std;
/*!
Virtual class GENDRIVER use by all driver.
*/
+namespace MEDMEM {
+/* Modify the following line to add a new driver type (step 1) */
+typedef enum { MED_DRIVER = 0, GIBI_DRIVER = 1, PORFLOW_DRIVER = 2, VTK_DRIVER = 254, ASCII_DRIVER = 3, NO_DRIVER = 255 } driverTypes;
class GENDRIVER {
protected :
// the MedMedDriver index of the driver vector in the MED object where it has been created
/*File related part*/
string _fileName; // The name of the file currently in use.
- med_mode_acces _accessMode; // The file access mode set by the adequate construtor.
+ MED_EN::med_mode_acces _accessMode; // The file access mode set by the adequate construtor.
int _status; // The file status {MED_INVALID, MED_OPENED, MED_CLOSED }
driverTypes _driverType; // A FAIRE LE POSITIONNER DS TOUTES LES SS CLASSES !!
+
public:
/*!
Constructor.
/*!
Constructor.
*/
- GENDRIVER(const string & fileName,med_mode_acces accessMode);
+ GENDRIVER(const string & fileName,MED_EN::med_mode_acces accessMode);
/*!
Copy constructor.
*/
Open file.
*/
virtual void open ( void ) = 0;
+ /*!
+ Open file with the append option. This method is used especially
+ on ASCII drivers (e.g. VTK_DRIVER).
+ */
+ virtual void openAppend ( void );
/*!
Close file.
*/
Write object in opened file.
*/
virtual void write( void ) const = 0;
+ /*!
+ Write object in opened file. This method is used especially
+ on ASCII drivers (e.g. VTK_DRIVER).
+ */
+ virtual void writeAppend( void ) const;
/*!
Read object in opened file.
*/
int getId ( void ) const ;
string getFileName () const;
void setFileName ( const string & fileName);
- med_mode_acces getAccessMode() const;
+ MED_EN::med_mode_acces getAccessMode() const;
+};
};
-
#endif /* GENDRIVER_HXX */