1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __MEDFILEDATA_HXX__
21 #define __MEDFILEDATA_HXX__
23 #include "MEDCouplingAutoRefCountObjectPtr.hxx"
24 #include "MEDFileField.hxx"
25 #include "MEDFileMesh.hxx"
32 class MEDLOADER_EXPORT MEDFileData : public RefCountObject, public MEDFileWritable
35 static MEDFileData *New(const char *fileName) throw(INTERP_KERNEL::Exception);
36 static MEDFileData *New();
37 MEDFileFields *getFields() const;
38 MEDFileMeshes *getMeshes() const;
39 void setFields(MEDFileFields *fields) throw(INTERP_KERNEL::Exception);
40 void setMeshes(MEDFileMeshes *meshes) throw(INTERP_KERNEL::Exception);
41 int getNumberOfFields() const throw(INTERP_KERNEL::Exception);
42 int getNumberOfMeshes() const throw(INTERP_KERNEL::Exception);
43 std::string simpleRepr() const;
45 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
46 bool changeMeshName(const char *oldMeshName, const char *newMeshName) throw(INTERP_KERNEL::Exception);
47 bool unPolyzeMeshes() throw(INTERP_KERNEL::Exception);
49 void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
52 MEDFileData(const char *fileName) throw(INTERP_KERNEL::Exception);
54 MEDCouplingAutoRefCountObjectPtr<MEDFileFields> _fields;
55 MEDCouplingAutoRefCountObjectPtr<MEDFileMeshes> _meshes;