|
@@ -29,11 +29,30 @@ hdf4cpp::HdfFile::HdfFile(const std::string& path) {
|
|
loneRefs.push_back(std::pair<int32, Type>(ref, VDATA));
|
|
loneRefs.push_back(std::pair<int32, Type>(ref, VDATA));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-hdf4cpp::HdfFile::~HdfFile() {
|
|
|
|
|
|
+hdf4cpp::HdfFile::HdfFile(HdfFile&& file) {
|
|
|
|
+ sId = file.sId;
|
|
|
|
+ vId = file.vId;
|
|
|
|
+ loneRefs = file.loneRefs;
|
|
|
|
+ file.sId = file.vId = FAIL;
|
|
|
|
+ loneRefs.clear();
|
|
|
|
+}
|
|
|
|
+hdf4cpp::HdfFile& hdf4cpp::HdfFile::operator=(HdfFile&& file) {
|
|
|
|
+ destroy();
|
|
|
|
+ sId = file.sId;
|
|
|
|
+ vId = file.vId;
|
|
|
|
+ loneRefs = file.loneRefs;
|
|
|
|
+ file.sId = file.vId = FAIL;
|
|
|
|
+ loneRefs.clear();
|
|
|
|
+ return *this;
|
|
|
|
+}
|
|
|
|
+void hdf4cpp::HdfFile::destroy() {
|
|
SDend(sId);
|
|
SDend(sId);
|
|
Vend(vId);
|
|
Vend(vId);
|
|
Hclose(vId);
|
|
Hclose(vId);
|
|
}
|
|
}
|
|
|
|
+hdf4cpp::HdfFile::~HdfFile() {
|
|
|
|
+ destroy();
|
|
|
|
+}
|
|
int32 hdf4cpp::HdfFile::getDatasetId(const std::string &name) {
|
|
int32 hdf4cpp::HdfFile::getDatasetId(const std::string &name) {
|
|
int32 index = SDnametoindex(sId, name.c_str());
|
|
int32 index = SDnametoindex(sId, name.c_str());
|
|
return (index == FAIL) ? (FAIL) : (SDselect(sId, index));
|
|
return (index == FAIL) ? (FAIL) : (SDselect(sId, index));
|