1 // Copyright (C) 2007-2015 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, or (at your option) any later version.
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 MEDFileData : public RefCountObject, public MEDFileWritable
37 MEDLOADER_EXPORT static MEDFileData *New(const std::string& fileName);
38 MEDLOADER_EXPORT static MEDFileData *New();
39 MEDLOADER_EXPORT MEDFileData *deepCpy() const;
40 MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
41 MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
42 MEDLOADER_EXPORT MEDFileFields *getFields() const;
43 MEDLOADER_EXPORT MEDFileMeshes *getMeshes() const;
44 MEDLOADER_EXPORT MEDFileParameters *getParams() const;
45 MEDLOADER_EXPORT void setFields(MEDFileFields *fields);
46 MEDLOADER_EXPORT void setMeshes(MEDFileMeshes *meshes);
47 MEDLOADER_EXPORT void setParams(MEDFileParameters *params);
48 MEDLOADER_EXPORT int getNumberOfFields() const;
49 MEDLOADER_EXPORT int getNumberOfMeshes() const;
50 MEDLOADER_EXPORT int getNumberOfParams() const;
51 MEDLOADER_EXPORT std::string simpleRepr() const;
53 MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
54 MEDLOADER_EXPORT bool changeMeshName(const std::string& oldMeshName, const std::string& newMeshName);
55 MEDLOADER_EXPORT bool unPolyzeMeshes();
57 MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const;
60 MEDFileData(const std::string& fileName);
62 MEDCouplingAutoRefCountObjectPtr<MEDFileFields> _fields;
63 MEDCouplingAutoRefCountObjectPtr<MEDFileMeshes> _meshes;
64 MEDCouplingAutoRefCountObjectPtr<MEDFileParameters> _params;