<?xml version="1.0" encoding="utf-8"?>
<!--
* Scilab ( https://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="h5get" xml:lang="en">
    <refnamediv>
        <refname>h5get</refname>
        <refpurpose>Get a named object</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            nobj = h5get(obj, location [, isAttr])
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>obj</term>
                <listitem>
                    <para>a H5Object</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>location</term>
                <listitem>
                    <para>a string giving the location</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>isAttr</term>
                <listitem>
                    <para>a boolean to indicate that an attribute must be got</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>nobj</term>
                <listitem>
                    <para>a H5Object</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>Get the object with the given location under obj. If isAttr is %T, an H5 object is returned (if it exists), by default isAttr is %F.</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");

// Get the root object, this equivalent to a.root or a("/")
r = h5get(a, "/")

// Get the dataset "x"
x = h5get(a, "/x") // or h5get(a.root, "x")
x.data

// Get an inexisting dataset
y = h5get(a.root, "blahblah")

// Get an attribute
attr = h5get(a.root, "SCILAB_scilab_version", %t)
attr.data

// We close all
h5close(a)
    ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="h5open">h5open</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>5.5.0</revnumber>
                <revremark>HDF5 module introduced.</revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>
