X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDMEM%2FMEDMEM_GenDriver.hxx;h=19e5f9084944903741b6cb476a2d2120b6f77998;hb=27b05f40839eaf9c17eace9921e80d0cfb1754c9;hp=9e9813cf7fdda46c3e1e7bd1fb8ca1f51f53b920;hpb=bc10f4836149793fd59a112ee25e888be5648f11;p=modules%2Fmed.git diff --git a/src/MEDMEM/MEDMEM_GenDriver.hxx b/src/MEDMEM/MEDMEM_GenDriver.hxx index 9e9813cf7..19e5f9084 100644 --- a/src/MEDMEM/MEDMEM_GenDriver.hxx +++ b/src/MEDMEM/MEDMEM_GenDriver.hxx @@ -1,43 +1,13 @@ -// 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 #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; /*! @@ -45,7 +15,10 @@ 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 : @@ -54,10 +27,11 @@ 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. @@ -66,7 +40,7 @@ public: /*! Constructor. */ - GENDRIVER(const string & fileName,med_mode_acces accessMode); + GENDRIVER(const string & fileName,MED_EN::med_mode_acces accessMode); /*! Copy constructor. */ @@ -92,6 +66,11 @@ public: 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. */ @@ -100,6 +79,11 @@ public: 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. */ @@ -120,9 +104,9 @@ public: 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 */