Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
H5Group Class Reference

A group within an HDF5 file. More...

#include <H5Group.hpp>

Inheritance diagram for H5Group:
H5Object H5Object H5Identifier MemCore::ReferenceBase< H5Object > H5Identifier MemCore::ReferenceBase< H5Object > MemCore::ReferenceBase< H5Identifier > MemCore::ReferenceBase< H5Identifier >

Classes

struct  Create
struct  Iterator
class  Member

Public Types

using iterator_f = std::function<herr_t(hid_t loc_id, const char *name, const H5L_info2_t *info)>
using iterator_f2 = std::function<herr_t(hid_t loc_id, const char *name, const H5L_type_t link_type)>
using iterator_f = std::function<herr_t(hid_t loc_id, const char *name, const H5L_info_t *info)>
Public Types inherited from H5Identifier
template<class T>
using refptr = MemCore::RefPtr<T>
Public Types inherited from MemCore::ReferenceBase< H5Identifier >
typedef Object reference_domain_t
typedef WeakPtr< Object, Object > SelfPtr_t
Public Types inherited from MemCore::ReferenceBase< H5Object >
typedef Object reference_domain_t
typedef WeakPtr< Object, Object > SelfPtr_t

Public Member Functions

 H5Group (hid_t ParentGroup, const char *groupname, const refptr< H5GroupAccess > &AP=nullptr)
 H5Group (hid_t ParentGroup, const std::string &groupname, const refptr< H5GroupAccess > &AP=nullptr)
 H5Group (const refptr< H5Group > &ParentGroup, const char *groupname, const refptr< H5GroupAccess > &AP=nullptr)
 H5Group (const refptr< H5Group > &ParentGroup, const std::string &groupname, const refptr< H5GroupAccess > &AP=nullptr)
 H5Group (const refptr< H5File > &ParentGroup, const char *groupname, const refptr< H5GroupAccess > &AP=nullptr)
 H5Group (const refptr< H5File > &ParentGroup, const std::string &groupname, const refptr< H5GroupAccess > &AP=nullptr)
 H5Group (const Create &, hid_t ParentGroup, const char *new_groupname, const refptr< H5LinkCreateProperty > &link_creation_property_list_identifier=nullptr, const refptr< H5GroupCreateProperty > &group_creation_property_list_identifier=nullptr, const refptr< H5GroupAccess > &group_access_property_list_identifier=nullptr)
 H5Group (const Create &C, const refptr< H5Group > &ParentGroup, const char *new_groupname, const refptr< H5LinkCreateProperty > &link_creation_property_list_identifier=nullptr, const refptr< H5GroupCreateProperty > &group_creation_property_list_identifier=nullptr, const refptr< H5GroupAccess > &group_access_property_list_identifier=nullptr)
 H5Group (const Create &C, const refptr< H5File > &ParentGroup, const char *new_groupname, const refptr< H5LinkCreateProperty > &link_creation_property_list_identifier=nullptr, const refptr< H5GroupCreateProperty > &group_creation_property_list_identifier=nullptr, const refptr< H5GroupAccess > &group_access_property_list_identifier=nullptr)
 H5Group (const Create &C, hid_t ParentGroup, const std::string &new_groupname, const refptr< H5LinkCreateProperty > &link_creation_property_list_identifier=nullptr, const refptr< H5GroupCreateProperty > &group_creation_property_list_identifier=nullptr, const refptr< H5GroupAccess > &group_access_property_list_identifier=nullptr)
 H5Group (const Create &C, const refptr< H5Group > &ParentGroup, const std::string &new_groupname, const refptr< H5LinkCreateProperty > &link_creation_property_list_identifier=nullptr, const refptr< H5GroupCreateProperty > &group_creation_property_list_identifier=nullptr, const refptr< H5GroupAccess > &group_access_property_list_identifier=nullptr)
 H5Group (const Create &C, const refptr< H5File > &ParentGroup, const std::string &new_groupname, const refptr< H5LinkCreateProperty > &link_creation_property_list_identifier=nullptr, const refptr< H5GroupCreateProperty > &group_creation_property_list_identifier=nullptr, const refptr< H5GroupAccess > &group_access_property_list_identifier=nullptr)
