22 #ifndef _HDF5SERIE_GROUP_H_ 23 #define _HDF5SERIE_GROUP_H_ 25 #include <hdf5serie/interface.h> 26 #include <boost/filesystem.hpp> 35 void close()
override;
37 void refresh()
override;
38 void flush()
override;
39 Dataset *openChildDataset(
const std::string &name_, ElementType *objectType, hid_t *type);
40 void handleExternalLink(
const std::string &name_);
46 return getFileAsGroup()->createChildObject<T>(path.substr(1));
49 if((pos=path.find_last_of(
'/'))==std::string::npos)
52 GroupBase *group=dynamic_cast<GroupBase*>(openChildObject(path.substr(0, pos)));
54 throw Exception(getPath(),
"Got a path (including /) but this object is not a group");
55 return group->createChildObject<T>(path.substr(pos+1));
59 T* openChildObject(
const std::string &path) {
60 handleExternalLink(path);
62 return getFileAsGroup()->openChildObject<T>(path.substr(1));
65 if((pos=path.find_first_of(
'/'))==std::string::npos)
68 GroupBase *group=dynamic_cast<GroupBase*>(openChildObject(path.substr(0, pos)));
70 throw Exception(getPath(),
"Got a path (including /) but this object is not a group");
71 return group->openChildObject<T>(path.substr(pos+1));
73 Object *openChildObject(
const std::string &name_, ElementType *objectType=
nullptr, hid_t *type=
nullptr);
74 std::set<std::string> getChildObjectNames();
75 bool hasChildObject(
const std::string &name_);
77 bool isExternalLink(
const std::string &name_);
78 std::pair<boost::filesystem::path, std::string> getExternalLink(
const std::string &name_);
79 void createExternalLink(
const std::string &name_,
const std::pair<boost::filesystem::path, std::string> &target);
80 void createSoftLink(
const std::string &name_,
const std::string &target);
89 void close()
override;
91 void refresh()
override;
92 void flush()
override;
Definition: interface.h:36
Definition: interface.h:201
Definition: interface.h:87
Definition: interface.h:263