1 // SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
40 // A file study.hdf with 2 groups : MESH and GEOM
41 hdf_file = new HDFfile("study.hdf");
43 hdf_file->CreateOnDisk();
45 hdf_group = new HDFgroup("GEOM",hdf_file);
47 hdf_group->CreateOnDisk();
49 hdf_group->CloseOnDisk();
53 hdf_group = new HDFgroup("MESH",hdf_file);
55 hdf_group->CreateOnDisk();
57 hdf_group->CloseOnDisk();
61 hdf_file->CloseOnDisk();
65 // a file mesh.hdf with 2 groups MESH_1 and MESH_2
66 hdf_file = new HDFfile("mesh.hdf");
68 hdf_file->CreateOnDisk();
70 hdf_group = new HDFgroup("MESH_1",hdf_file);
72 hdf_group->CreateOnDisk();
74 hdf_group->CloseOnDisk();
78 hdf_group = new HDFgroup("MESH_2",hdf_file);
80 hdf_group->CreateOnDisk();
82 hdf_group->CloseOnDisk();
86 hdf_file->CloseOnDisk();
90 // a file geom.hdf with 2 groups GEOM_1 and GEOM_2
91 hdf_file = new HDFfile("geom.hdf");
93 hdf_file->CreateOnDisk();
95 hdf_group = new HDFgroup("GEOM_1",hdf_file);
97 hdf_group->CreateOnDisk();
99 hdf_group->CloseOnDisk();
103 hdf_group = new HDFgroup("GEOM_2",hdf_file);
105 hdf_group->CreateOnDisk();
107 hdf_group->CloseOnDisk();
111 hdf_file->CloseOnDisk();
117 MESSAGE( "!!!! HDFexception !!!" )