hsize_t NumberOfEntries () const
hsize_t get_nlinks () const
bool get_group_info (H5G_info_t &group_info) const
 Get info about a group, which is part of H5G_info_t :
std::pair< bool, H5G_info_t > get_group_info () const
hid_t Dopen_id (const char *datasetname, const refptr< H5DatasetAccess > &AP) const
hid_t Dopen_id (const std::string &datasetname, const refptr< H5DatasetAccess > &AP) const
MemCore::RefPtr< H5GroupGopen (const char *groupname, const refptr< H5GroupAccess > &AP) const
refptr< H5GroupGopen (const std::string &groupname, const refptr< H5GroupAccess > &AP) const
refptr< H5DatasetDopen (const char *datasetname, const refptr< H5DatasetAccess > &AP=nullptr) const
refptr< H5DatasetDopen (const std::string &datasetname, const refptr< H5DatasetAccess > &AP=nullptr) const
bool isNamedDataType (const char *groupname) const
refptr< H5DataTypeTopen (const char *groupname) const
herr_t traverse (Iterator &It, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_NATIVE, hsize_t *idx=0) const
herr_t iterate (const iterator_f &F, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_NATIVE, hsize_t *idx=0) const
 Allow for lambda iterator:
herr_t iterate (const iterator_f2 &F, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_NATIVE, hsize_t *idx=0) const
 Allow for lambda iterator:
herr_t rename (const std::string &src, const std::string &dst) const
 Rename a member within the same group.
herr_t remove (const char *name) const
herr_t remove (const std::string &name) const
herr_t create_external (const std::string &link_destination_filename, const std::string &link_destination_object_name, const std::string &link_name, hid_t lcpl_id, hid_t lapl_id) const
 Create an external link in this group.
herr_t create_external (const std::string &link_destination_filename, const std::string &link_destination_object_name, const std::string &link_name, const refptr< H5LinkCreateProperty > &lcpl=nullptr, const refptr< H5ExternalLinkAccess > &lapl=nullptr)
 Create an external link in this group.
 H5Group (hid_t ParentGroup, const char *groupname, const RefPtr< H5GroupAccess > &AP)
 H5Group (hid_t ParentGroup, const std::string &groupname, const RefPtr< H5GroupAccess > &AP)
int NumberOfEntries () const
hid_t Dopen_id (const char *datasetname, const RefPtr< H5DatasetAccess > &AP) const
hid_t Dopen_id (const std::string &datasetname, const RefPtr< H5DatasetAccess > &AP) const
MemCore::RefPtr< H5GroupGopen (const char *groupname, const RefPtr< H5GroupAccess > &AP) const
MemCore::RefPtr< H5GroupGopen (const std::string &groupname, const RefPtr< H5GroupAccess > &AP) const
MemCore::RefPtr< H5DatasetDopen (const char *datasetname, const RefPtr< H5DatasetAccess > &AP) const
MemCore::RefPtr< H5DatasetDopen (const std::string &datasetname, const RefPtr< H5DatasetAccess > &AP) const
bool isNamedDataType (const char *groupname) const
MemCore::RefPtr< H5DataTypeTopen (const char *groupname) const
Member member (const std::string &name) const
herr_t traverse (Iterator &It, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_NATIVE, hsize_t *idx=0) const
herr_t iterate (const iterator_f &F, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_NATIVE, hsize_t *idx=0) const
 Allow for lambda iterator:
herr_t rename (const std::string &src, const std::string &dst) const
 Rename a member within the same group.
