1 // Copyright (C) 2007-2013 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
19 // Author : Anthony Geay (CEA/DEN)
21 #ifndef __MEDFILEDATA_HXX__
22 #define __MEDFILEDATA_HXX__
24 #include "MEDCouplingAutoRefCountObjectPtr.hxx"
25 #include "MEDFileParameter.hxx"
26 #include "MEDFileField.hxx"
27 #include "MEDFileMesh.hxx"
34 class MEDLOADER_EXPORT MEDFileData : public RefCountObject, public MEDFileWritable
37 static MEDFileData *New(const char *fileName) throw(INTERP_KERNEL::Exception);
38 static MEDFileData *New();
39 MEDFileData *deepCpy() const throw(INTERP_KERNEL::Exception);
40 std::size_t getHeapMemorySize() const;
41 MEDFileFields *getFields() const;
42 MEDFileMeshes *getMeshes() const;
43 MEDFileParameters *getParams() const;
44 void setFields(MEDFileFields *fields) throw(INTERP_KERNEL::Exception);
45 void setMeshes(MEDFileMeshes *meshes) throw(INTERP_KERNEL::Exception);
46 void setParams(MEDFileParameters *params) throw(INTERP_KERNEL::Exception);
47 int getNumberOfFields() const throw(INTERP_KERNEL::Exception);
48 int getNumberOfMeshes() const throw(INTERP_KERNEL::Exception);
49 int getNumberOfParams() const throw(INTERP_KERNEL::Exception);
50 std::string simpleRepr() const;
52 bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
53 bool changeMeshName(const char *oldMeshName, const char *newMeshName) throw(INTERP_KERNEL::Exception);
54 bool unPolyzeMeshes() throw(INTERP_KERNEL::Exception);
56 void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
59 MEDFileData(const char *fileName) throw(INTERP_KERNEL::Exception);
61 MEDCouplingAutoRefCountObjectPtr<MEDFileFields> _fields;
62 MEDCouplingAutoRefCountObjectPtr<MEDFileMeshes> _meshes;
63 MEDCouplingAutoRefCountObjectPtr<MEDFileParameters> _params;