File indexing completed on 2025-04-19 08:55:36
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include <H5Gpublic.h>
0012
0013 #include "H5Object.hpp"
0014 #include "bits/H5Friends.hpp"
0015 #include "bits/H5_definitions.hpp"
0016 #include "bits/H5Annotate_traits.hpp"
0017 #include "bits/H5Node_traits.hpp"
0018 #include "bits/H5Path_traits.hpp"
0019
0020 namespace HighFive {
0021
0022 namespace detail {
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 Group make_group(hid_t);
0039 }
0040
0041
0042
0043 class Group: public Object,
0044 public NodeTraits<Group>,
0045 public AnnotateTraits<Group>,
0046 public PathTraits<Group> {
0047 public:
0048 const static ObjectType type = ObjectType::Group;
0049
0050
0051 H5_DEPRECATED("Default constructor creates unsafe uninitialized objects")
0052 Group() = default;
0053
0054 std::pair<unsigned int, unsigned int> getEstimatedLinkInfo() const;
0055
0056
0057 GroupCreateProps getCreatePropertyList() const {
0058 return details::get_plist<GroupCreateProps>(*this, H5Gget_create_plist);
0059 }
0060
0061 Group(Object&& o) noexcept
0062 : Object(std::move(o)){};
0063
0064 protected:
0065 using Object::Object;
0066
0067 friend Group detail::make_group(hid_t);
0068 friend class File;
0069 friend class Reference;
0070 #if HIGHFIVE_HAS_FRIEND_DECLARATIONS
0071 template <typename Derivate>
0072 friend class ::HighFive::NodeTraits;
0073 #endif
0074 };
0075
0076 inline std::pair<unsigned int, unsigned int> Group::getEstimatedLinkInfo() const {
0077 auto gcpl = getCreatePropertyList();
0078 auto eli = EstimatedLinkInfo(gcpl);
0079 return std::make_pair(eli.getEntries(), eli.getNameLength());
0080 }
0081
0082 namespace detail {
0083 inline Group make_group(hid_t hid) {
0084 return Group(hid);
0085 }
0086 }
0087
0088 }