herr_t remove (const char *name) const
herr_t remove (const std::string &name) const
Public Member Functions inherited from H5Object
 H5Object (hid_t parent_id, const char *name, hid_t link_access_properties=H5P_DEFAULT)
 H5Oopen().
 H5Object (const refptr< H5Object > &parent, const char *name, hid_t link_access_properties=H5P_DEFAULT)
 H5Oopen().
 H5Object (hid_t parent_id, const char *name, const H5LinkAccess &link_access_properties)
 H5Oopen().
 H5Object (const refptr< H5Object > &parent, const char *name, const H5LinkAccess &link_access_properties)
 H5Oopen().
bool Awrite (const char *AttributeName, hid_t file_type_id, hid_t mem_type_id, const void *data, size_t Elements) const
bool Awrite (const std::string &AttributeName, hid_t file_type_id, hid_t mem_type_id, const void *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, hid_t type_id, const void *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const int16_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const int32_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const int64_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const uint16_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const uint32_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const uint64_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const double *data, size_t Elements=1) const
template<class name_t, class value_type>
bool Awrite (const name_t &AttributeName, const value_type &value) const
template<class T>
bool Awrite (const std::string &AttributeName, const std::vector< T > &data) const
bool Awrite (const char *AttributeName, const std::string &data) const
bool Awrite (const std::string &AttributeName, const std::string &data) const
std::string getFilename () const
 Get the filename associated with this HDF5 object.
std::string get_filename () const
 Get the filename associated with this HDF5 object.
std::filesystem::path getFilePath () const
 Get the filename associated with this HDF5 object.
std::string get_name () const
std::string get_object_path () const
std::string get_object_path_within_file () const
std::string get_path () const
herr_t get_info (H5O_info2_t &object_info, unsigned info_fields) const
time_t get_modification_time () const
hsize_t num_attribs () const
H5O_type_t get_type () const
refptr< H5Objectget_typed_object () const
time_t get_age () const
hid_t getHid () const
hid_t getHidClone () const
bool isValid () const
bool Awrite (const char *AttributeName, hid_t file_type_id, hid_t mem_type_id, const void *data, size_t Elements) const
bool Awrite (const std::string &AttributeName, hid_t file_type_id, hid_t mem_type_id, const void *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, hid_t type_id, const void *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const int16_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const int32_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const int64_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const uint16_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const uint32_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const uint64_t *data, size_t Elements) const
template<class name_t>
bool Awrite (const name_t &AttributeName, const double *data, size_t Elements=1) const
template<class name_t, class value_type>
bool Awrite (const name_t &AttributeName, const value_type &value) const
template<class T>
bool Awrite (const std::string &AttributeName, const std::vector< T > &data) const
bool Awrite (const char *AttributeName, const std::string &data) const
bool Awrite (const std::string &AttributeName, const std::string &data) const
Public Member Functions inherited from H5Identifier
void inc_ref () const
void dec_ref () const
hid_t getHid () const
 Get the associated HDF5 ID.
hid_t getHidClone () const
 Get a copy of the associated HDF5 ID.
hid_t clone () const
 Get a copy of the associated HDF5 ID.
bool isValid () const
 Check whether this HDF5 object is valid, i.e., has a valid ID.
Public Member Functions inherited from MemCore::ReferenceBase< H5Identifier >
auto getObjectCountID () const noexcept
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
void mkAutoDestructive ()
refcount_t refcount () const noexcept
 ReferenceBase (Object *that) noexcept
const auto & self () const
refcount_t wrefcount () const noexcept
Public Member Functions inherited from MemCore::ReferenceBase< H5Object >
auto getObjectCountID () const noexcept
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
void mkAutoDestructive ()
refcount_t refcount () const noexcept
 ReferenceBase (Object *that) noexcept
const auto & self () const
refcount_t wrefcount () const noexcept

Static Public Member Functions

static herr_t remove (hid_t loc_id, const char *name)
 Delete an entry from a group.
