22 #ifndef _HDF5SERIE_GROUP_H_ 23 #define _HDF5SERIE_GROUP_H_ 25 #include <hdf5serie/interface.h> 26 #include <boost/filesystem.hpp> 36 void close()
override;
38 void refresh()
override;
39 void flush()
override;
40 Dataset *openChildDataset(
const std::string &name_, ElementType *objectType, hid_t *type);
41 void handleExternalLink(
const std::string &name_);
47 return getFileAsGroup()->createChildObject<T>(path.substr(1));
50 if((pos=path.find_last_of(
'/'))==std::string::npos)
53 GroupBase *group=dynamic_cast<GroupBase*>(openChildObject(path.substr(0, pos)));
55 throw Exception(getPath(),
"Got a path (including /) but this object is not a group");
56 return group->createChildObject<T>(path.substr(pos+1));
60 T* openChildObject(
const std::string &path) {
61 handleExternalLink(path);
63 return getFileAsGroup()->openChildObject<T>(path.substr(1));
66 if((pos=path.find_first_of(
'/'))==std::string::npos)
69 GroupBase *group=dynamic_cast<GroupBase*>(openChildObject(path.substr(0, pos)));
71 throw Exception(getPath(),
"Got a path (including /) but this object is not a group");
72 return group->openChildObject<T>(path.substr(pos+1));
74 Object *openChildObject(
const std::string &name_, ElementType *objectType=
nullptr, hid_t *type=
nullptr);
75 std::list<std::string> getChildObjectNames();
76 bool hasChildObject(
const std::string &name_);
78 bool isExternalLink(
const std::string &name_);
79 std::pair<boost::filesystem::path, std::string> getExternalLink(
const std::string &name_);
80 void createExternalLink(
const std::string &name_,
const std::pair<boost::filesystem::path, std::string> &target);
81 void createSoftLink(
const std::string &name_,
const std::string &target);
90 void close()
override;
92 void refresh()
override;
93 void flush()
override;
Definition: interface.h:36
Definition: interface.h:201
Definition: interface.h:87
Definition: interface.h:263