37 if (vector.template isType<bool>()) {
38 writeVector(vector.template get<bool>(), target, filepath);
39 }
else if (vector.template isType<uint64_t>()) {
40 writeVector(vector.template get<uint64_t>(), target, filepath);
41 }
else if (vector.template isType<int64_t>()) {
42 writeVector(vector.template get<int64_t>(), target, filepath);
43 }
else if (vector.template isType<double>()) {
44 writeVector(vector.template get<double>(), target, filepath);
46 STORM_LOG_THROW(
false, storm::exceptions::UnexpectedException,
"Unexpected type.");
87 static_assert(UmbStructure::FileNames.size() == boost::pfr::tuple_size_v<UmbStructure>,
"Number of file names does not match number of fields in struct.");
88 boost::pfr::for_each_field(umbStructure, [&](
auto const& field, std::size_t fieldIndex) {
90 std::filesystem::path fieldName = std::data(UmbStructure::FileNames)[fieldIndex];
92 using FieldType = std::remove_cvref_t<
decltype(field)>;
94 if (!fieldName.empty()) {
100 if (!fieldName.empty()) {
106 if (!field.empty() && !fieldName.empty()) {
110 }
else if constexpr (std::is_same_v<FieldType, storm::umb::ModelIndex>) {
113 for (
auto const& [path, data] : field) {
114 if (path.has_parent_path()) {
117 writeVector(data, target, context / fieldName / path);
119 }
else if constexpr (std::is_same_v<FieldType, GenericVector>) {
120 if (field.template isType<storm::RationalNumber>() || field.template isType<storm::RationalInterval>()) {
123 "Unable to export rational vector '" << (context / fieldName) <<
"' to UMB. Rational values must be encoded prior to export");
124 }
else if (field.template isType<storm::Interval>()) {
nlohmann::basic_json< std::map, std::vector, std::string, bool, int64_t, uint64_t, ValueType > json