Skip Navigation Links.

H5FileId Class

H5FileId identifies an H5 file object. Instances of this class are returned from H5create and H5open.

Namespace:  HDF5DotNet
Assembly:  HDF5DotNet (in HDF5DotNet.dll)

Syntax

Visual Basic
Public Class H5FileId _
	Implements H5LocId, H5FileOrGroupId, H5ObjectWithAttributes
C#
public class H5FileId : H5LocId, H5FileOrGroupId, 
	H5ObjectWithAttributes
Visual C++
public ref class H5FileId : H5LocId, 
	H5FileOrGroupId, H5ObjectWithAttributes
JavaScript
HDF5DotNet.H5FileId = function();

Type.createClass(
	'HDF5DotNet.H5FileId',
	null,
	HDF5DotNet.H5LocId,
	HDF5DotNet.H5FileOrGroupId,
	HDF5DotNet.H5ObjectWithAttributes);

Examples

[C#]

 Copy imageCopy Code
try
{
   // Create an HDF5 file.
   H5FileId fileId = H5F.create("myCSharp.h5", 
                                 H5F.CreateMode.ACC_TRUNC);
   // Create a HDF5 group.  
   H5GroupId groupId = H5G.create(fileId, "/cSharpGroup", 0);
   H5G.close(groupId);
   H5F.close(openId);
}
catch (HDFException e)
{
   Console.WriteLine(e.Message);
}

[Visual Basic .NET]

Imports HDF5DotNet
 Copy imageCopy Code
Module Module1
 Sub Main()
     Dim FileId As H5FileId
     Dim GroupId As H5GroupId

        Try
            FileId = H5F.create("HDF5_fromVB", H5F.CreateMode.ACC_TRUNC)
            GroupId = H5G.create(FileId, "/vbGroup", _
                                H5F.CreateMode.ACC_TRUNC)
            
            H5G.close(GroupId)
            H5F.close(FileId)
        Catch ex As HDFException
            Console.WriteLine(ex.Message())

        End Try
        Console.WriteLine("Processing complete!")
        Console.ReadLine()
    End Sub
End Module

[C++/Cli]

try { // Create an HDF5 file. H5FileId^ fileId = H5F::create("myCpp.h5", H5F::CreateMode::ACC_TRUNC); // Create a HDF5 group. H5GroupId^ groupId = H5G::create(fileId, "/cppGroup", 0); // Close the group. H5G::close(groupId); // Close the file H5F::close(fileId); } catch (HDFException^ e) { Console::WriteLine(e->Message); }
 Copy imageCopy Code

Inheritance Hierarchy

Object
  HDF5DotNet..::..H5FileId

See Also