<?xml version="1.0" encoding="UTF-8"?>
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
*
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
*
-->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="h5close" xml:lang="en">
    <refnamediv>
        <refname>h5close</refname>
        <refpurpose>Close a HDF5 object</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            h5close([obj_1 [, obj_2 [, ...]]])
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>obj_i</term>
                <listitem>
                    <para>a H5Object</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>Close an object and all its descendants. That allows to free all the memory associated to this object.</para>
        <para>All the buffers associated to the file are flushed before closing it.</para>
        <para>With no arguments, all the opened objects are closed.</para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
x = ["Hello" "World"; "Salut" "Monde"];
save(TMPDIR + "/x.sod", "x"); // SOD files are HDF5 ones

// Open the created file
a = h5open(TMPDIR + "/x.sod");

// Dump the file content
h5dump(a);

// Open the dataset named "x"
ds = a.root.x

// Get the attribute 'SCILAB_Class'
attr = ds.SCILAB_Class

// Read its value
attr.data

// Get the data from ds
d = ds.data

// We have finished with the dataset
h5close(ds)

// attr has been open from ds so attr is now not available
// ... so an error
attr

// We have finished so we free all the resources
h5close(a);
    ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="h5open">h5open</link>
            </member>
            <member>
                <link linkend="h5group">h5group</link>
            </member>
            <member>
                <link linkend="h5dataset">h5dataset</link>
            </member>
            <member>
                <link linkend="h5attr">h5attr</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>5.5.0</revnumber>
                <revremark>HDF5 module introduced.</revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>
