File indexing completed on 2026-09-22 08:54:39
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 Group() = default;
0051
0052 std::pair<unsigned int, unsigned int> getEstimatedLinkInfo() const;
0053
0054
0055 GroupCreateProps getCreatePropertyList() const {
0056 return details::get_plist<GroupCreateProps>(*this, H5Gget_create_plist);
0057 }
0058
0059 explicit Group(Object&& o) noexcept
0060 : Object(std::move(o)) {};
0061
0062 protected:
0063 using Object::Object;
0064
0065 friend Group detail::make_group(hid_t);
0066 friend class File;
0067 friend class Reference;
0068 #if HIGHFIVE_HAS_FRIEND_DECLARATIONS
0069 template <typename Derivate>
0070 friend class ::HighFive::NodeTraits;
0071 #endif
0072 };
0073
0074 inline std::pair<unsigned int, unsigned int> Group::getEstimatedLinkInfo() const {
0075 auto gcpl = getCreatePropertyList();
0076 auto eli = EstimatedLinkInfo(gcpl);
0077 return std::make_pair(eli.getEntries(), eli.getNameLength());
0078 }
0079
0080 namespace detail {
0081 inline Group make_group(hid_t hid) {
0082 return Group(hid);
0083 }
0084 }
0085
0086 }