static herr_t remove (hid_t loc_id, const std::string &name)
static herr_t create_external (const std::string &link_destination_filename, const std::string &link_destination_object_name, hid_t loc_id, const std::string &link_name, hid_t lcpl_id, hid_t lapl_id)
 Calls H5Lcreate_external().
static herr_t create_external (const std::string &link_destination_filename, const std::string &link_destination_object_name, hid_t loc_id, const std::string &link_name, const refptr< H5LinkCreateProperty > &lcpl=nullptr, const refptr< H5ExternalLinkAccess > &lapl=nullptr)
 Create an external link in the group specified by loc_id .
static herr_t remove (hid_t loc_id, const char *name)
 Delete an entry from a group.
static herr_t remove (hid_t loc_id, const std::string &name)
Static Public Member Functions inherited from H5Object
static std::string getFilename (hid_t hid)
 Gets the filename associated with the given HDF5 ID, a wrapper to H5Fget_name() .
static std::filesystem::path getFilePath (hid_t hid)
static std::string get_name (hid_t hid)
 Gets the name associated with the given HDF5 ID, a wrapper to H5Iget_name() .
template<class Lambda>
static auto Silentio (const Lambda &L) -> decltype(L())
static bool isActive ()
static void CloseLibrary ()
Static Public Member Functions inherited from H5Identifier
static consteval hid_t invalid_id ()
template<class Lambda>
static auto Silentio (const Lambda &L) -> decltype(L())
static bool isActive ()
 Check whether the HDF5 library is active, i.e., has been correctly initialized and not been closed already.

Protected Member Functions

 H5Group (const H5Group &)=delete
 H5Group (const H5Group &)
Protected Member Functions inherited from H5Object
 H5Object (const H5Object &)=delete
H5Objectoperator= (const H5Object &)=delete
 H5Object (hid_t ID)
 H5Object (const H5Object &)=delete
H5Objectoperator= (const H5Object &)=delete
 H5Object (hid_t ID)
Protected Member Functions inherited from H5Identifier
 H5Identifier (hid_t id)
 H5Identifier (const H5Identifier &)=delete
H5Identifieroperator= (const H5Identifier &)=delete
Protected Member Functions inherited from MemCore::ReferenceBase< H5Identifier >
virtual void extremeUnction ()
ReferenceBaseoperator= (const ReferenceBase &R)
void suicide ()
Protected Member Functions inherited from MemCore::ReferenceBase< H5Object >
virtual void extremeUnction ()
ReferenceBaseoperator= (const ReferenceBase &R)
void suicide ()

Friends

H5Object::refptr< H5ObjectH5Object::get_typed_object () const

Additional Inherited Members

Protected Attributes inherited from H5Object
hid_t hid
Protected Attributes inherited from H5Identifier
hid_t hid = 0

Detailed Description

A group within an HDF5 file.

Member Function Documentation

◆ create_external() [1/4]

herr_t H5Group::create_external ( const std::string & link_destination_filename,
const std::string & link_destination_object_name,
const std::string & link_name,
const refptr< H5LinkCreateProperty > & lcpl = nullptr,
const refptr< H5ExternalLinkAccess > & lapl = nullptr )
inline

Create an external link in this group.

Parameters
link_destination_filenameTo which file the link shall point
link_destination_object_nameHow the destination is called in the existing HDF5 file
link_name< How the link shall be called
lcpl< Link property
lapl< Link access

References create_external(), H5Identifier::getHid(), and H5Property::getId().

◆ create_external() [2/4]

herr_t H5Group::create_external ( const std::string & link_destination_filename,
const std::string & link_destination_object_name,
const std::string & link_name,
hid_t lcpl_id,
hid_t lapl_id ) const
inline

Create an external link in this group.

Parameters
link_destination_filenameTo which file the link shall point
link_destination_object_nameHow the destination is called in the existing HDF5 file
link_name< How the link shall be called
lcpl_id< Link property ID
lapl_id< Link access ID

