DOKK / manpages / debian 12 / libpdl-io-hdf5-perl / PDL::IO::HDF5::Group.3pm.en
HDF5::Group(3pm) User Contributed Perl Documentation HDF5::Group(3pm)

PDL::IO::HDF5::Group - PDL::IO::HDF5 Helper Object representing HDF5 groups.

This is a helper-object used by PDL::IO::HDF5 to interface with HDF5 format's group objects. Information on the HDF5 Format can be found at the HDF Group's web site at http://www.hdfgroup.org .

See PDL::IO::HDF5

ID number given to the group by the HDF5 library
Name of the group. (Absolute to the root group '/'. e.g. /maingroup/subgroup)
Ref to parent object (file or group) that owns this group.
Ref to the PDL::IO::HDF5 object that owns this object.

####---------------------------------------------------------

PDL::IO::HDF5::Group Constructor - creates new object

Usage:

This object will usually be created using the calling format detailed in the SYNOPSIS. The following syntax is used by the PDL::IO::HDF5 object to build the object.

   $a = new PDL::IO::HDF5:Group( name => $name, parent => $parent,
                              fileObj => $fileObj );
        Args:
        $name                           Name of the group (relative to the parent)
        $parent                         Parent Object that owns this group
        $fileObj                        PDL::HDF (Top Level) object that owns this group.

DESTROY

PDL::IO::HDF5 Destructor - Closes the HDF5::Group Object.

Usage:

   No Usage. Automatically called

Set the value of an attribute(s)

Supports null-terminated strings, integers and floating point scalar and 1D array attributes.

Usage:

   $group->attrSet( 'attr1' => 'attr1Value',
                    'attr2' => 'attr2 value', 
                    'attr3' => $pdl,
                    .
                    .
                    .
                   );

Returns undef on failure, 1 on success.

Get the value of an attribute(s)

Supports null-terminated strings, integer and floating point scalar and 1D array attributes.

Usage:

   my @attrs = $group->attrGet( 'attr1', 'attr2');

Delete attribute(s)

Usage:

   $group->attrDel( 'attr1', 
                    'attr2',
                    .
                    .
                    .
                   );

Returns undef on failure, 1 on success.

Get a list of all attribute names in a group

Usage:

   @attrs = $group->attrs;

Open an existing or create a new dataset in a group.

Usage:

   $dataset = $group->dataset('newdataset');

Returns undef on failure, 1 on success.

Get a list of all dataset names in a group. (Relative to the current group)

Usage:

   @datasets = $group->datasets;

Open an existing or create a new group in an existing group.

Usage:

   $newgroup = $oldgroup->group("newgroup");

Returns undef on failure, 1 on success.

Get a list of all group names in a group. (Relative to the current group)

Usage:

   @groupNames = $group->groups;

Internal Recursive Method to build the attribute index hash for the object

For the purposes of indexing groups by their attributes, the attributes are applied hierarchial. i.e. any attributes of the higher level groups are assumed to be apply for the lower level groups.

Usage:

   $group->_buildAttrIndex($index, $currentAttrs);
    
 Input/Output:
         $index:        Total Index hash ref
         $currentAttrs: Hash refs of the attributes valid 
                        for the current group.

Returns the HDF5 library ID for this object

Usage:

 my $ID = $groupObj->IDget;

Returns the HDF5 Group Name for this object. (Relative to the root group)

Usage:

 my $name = $groupObj->nameGet;

Creates a reference to a region of a dataset.

Usage:

  $groupObj->reference($referenceName,$datasetObj,@regionStart,@regionCount);

Create a reference named $referenceName within the group $groupObj to a subroutine of the dataset $datasetObj. The region to be referenced is defined by the @regionStart and @regionCount arrays.

Unlink an object from a group.

Usage:

  $groupObj->unlink($objectName);

Unlink the named object from the group.

2022-11-30 perl v5.36.0