Add dataset move logic to format

This commit is contained in:
2018-02-12 16:55:26 +01:00
parent 873af3b7c7
commit e1cfc457b1
3 changed files with 16 additions and 7 deletions
+11 -4
View File
@@ -4,6 +4,7 @@
#include <iostream>
#include <memory>
#include "../config.hpp"
#include "../H5Format.hpp"
using namespace std;
@@ -13,6 +14,7 @@ class NXmxFormat : public H5Format
{
shared_ptr<unordered_map<string, DATA_TYPE>> input_value_type = NULL;
shared_ptr<unordered_map<string, boost::any>> default_values = NULL;
shared_ptr<unordered_map<string, std::string>> dataset_move_mapping = NULL;
shared_ptr<h5_group> file_format = NULL;
public:
@@ -93,6 +95,11 @@ class NXmxFormat : public H5Format
{"samz", NX_FLOAT},
}));
dataset_move_mapping.reset(new std::unordered_map<string, string>(
{
{config::raw_image_dataset_name, "entry/plottable_data/image"},
}));
// Default values used in the file format.
default_values.reset(new std::unordered_map<string, boost::any>(
{
@@ -897,10 +904,6 @@ class NXmxFormat : public H5Format
}));
}
string get_frames_dataset_name() const override {
return "entry/plottable_data/data";
}
const h5_group& get_format_definition() const override {
return *file_format;
}
@@ -1052,4 +1055,8 @@ class NXmxFormat : public H5Format
return *input_value_type;
}
const unordered_map<string, string>& get_dataset_move_mapping() const override {
return *dataset_move_mapping;
}
};