References create_external(), and H5Identifier::getHid().

◆ create_external() [3/4]

herr_t H5Group::create_external ( const std::string & link_destination_filename,
const std::string & link_destination_object_name,
hid_t loc_id,
const std::string & link_name,
const refptr< H5LinkCreateProperty > & lcpl = nullptr,
const refptr< H5ExternalLinkAccess > & lapl = nullptr )
inlinestatic

Create an external link in the group specified by loc_id .

Parameters
link_destination_filenameTo which file the link shall point
link_destination_object_nameHow the destination is called in the existing HDF5 file
loc_idWhere the link shall be created
link_name< How the link shall be called
lcpl< Link property
lapl< Link access

References create_external(), and H5Property::getId().

◆ create_external() [4/4]

herr_t H5Group::create_external ( const std::string & link_destination_filename,
const std::string & link_destination_object_name,
hid_t loc_id,
const std::string & link_name,
hid_t lcpl_id,
hid_t lapl_id )
static

Calls H5Lcreate_external().

< Link access ID

Parameters
link_destination_filenameTo which file the link shall point
link_destination_object_nameHow the destination is called in the existing HDF5 file
loc_idWhere the link shall be created
link_name< How the link shall be called
lcpl_id< Link property ID

References std::basic_string< typename _CharT, typename _Traits, typename _Alloc >::c_str().

Referenced by create_external(), create_external(), create_external(), and Fiber::F5Skeleton::F5save().

◆ get_group_info()

bool H5Group::get_group_info ( H5G_info_t & group_info) const

Get info about a group, which is part of H5G_info_t :

H5G_storage_type_t storage_type;
hsize_t nlinks;
int64_t max_corder;
hbool_t mounted;

References H5Identifier::getHid(), and H5Identifier::isValid().

◆ iterate() [1/3]

herr_t H5Group::iterate ( const iterator_f & F,
H5_index_t index_type = H5_INDEX_NAME,
H5_iter_order_t order = H5_ITER_NATIVE,
hsize_t * idx = 0 ) const

Allow for lambda iterator:

myGroup->iterate( [](hid_t loc_id, const char *name, const H5L_info2_t *info) -> herr_t
{
...
return 0;
}
);

References apply().

◆ iterate() [2/3]

herr_t H5Group::iterate ( const iterator_f & F,
H5_index_t index_type = H5_INDEX_NAME,
H5_iter_order_t order = H5_ITER_NATIVE,
hsize_t * idx = 0 ) const

Allow for lambda iterator:

myGroup->iterate( [](hid_t loc_id, const char *name, const H5L_info_t *info) -> herr_t
{
...
return 0;
}
);

◆ iterate() [3/3]

herr_t H5Group::iterate ( const iterator_f2 & F,
H5_index_t index_type = H5_INDEX_NAME,
H5_iter_order_t order = H5_ITER_NATIVE,
hsize_t * idx = 0 ) const

Allow for lambda iterator:

myGroup->iterate( [](hid_t loc_id, const char *name, const H5L_type_t link_type) -> herr_t
{
switch(link_type)
{
case H5L_TYPE_ERROR:
case H5L_TYPE_HARD:
case H5L_TYPE_SOFT:
case H5L_TYPE_EXTERNAL:
}
return 0;
}
);

References H5Identifier::getHid().

◆ remove() [1/2]

herr_t H5Group::remove ( hid_t loc_id,
const char * name )
static

◆ remove() [2/2]

herr_t H5Group::remove ( hid_t loc_id,
const char * name )
static

◆ rename() [1/2]

herr_t H5Group::rename ( const std::string & src,
const std::string & dst ) const

Rename a member within the same group.

Calls H5Lmove().

◆ rename() [2/2]

herr_t H5Group::rename ( const std::string & src,
const std::string & dst ) const

Rename a member within the same group.

Calls H5Lmove().