diff --git a/cwl_v1_2.h b/cwl_v1_2.h index e44232a..0963060 100644 --- a/cwl_v1_2.h +++ b/cwl_v1_2.h @@ -1,6 +1,9 @@ #pragma once -// Generated by schema-salad code generator +/* This file was generated using schema-salad code generator. + * + * The embedded document is subject to the license of the original schema. + */ #include #include @@ -66,9 +69,9 @@ inline void fromYaml(YAML::Node const& n, int64_t& v) { inline void fromYaml(YAML::Node const& n, std::string& v) { v = n.as(); } -inline void fromYaml(YAML::Node const& n, std::any& v) { +inline void fromYaml(YAML::Node const&, std::any&) { } -inline void fromYaml(YAML::Node const& n, std::monostate&) { +inline void fromYaml(YAML::Node const&, std::monostate&) { } inline void addYamlField(YAML::Node& node, std::string const& key, YAML::Node value) { @@ -118,7 +121,7 @@ void fromYaml(YAML::Node const& n, std::variant& t); template struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { + auto operator()(YAML::Node const&) const -> std::optional { return std::nullopt; } }; @@ -159,11 +162,10 @@ struct DetectAndExtractFromYaml> { } }; - - template class heap_object { std::unique_ptr data = std::make_unique(); + public: using value_t = T; heap_object() = default; @@ -215,7 +217,6 @@ class heap_object { auto operator*() const -> T const& { return *data; } - }; namespace https___w3id_org_cwl_salad { struct Documented; } @@ -2296,7 +2297,7 @@ inline auto https___w3id_org_cwl_salad::Documented::toYaml() const -> YAML::Node addYamlField(n, "doc", toYaml(*doc)); return n; } -inline void https___w3id_org_cwl_salad::Documented::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_salad::Documented::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["doc"], *doc); } @@ -2308,35 +2309,35 @@ inline auto https___w3id_org_cwl_salad::RecordField::toYaml() const -> YAML::Nod addYamlField(n, "type", toYaml(*type)); return n; } -inline void https___w3id_org_cwl_salad::RecordField::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_salad::RecordField::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_salad::Documented::fromYaml(n); fromYaml(n["name"], *name); fromYaml(n["type"], *type); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_salad::RecordField{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_salad::RecordField{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_salad::RecordSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -2345,34 +2346,36 @@ inline auto https___w3id_org_cwl_salad::RecordSchema::toYaml() const -> YAML::No addYamlField(n, "type", toYaml(*type)); return n; } -inline void https___w3id_org_cwl_salad::RecordSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_salad::RecordSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; - fromYaml(convertMapToList(n["fields"], "name"), *fields); + + fromYaml(convertMapToList(n["fields"], +"name"), *fields); fromYaml(n["type"], *type); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_salad::RecordSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["fields"], *res.fields); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_salad::RecordSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["fields"], *res.fields); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_salad::EnumSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -2381,41 +2384,41 @@ inline auto https___w3id_org_cwl_salad::EnumSchema::toYaml() const -> YAML::Node addYamlField(n, "type", toYaml(*type)); return n; } -inline void https___w3id_org_cwl_salad::EnumSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_salad::EnumSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["name"], *name); fromYaml(n["symbols"], *symbols); fromYaml(n["type"], *type); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_salad::EnumSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["symbols"], *res.symbols); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_salad::EnumSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["symbols"], *res.symbols); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_salad::ArraySchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -2423,34 +2426,34 @@ inline auto https___w3id_org_cwl_salad::ArraySchema::toYaml() const -> YAML::Nod addYamlField(n, "type", toYaml(*type)); return n; } -inline void https___w3id_org_cwl_salad::ArraySchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_salad::ArraySchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["items"], *items); fromYaml(n["type"], *type); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_salad::ArraySchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["items"], *res.items); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_salad::ArraySchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["items"], *res.items); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::File::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -2468,7 +2471,7 @@ inline auto https___w3id_org_cwl_cwl::File::toYaml() const -> YAML::Node { addYamlField(n, "contents", toYaml(*contents)); return n; } -inline void https___w3id_org_cwl_cwl::File::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::File::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["class"], *class_); fromYaml(n["location"], *location); @@ -2484,88 +2487,88 @@ inline void https___w3id_org_cwl_cwl::File::fromYaml(YAML::Node const& n) { fromYaml(n["contents"], *contents); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::File{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["location"], *res.location); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["path"], *res.path); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["basename"], *res.basename); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["dirname"], *res.dirname); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["nameroot"], *res.nameroot); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["nameext"], *res.nameext); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["checksum"], *res.checksum); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["size"], *res.size); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["secondaryFiles"], *res.secondaryFiles); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["format"], *res.format); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["contents"], *res.contents); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::File{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["location"], *res.location); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["path"], *res.path); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["basename"], *res.basename); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["dirname"], *res.dirname); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["nameroot"], *res.nameroot); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["nameext"], *res.nameext); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["checksum"], *res.checksum); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["size"], *res.size); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["secondaryFiles"], *res.secondaryFiles); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["format"], *res.format); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["contents"], *res.contents); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::Directory::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -2576,7 +2579,7 @@ inline auto https___w3id_org_cwl_cwl::Directory::toYaml() const -> YAML::Node { addYamlField(n, "listing", toYaml(*listing)); return n; } -inline void https___w3id_org_cwl_cwl::Directory::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Directory::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["class"], *class_); fromYaml(n["location"], *location); @@ -2585,46 +2588,46 @@ inline void https___w3id_org_cwl_cwl::Directory::fromYaml(YAML::Node const& n) { fromYaml(n["listing"], *listing); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::Directory{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["location"], *res.location); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["path"], *res.path); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["basename"], *res.basename); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["listing"], *res.listing); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::Directory{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["location"], *res.location); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["path"], *res.path); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["basename"], *res.basename); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["listing"], *res.listing); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline https___w3id_org_cwl_cwl::Labeled::~Labeled() = default; inline auto https___w3id_org_cwl_cwl::Labeled::toYaml() const -> YAML::Node { using ::toYaml; @@ -2632,7 +2635,7 @@ inline auto https___w3id_org_cwl_cwl::Labeled::toYaml() const -> YAML::Node { addYamlField(n, "label", toYaml(*label)); return n; } -inline void https___w3id_org_cwl_cwl::Labeled::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Labeled::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["label"], *label); } @@ -2643,7 +2646,7 @@ inline auto https___w3id_org_cwl_cwl::Identified::toYaml() const -> YAML::Node { addYamlField(n, "id", toYaml(*id)); return n; } -inline void https___w3id_org_cwl_cwl::Identified::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Identified::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["id"], *id); } @@ -2655,7 +2658,7 @@ inline auto https___w3id_org_cwl_cwl::LoadContents::toYaml() const -> YAML::Node addYamlField(n, "loadListing", toYaml(*loadListing)); return n; } -inline void https___w3id_org_cwl_cwl::LoadContents::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::LoadContents::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["loadContents"], *loadContents); fromYaml(n["loadListing"], *loadListing); @@ -2669,7 +2672,7 @@ inline auto https___w3id_org_cwl_cwl::FieldBase::toYaml() const -> YAML::Node { addYamlField(n, "streamable", toYaml(*streamable)); return n; } -inline void https___w3id_org_cwl_cwl::FieldBase::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::FieldBase::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::Labeled::fromYaml(n); fromYaml(n["secondaryFiles"], *secondaryFiles); @@ -2682,7 +2685,7 @@ inline auto https___w3id_org_cwl_cwl::InputFormat::toYaml() const -> YAML::Node addYamlField(n, "format", toYaml(*format)); return n; } -inline void https___w3id_org_cwl_cwl::InputFormat::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InputFormat::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["format"], *format); } @@ -2693,7 +2696,7 @@ inline auto https___w3id_org_cwl_cwl::OutputFormat::toYaml() const -> YAML::Node addYamlField(n, "format", toYaml(*format)); return n; } -inline void https___w3id_org_cwl_cwl::OutputFormat::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OutputFormat::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["format"], *format); } @@ -2706,7 +2709,7 @@ inline auto https___w3id_org_cwl_cwl::Parameter::toYaml() const -> YAML::Node { n = mergeYaml(n, https___w3id_org_cwl_cwl::Identified::toYaml()); return n; } -inline void https___w3id_org_cwl_cwl::Parameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Parameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::FieldBase::fromYaml(n); https___w3id_org_cwl_salad::Documented::fromYaml(n); @@ -2718,27 +2721,27 @@ inline auto https___w3id_org_cwl_cwl::InputBinding::toYaml() const -> YAML::Node addYamlField(n, "loadContents", toYaml(*loadContents)); return n; } -inline void https___w3id_org_cwl_cwl::InputBinding::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InputBinding::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["loadContents"], *loadContents); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::InputBinding{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::InputBinding{}; - if constexpr (IsConstant::value) try { - fromYaml(n["loadContents"], *res.loadContents); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["loadContents"], *res.loadContents); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline https___w3id_org_cwl_cwl::IOSchema::~IOSchema() = default; inline auto https___w3id_org_cwl_cwl::IOSchema::toYaml() const -> YAML::Node { using ::toYaml; @@ -2748,7 +2751,7 @@ inline auto https___w3id_org_cwl_cwl::IOSchema::toYaml() const -> YAML::Node { addYamlField(n, "name", toYaml(*name)); return n; } -inline void https___w3id_org_cwl_cwl::IOSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::IOSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::Labeled::fromYaml(n); https___w3id_org_cwl_salad::Documented::fromYaml(n); @@ -2761,7 +2764,7 @@ inline auto https___w3id_org_cwl_cwl::InputSchema::toYaml() const -> YAML::Node n = mergeYaml(n, https___w3id_org_cwl_cwl::IOSchema::toYaml()); return n; } -inline void https___w3id_org_cwl_cwl::InputSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InputSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::IOSchema::fromYaml(n); } @@ -2772,7 +2775,7 @@ inline auto https___w3id_org_cwl_cwl::OutputSchema::toYaml() const -> YAML::Node n = mergeYaml(n, https___w3id_org_cwl_cwl::IOSchema::toYaml()); return n; } -inline void https___w3id_org_cwl_cwl::OutputSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OutputSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::IOSchema::fromYaml(n); } @@ -2790,7 +2793,7 @@ inline auto https___w3id_org_cwl_cwl::InputRecordField::toYaml() const -> YAML:: addYamlField(n, "loadListing", toYaml(*loadListing)); return n; } -inline void https___w3id_org_cwl_cwl::InputRecordField::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InputRecordField::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["doc"], *doc); fromYaml(n["name"], *name); @@ -2803,70 +2806,70 @@ inline void https___w3id_org_cwl_cwl::InputRecordField::fromYaml(YAML::Node cons fromYaml(n["loadListing"], *loadListing); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::InputRecordField{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["secondaryFiles"], *res.secondaryFiles); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["streamable"], *res.streamable); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["format"], *res.format); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["loadContents"], *res.loadContents); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["loadListing"], *res.loadListing); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::InputRecordField{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["secondaryFiles"], *res.secondaryFiles); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["streamable"], *res.streamable); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["format"], *res.format); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["loadContents"], *res.loadContents); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["loadListing"], *res.loadListing); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::InputRecordSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -2878,55 +2881,57 @@ inline auto https___w3id_org_cwl_cwl::InputRecordSchema::toYaml() const -> YAML: addYamlField(n, "name", toYaml(*name)); return n; } -inline void https___w3id_org_cwl_cwl::InputRecordSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InputRecordSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; - fromYaml(convertMapToList(n["fields"], "name"), *fields); + + fromYaml(convertMapToList(n["fields"], +"name"), *fields); fromYaml(n["type"], *type); fromYaml(n["label"], *label); fromYaml(n["doc"], *doc); fromYaml(n["name"], *name); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::InputRecordSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["fields"], *res.fields); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::InputRecordSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["fields"], *res.fields); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::InputEnumSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -2934,22 +2939,22 @@ inline auto https___w3id_org_cwl_cwl::InputEnumSchema::toYaml() const -> YAML::N n = mergeYaml(n, https___w3id_org_cwl_cwl::InputSchema::toYaml()); return n; } -inline void https___w3id_org_cwl_cwl::InputEnumSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InputEnumSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_salad::EnumSchema::fromYaml(n); https___w3id_org_cwl_cwl::InputSchema::fromYaml(n); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::InputEnumSchema{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::InputEnumSchema{}; - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::InputArraySchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -2960,7 +2965,7 @@ inline auto https___w3id_org_cwl_cwl::InputArraySchema::toYaml() const -> YAML:: addYamlField(n, "name", toYaml(*name)); return n; } -inline void https___w3id_org_cwl_cwl::InputArraySchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InputArraySchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["items"], *items); fromYaml(n["type"], *type); @@ -2969,46 +2974,46 @@ inline void https___w3id_org_cwl_cwl::InputArraySchema::fromYaml(YAML::Node cons fromYaml(n["name"], *name); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::InputArraySchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["items"], *res.items); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::InputArraySchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["items"], *res.items); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::OutputRecordField::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3021,7 +3026,7 @@ inline auto https___w3id_org_cwl_cwl::OutputRecordField::toYaml() const -> YAML: addYamlField(n, "format", toYaml(*format)); return n; } -inline void https___w3id_org_cwl_cwl::OutputRecordField::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OutputRecordField::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["doc"], *doc); fromYaml(n["name"], *name); @@ -3032,58 +3037,58 @@ inline void https___w3id_org_cwl_cwl::OutputRecordField::fromYaml(YAML::Node con fromYaml(n["format"], *format); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::OutputRecordField{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["secondaryFiles"], *res.secondaryFiles); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["streamable"], *res.streamable); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["format"], *res.format); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::OutputRecordField{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["secondaryFiles"], *res.secondaryFiles); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["streamable"], *res.streamable); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["format"], *res.format); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::OutputRecordSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3095,55 +3100,57 @@ inline auto https___w3id_org_cwl_cwl::OutputRecordSchema::toYaml() const -> YAML addYamlField(n, "name", toYaml(*name)); return n; } -inline void https___w3id_org_cwl_cwl::OutputRecordSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OutputRecordSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; - fromYaml(convertMapToList(n["fields"], "name"), *fields); + + fromYaml(convertMapToList(n["fields"], +"name"), *fields); fromYaml(n["type"], *type); fromYaml(n["label"], *label); fromYaml(n["doc"], *doc); fromYaml(n["name"], *name); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::OutputRecordSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["fields"], *res.fields); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::OutputRecordSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["fields"], *res.fields); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::OutputEnumSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3151,22 +3158,22 @@ inline auto https___w3id_org_cwl_cwl::OutputEnumSchema::toYaml() const -> YAML:: n = mergeYaml(n, https___w3id_org_cwl_cwl::OutputSchema::toYaml()); return n; } -inline void https___w3id_org_cwl_cwl::OutputEnumSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OutputEnumSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_salad::EnumSchema::fromYaml(n); https___w3id_org_cwl_cwl::OutputSchema::fromYaml(n); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::OutputEnumSchema{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::OutputEnumSchema{}; - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::OutputArraySchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3177,7 +3184,7 @@ inline auto https___w3id_org_cwl_cwl::OutputArraySchema::toYaml() const -> YAML: addYamlField(n, "name", toYaml(*name)); return n; } -inline void https___w3id_org_cwl_cwl::OutputArraySchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OutputArraySchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["items"], *items); fromYaml(n["type"], *type); @@ -3186,46 +3193,46 @@ inline void https___w3id_org_cwl_cwl::OutputArraySchema::fromYaml(YAML::Node con fromYaml(n["name"], *name); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::OutputArraySchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["items"], *res.items); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::OutputArraySchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["items"], *res.items); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline https___w3id_org_cwl_cwl::InputParameter::~InputParameter() = default; inline auto https___w3id_org_cwl_cwl::InputParameter::toYaml() const -> YAML::Node { using ::toYaml; @@ -3236,7 +3243,7 @@ inline auto https___w3id_org_cwl_cwl::InputParameter::toYaml() const -> YAML::No addYamlField(n, "default", toYaml(*default_)); return n; } -inline void https___w3id_org_cwl_cwl::InputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::Parameter::fromYaml(n); https___w3id_org_cwl_cwl::InputFormat::fromYaml(n); @@ -3251,7 +3258,7 @@ inline auto https___w3id_org_cwl_cwl::OutputParameter::toYaml() const -> YAML::N n = mergeYaml(n, https___w3id_org_cwl_cwl::OutputFormat::toYaml()); return n; } -inline void https___w3id_org_cwl_cwl::OutputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OutputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::Parameter::fromYaml(n); https___w3id_org_cwl_cwl::OutputFormat::fromYaml(n); @@ -3262,7 +3269,7 @@ inline auto https___w3id_org_cwl_cwl::ProcessRequirement::toYaml() const -> YAML auto n = YAML::Node{}; return n; } -inline void https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; } inline https___w3id_org_cwl_cwl::Process::~Process() = default; @@ -3284,15 +3291,23 @@ inline auto https___w3id_org_cwl_cwl::Process::toYaml() const -> YAML::Node { addYamlField(n, "intent", toYaml(*intent)); return n; } -inline void https___w3id_org_cwl_cwl::Process::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Process::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::Identified::fromYaml(n); https___w3id_org_cwl_cwl::Labeled::fromYaml(n); https___w3id_org_cwl_salad::Documented::fromYaml(n); - fromYaml(convertMapToList(n["inputs"], "id"), *inputs); - fromYaml(convertMapToList(n["outputs"], "id"), *outputs); - fromYaml(convertMapToList(n["requirements"], "class"), *requirements); - fromYaml(convertMapToList(n["hints"], "class"), *hints); + + fromYaml(convertMapToList(n["inputs"], +"id"), *inputs); + + fromYaml(convertMapToList(n["outputs"], +"id"), *outputs); + + fromYaml(convertMapToList(n["requirements"], +"class"), *requirements); + + fromYaml(convertMapToList(n["hints"], +"class"), *hints); fromYaml(n["cwlVersion"], *cwlVersion); fromYaml(n["intent"], *intent); } @@ -3304,42 +3319,42 @@ inline auto https___w3id_org_cwl_cwl::InlineJavascriptRequirement::toYaml() cons addYamlField(n, "expressionLib", toYaml(*expressionLib)); return n; } -inline void https___w3id_org_cwl_cwl::InlineJavascriptRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InlineJavascriptRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); fromYaml(n["expressionLib"], *expressionLib); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::InlineJavascriptRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["expressionLib"], *res.expressionLib); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::InlineJavascriptRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["expressionLib"], *res.expressionLib); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline https___w3id_org_cwl_cwl::CommandInputSchema::~CommandInputSchema() = default; inline auto https___w3id_org_cwl_cwl::CommandInputSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; return n; } -inline void https___w3id_org_cwl_cwl::CommandInputSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandInputSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; } inline auto https___w3id_org_cwl_cwl::SchemaDefRequirement::toYaml() const -> YAML::Node { @@ -3350,35 +3365,35 @@ inline auto https___w3id_org_cwl_cwl::SchemaDefRequirement::toYaml() const -> YA addYamlField(n, "types", toYaml(*types)); return n; } -inline void https___w3id_org_cwl_cwl::SchemaDefRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::SchemaDefRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); fromYaml(n["types"], *types); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::SchemaDefRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["types"], *res.types); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::SchemaDefRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["types"], *res.types); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::SecondaryFileSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3386,34 +3401,34 @@ inline auto https___w3id_org_cwl_cwl::SecondaryFileSchema::toYaml() const -> YAM addYamlField(n, "required", toYaml(*required)); return n; } -inline void https___w3id_org_cwl_cwl::SecondaryFileSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::SecondaryFileSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["pattern"], *pattern); fromYaml(n["required"], *required); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::SecondaryFileSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["pattern"], *res.pattern); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["required"], *res.required); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::SecondaryFileSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["pattern"], *res.pattern); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["required"], *res.required); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::LoadListingRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3422,70 +3437,70 @@ inline auto https___w3id_org_cwl_cwl::LoadListingRequirement::toYaml() const -> addYamlField(n, "loadListing", toYaml(*loadListing)); return n; } -inline void https___w3id_org_cwl_cwl::LoadListingRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::LoadListingRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); fromYaml(n["loadListing"], *loadListing); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::LoadListingRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["loadListing"], *res.loadListing); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; -inline auto https___w3id_org_cwl_cwl::EnvironmentDef::toYaml() const -> YAML::Node { - using ::toYaml; - auto n = YAML::Node{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::LoadListingRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["loadListing"], *res.loadListing); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; +inline auto https___w3id_org_cwl_cwl::EnvironmentDef::toYaml() const -> YAML::Node { + using ::toYaml; + auto n = YAML::Node{}; addYamlField(n, "envName", toYaml(*envName)); addYamlField(n, "envValue", toYaml(*envValue)); return n; } -inline void https___w3id_org_cwl_cwl::EnvironmentDef::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::EnvironmentDef::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["envName"], *envName); fromYaml(n["envValue"], *envValue); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::EnvironmentDef{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["envName"], *res.envName); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["envValue"], *res.envValue); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::EnvironmentDef{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["envName"], *res.envName); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["envValue"], *res.envValue); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandLineBinding::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3498,7 +3513,7 @@ inline auto https___w3id_org_cwl_cwl::CommandLineBinding::toYaml() const -> YAML addYamlField(n, "shellQuote", toYaml(*shellQuote)); return n; } -inline void https___w3id_org_cwl_cwl::CommandLineBinding::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandLineBinding::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::InputBinding::fromYaml(n); fromYaml(n["position"], *position); @@ -3509,52 +3524,52 @@ inline void https___w3id_org_cwl_cwl::CommandLineBinding::fromYaml(YAML::Node co fromYaml(n["shellQuote"], *shellQuote); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandLineBinding{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["position"], *res.position); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["prefix"], *res.prefix); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["separate"], *res.separate); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["itemSeparator"], *res.itemSeparator); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["valueFrom"], *res.valueFrom); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["shellQuote"], *res.shellQuote); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandLineBinding{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["position"], *res.position); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["prefix"], *res.prefix); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["separate"], *res.separate); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["itemSeparator"], *res.itemSeparator); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["valueFrom"], *res.valueFrom); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["shellQuote"], *res.shellQuote); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandOutputBinding::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3563,62 +3578,62 @@ inline auto https___w3id_org_cwl_cwl::CommandOutputBinding::toYaml() const -> YA addYamlField(n, "outputEval", toYaml(*outputEval)); return n; } -inline void https___w3id_org_cwl_cwl::CommandOutputBinding::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandOutputBinding::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::LoadContents::fromYaml(n); fromYaml(n["glob"], *glob); fromYaml(n["outputEval"], *outputEval); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandOutputBinding{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["glob"], *res.glob); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outputEval"], *res.outputEval); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandOutputBinding{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["glob"], *res.glob); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outputEval"], *res.outputEval); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandLineBindable::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; addYamlField(n, "inputBinding", toYaml(*inputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::CommandLineBindable::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandLineBindable::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["inputBinding"], *inputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandLineBindable{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandLineBindable{}; - if constexpr (IsConstant::value) try { - fromYaml(n["inputBinding"], *res.inputBinding); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["inputBinding"], *res.inputBinding); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandInputRecordField::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3634,7 +3649,7 @@ inline auto https___w3id_org_cwl_cwl::CommandInputRecordField::toYaml() const -> addYamlField(n, "inputBinding", toYaml(*inputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::CommandInputRecordField::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandInputRecordField::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["doc"], *doc); fromYaml(n["name"], *name); @@ -3648,76 +3663,76 @@ inline void https___w3id_org_cwl_cwl::CommandInputRecordField::fromYaml(YAML::No fromYaml(n["inputBinding"], *inputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandInputRecordField{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["secondaryFiles"], *res.secondaryFiles); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["streamable"], *res.streamable); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["format"], *res.format); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["loadContents"], *res.loadContents); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["loadListing"], *res.loadListing); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputBinding"], *res.inputBinding); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandInputRecordField{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["secondaryFiles"], *res.secondaryFiles); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["streamable"], *res.streamable); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["format"], *res.format); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["loadContents"], *res.loadContents); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["loadListing"], *res.loadListing); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputBinding"], *res.inputBinding); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandInputRecordSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3730,9 +3745,11 @@ inline auto https___w3id_org_cwl_cwl::CommandInputRecordSchema::toYaml() const - addYamlField(n, "inputBinding", toYaml(*inputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::CommandInputRecordSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandInputRecordSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; - fromYaml(convertMapToList(n["fields"], "name"), *fields); + + fromYaml(convertMapToList(n["fields"], +"name"), *fields); fromYaml(n["type"], *type); fromYaml(n["label"], *label); fromYaml(n["doc"], *doc); @@ -3740,52 +3757,52 @@ inline void https___w3id_org_cwl_cwl::CommandInputRecordSchema::fromYaml(YAML::N fromYaml(n["inputBinding"], *inputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandInputRecordSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["fields"], *res.fields); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputBinding"], *res.inputBinding); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandInputRecordSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["fields"], *res.fields); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputBinding"], *res.inputBinding); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandInputEnumSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3797,7 +3814,7 @@ inline auto https___w3id_org_cwl_cwl::CommandInputEnumSchema::toYaml() const -> addYamlField(n, "inputBinding", toYaml(*inputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::CommandInputEnumSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandInputEnumSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["name"], *name); fromYaml(n["symbols"], *symbols); @@ -3807,52 +3824,52 @@ inline void https___w3id_org_cwl_cwl::CommandInputEnumSchema::fromYaml(YAML::Nod fromYaml(n["inputBinding"], *inputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandInputEnumSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["symbols"], *res.symbols); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputBinding"], *res.inputBinding); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandInputEnumSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["symbols"], *res.symbols); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputBinding"], *res.inputBinding); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandInputArraySchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3864,7 +3881,7 @@ inline auto https___w3id_org_cwl_cwl::CommandInputArraySchema::toYaml() const -> addYamlField(n, "inputBinding", toYaml(*inputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::CommandInputArraySchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandInputArraySchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["items"], *items); fromYaml(n["type"], *type); @@ -3874,52 +3891,52 @@ inline void https___w3id_org_cwl_cwl::CommandInputArraySchema::fromYaml(YAML::No fromYaml(n["inputBinding"], *inputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandInputArraySchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["items"], *res.items); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputBinding"], *res.inputBinding); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandInputArraySchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["items"], *res.items); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputBinding"], *res.inputBinding); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandOutputRecordField::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -3933,7 +3950,7 @@ inline auto https___w3id_org_cwl_cwl::CommandOutputRecordField::toYaml() const - addYamlField(n, "outputBinding", toYaml(*outputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::CommandOutputRecordField::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandOutputRecordField::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["doc"], *doc); fromYaml(n["name"], *name); @@ -3945,64 +3962,64 @@ inline void https___w3id_org_cwl_cwl::CommandOutputRecordField::fromYaml(YAML::N fromYaml(n["outputBinding"], *outputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandOutputRecordField{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["secondaryFiles"], *res.secondaryFiles); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["streamable"], *res.streamable); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["format"], *res.format); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outputBinding"], *res.outputBinding); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandOutputRecordField{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["secondaryFiles"], *res.secondaryFiles); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["streamable"], *res.streamable); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["format"], *res.format); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outputBinding"], *res.outputBinding); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandOutputRecordSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4014,55 +4031,57 @@ inline auto https___w3id_org_cwl_cwl::CommandOutputRecordSchema::toYaml() const addYamlField(n, "name", toYaml(*name)); return n; } -inline void https___w3id_org_cwl_cwl::CommandOutputRecordSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandOutputRecordSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; - fromYaml(convertMapToList(n["fields"], "name"), *fields); + + fromYaml(convertMapToList(n["fields"], +"name"), *fields); fromYaml(n["type"], *type); fromYaml(n["label"], *label); fromYaml(n["doc"], *doc); fromYaml(n["name"], *name); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandOutputRecordSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["fields"], *res.fields); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandOutputRecordSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["fields"], *res.fields); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandOutputEnumSchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4073,7 +4092,7 @@ inline auto https___w3id_org_cwl_cwl::CommandOutputEnumSchema::toYaml() const -> addYamlField(n, "doc", toYaml(*doc)); return n; } -inline void https___w3id_org_cwl_cwl::CommandOutputEnumSchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandOutputEnumSchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["name"], *name); fromYaml(n["symbols"], *symbols); @@ -4082,46 +4101,46 @@ inline void https___w3id_org_cwl_cwl::CommandOutputEnumSchema::fromYaml(YAML::No fromYaml(n["doc"], *doc); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandOutputEnumSchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["symbols"], *res.symbols); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandOutputEnumSchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["symbols"], *res.symbols); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandOutputArraySchema::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4132,7 +4151,7 @@ inline auto https___w3id_org_cwl_cwl::CommandOutputArraySchema::toYaml() const - addYamlField(n, "name", toYaml(*name)); return n; } -inline void https___w3id_org_cwl_cwl::CommandOutputArraySchema::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandOutputArraySchema::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["items"], *items); fromYaml(n["type"], *type); @@ -4141,46 +4160,46 @@ inline void https___w3id_org_cwl_cwl::CommandOutputArraySchema::fromYaml(YAML::N fromYaml(n["name"], *name); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandOutputArraySchema{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["items"], *res.items); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["name"], *res.name); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandOutputArraySchema{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["items"], *res.items); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["name"], *res.name); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandInputParameter::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4189,35 +4208,35 @@ inline auto https___w3id_org_cwl_cwl::CommandInputParameter::toYaml() const -> Y addYamlField(n, "inputBinding", toYaml(*inputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::CommandInputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandInputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::InputParameter::fromYaml(n); fromYaml(n["type"], *type); fromYaml(n["inputBinding"], *inputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandInputParameter{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputBinding"], *res.inputBinding); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandInputParameter{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputBinding"], *res.inputBinding); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandOutputParameter::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4226,35 +4245,35 @@ inline auto https___w3id_org_cwl_cwl::CommandOutputParameter::toYaml() const -> addYamlField(n, "outputBinding", toYaml(*outputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::CommandOutputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandOutputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::OutputParameter::fromYaml(n); fromYaml(n["type"], *type); fromYaml(n["outputBinding"], *outputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandOutputParameter{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outputBinding"], *res.outputBinding); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandOutputParameter{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outputBinding"], *res.outputBinding); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::CommandLineTool::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4282,15 +4301,23 @@ inline auto https___w3id_org_cwl_cwl::CommandLineTool::toYaml() const -> YAML::N addYamlField(n, "permanentFailCodes", toYaml(*permanentFailCodes)); return n; } -inline void https___w3id_org_cwl_cwl::CommandLineTool::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::CommandLineTool::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["id"], *id); fromYaml(n["label"], *label); fromYaml(n["doc"], *doc); - fromYaml(convertMapToList(n["inputs"], "id"), *inputs); - fromYaml(convertMapToList(n["outputs"], "id"), *outputs); - fromYaml(convertMapToList(n["requirements"], "class"), *requirements); - fromYaml(convertMapToList(n["hints"], "class"), *hints); + + fromYaml(convertMapToList(n["inputs"], +"id"), *inputs); + + fromYaml(convertMapToList(n["outputs"], +"id"), *outputs); + + fromYaml(convertMapToList(n["requirements"], +"class"), *requirements); + + fromYaml(convertMapToList(n["hints"], +"class"), *hints); fromYaml(n["cwlVersion"], *cwlVersion); fromYaml(n["intent"], *intent); fromYaml(n["class"], *class_); @@ -4304,124 +4331,124 @@ inline void https___w3id_org_cwl_cwl::CommandLineTool::fromYaml(YAML::Node const fromYaml(n["permanentFailCodes"], *permanentFailCodes); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::CommandLineTool{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["id"], *res.id); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputs"], *res.inputs); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outputs"], *res.outputs); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["requirements"], *res.requirements); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["hints"], *res.hints); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["cwlVersion"], *res.cwlVersion); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["intent"], *res.intent); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["baseCommand"], *res.baseCommand); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["arguments"], *res.arguments); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["stdin"], *res.stdin_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["stderr"], *res.stderr_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["stdout"], *res.stdout_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["successCodes"], *res.successCodes); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["temporaryFailCodes"], *res.temporaryFailCodes); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["permanentFailCodes"], *res.permanentFailCodes); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::CommandLineTool{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["id"], *res.id); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputs"], *res.inputs); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outputs"], *res.outputs); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["requirements"], *res.requirements); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["hints"], *res.hints); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["cwlVersion"], *res.cwlVersion); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["intent"], *res.intent); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["baseCommand"], *res.baseCommand); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["arguments"], *res.arguments); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["stdin"], *res.stdin_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["stderr"], *res.stderr_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["stdout"], *res.stdout_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["successCodes"], *res.successCodes); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["temporaryFailCodes"], *res.temporaryFailCodes); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["permanentFailCodes"], *res.permanentFailCodes); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::DockerRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4435,7 +4462,7 @@ inline auto https___w3id_org_cwl_cwl::DockerRequirement::toYaml() const -> YAML: addYamlField(n, "dockerOutputDirectory", toYaml(*dockerOutputDirectory)); return n; } -inline void https___w3id_org_cwl_cwl::DockerRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::DockerRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); @@ -4447,58 +4474,58 @@ inline void https___w3id_org_cwl_cwl::DockerRequirement::fromYaml(YAML::Node con fromYaml(n["dockerOutputDirectory"], *dockerOutputDirectory); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::DockerRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["dockerPull"], *res.dockerPull); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["dockerLoad"], *res.dockerLoad); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["dockerFile"], *res.dockerFile); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["dockerImport"], *res.dockerImport); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["dockerImageId"], *res.dockerImageId); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["dockerOutputDirectory"], *res.dockerOutputDirectory); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::DockerRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["dockerPull"], *res.dockerPull); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["dockerLoad"], *res.dockerLoad); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["dockerFile"], *res.dockerFile); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["dockerImport"], *res.dockerImport); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["dockerImageId"], *res.dockerImageId); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["dockerOutputDirectory"], *res.dockerOutputDirectory); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::SoftwareRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4508,35 +4535,37 @@ inline auto https___w3id_org_cwl_cwl::SoftwareRequirement::toYaml() const -> YAM convertListToMap(toYaml(*packages), "package")); return n; } -inline void https___w3id_org_cwl_cwl::SoftwareRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::SoftwareRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); - fromYaml(convertMapToList(n["packages"], "package"), *packages); -} - - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::SoftwareRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["packages"], *res.packages); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; + + fromYaml(convertMapToList(n["packages"], +"package"), *packages); +} + +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::SoftwareRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["packages"], *res.packages); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::SoftwarePackage::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4545,41 +4574,41 @@ inline auto https___w3id_org_cwl_cwl::SoftwarePackage::toYaml() const -> YAML::N addYamlField(n, "specs", toYaml(*specs)); return n; } -inline void https___w3id_org_cwl_cwl::SoftwarePackage::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::SoftwarePackage::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["package"], *package); fromYaml(n["version"], *version); fromYaml(n["specs"], *specs); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::SoftwarePackage{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["package"], *res.package); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["version"], *res.version); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["specs"], *res.specs); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::SoftwarePackage{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["package"], *res.package); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["version"], *res.version); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["specs"], *res.specs); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::Dirent::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4588,41 +4617,41 @@ inline auto https___w3id_org_cwl_cwl::Dirent::toYaml() const -> YAML::Node { addYamlField(n, "writable", toYaml(*writable)); return n; } -inline void https___w3id_org_cwl_cwl::Dirent::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Dirent::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["entryname"], *entryname); fromYaml(n["entry"], *entry); fromYaml(n["writable"], *writable); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::Dirent{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["entryname"], *res.entryname); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["entry"], *res.entry); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["writable"], *res.writable); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::Dirent{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["entryname"], *res.entryname); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["entry"], *res.entry); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["writable"], *res.writable); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::InitialWorkDirRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4631,35 +4660,35 @@ inline auto https___w3id_org_cwl_cwl::InitialWorkDirRequirement::toYaml() const addYamlField(n, "listing", toYaml(*listing)); return n; } -inline void https___w3id_org_cwl_cwl::InitialWorkDirRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InitialWorkDirRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); fromYaml(n["listing"], *listing); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::InitialWorkDirRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["listing"], *res.listing); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::InitialWorkDirRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["listing"], *res.listing); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::EnvVarRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4669,35 +4698,37 @@ inline auto https___w3id_org_cwl_cwl::EnvVarRequirement::toYaml() const -> YAML: convertListToMap(toYaml(*envDef), "envName")); return n; } -inline void https___w3id_org_cwl_cwl::EnvVarRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::EnvVarRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); - fromYaml(convertMapToList(n["envDef"], "envName"), *envDef); -} - - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::EnvVarRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["envDef"], *res.envDef); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; + + fromYaml(convertMapToList(n["envDef"], +"envName"), *envDef); +} + +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::EnvVarRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["envDef"], *res.envDef); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::ShellCommandRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4705,28 +4736,28 @@ inline auto https___w3id_org_cwl_cwl::ShellCommandRequirement::toYaml() const -> addYamlField(n, "class", toYaml(*class_)); return n; } -inline void https___w3id_org_cwl_cwl::ShellCommandRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::ShellCommandRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::ShellCommandRequirement{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::ShellCommandRequirement{}; - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::ResourceRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4742,7 +4773,7 @@ inline auto https___w3id_org_cwl_cwl::ResourceRequirement::toYaml() const -> YAM addYamlField(n, "outdirMax", toYaml(*outdirMax)); return n; } -inline void https___w3id_org_cwl_cwl::ResourceRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::ResourceRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); @@ -4756,70 +4787,70 @@ inline void https___w3id_org_cwl_cwl::ResourceRequirement::fromYaml(YAML::Node c fromYaml(n["outdirMax"], *outdirMax); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::ResourceRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["coresMin"], *res.coresMin); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["coresMax"], *res.coresMax); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["ramMin"], *res.ramMin); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["ramMax"], *res.ramMax); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["tmpdirMin"], *res.tmpdirMin); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["tmpdirMax"], *res.tmpdirMax); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outdirMin"], *res.outdirMin); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outdirMax"], *res.outdirMax); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::ResourceRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["coresMin"], *res.coresMin); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["coresMax"], *res.coresMax); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["ramMin"], *res.ramMin); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["ramMax"], *res.ramMax); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["tmpdirMin"], *res.tmpdirMin); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["tmpdirMax"], *res.tmpdirMax); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outdirMin"], *res.outdirMin); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outdirMax"], *res.outdirMax); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::WorkReuse::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4828,35 +4859,35 @@ inline auto https___w3id_org_cwl_cwl::WorkReuse::toYaml() const -> YAML::Node { addYamlField(n, "enableReuse", toYaml(*enableReuse)); return n; } -inline void https___w3id_org_cwl_cwl::WorkReuse::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::WorkReuse::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); fromYaml(n["enableReuse"], *enableReuse); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::WorkReuse{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["enableReuse"], *res.enableReuse); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::WorkReuse{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["enableReuse"], *res.enableReuse); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::NetworkAccess::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4865,35 +4896,35 @@ inline auto https___w3id_org_cwl_cwl::NetworkAccess::toYaml() const -> YAML::Nod addYamlField(n, "networkAccess", toYaml(*networkAccess)); return n; } -inline void https___w3id_org_cwl_cwl::NetworkAccess::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::NetworkAccess::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); fromYaml(n["networkAccess"], *networkAccess); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::NetworkAccess{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["networkAccess"], *res.networkAccess); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::NetworkAccess{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["networkAccess"], *res.networkAccess); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::InplaceUpdateRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4902,35 +4933,35 @@ inline auto https___w3id_org_cwl_cwl::InplaceUpdateRequirement::toYaml() const - addYamlField(n, "inplaceUpdate", toYaml(*inplaceUpdate)); return n; } -inline void https___w3id_org_cwl_cwl::InplaceUpdateRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::InplaceUpdateRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); fromYaml(n["inplaceUpdate"], *inplaceUpdate); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::InplaceUpdateRequirement{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inplaceUpdate"], *res.inplaceUpdate); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::InplaceUpdateRequirement{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inplaceUpdate"], *res.inplaceUpdate); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::ToolTimeLimit::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4939,35 +4970,35 @@ inline auto https___w3id_org_cwl_cwl::ToolTimeLimit::toYaml() const -> YAML::Nod addYamlField(n, "timelimit", toYaml(*timelimit)); return n; } -inline void https___w3id_org_cwl_cwl::ToolTimeLimit::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::ToolTimeLimit::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); fromYaml(n["timelimit"], *timelimit); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::ToolTimeLimit{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["timelimit"], *res.timelimit); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::ToolTimeLimit{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["timelimit"], *res.timelimit); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::ExpressionToolOutputParameter::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -4975,28 +5006,28 @@ inline auto https___w3id_org_cwl_cwl::ExpressionToolOutputParameter::toYaml() co addYamlField(n, "type", toYaml(*type)); return n; } -inline void https___w3id_org_cwl_cwl::ExpressionToolOutputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::ExpressionToolOutputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::OutputParameter::fromYaml(n); fromYaml(n["type"], *type); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::ExpressionToolOutputParameter{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::ExpressionToolOutputParameter{}; - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::WorkflowInputParameter::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5005,35 +5036,35 @@ inline auto https___w3id_org_cwl_cwl::WorkflowInputParameter::toYaml() const -> addYamlField(n, "inputBinding", toYaml(*inputBinding)); return n; } -inline void https___w3id_org_cwl_cwl::WorkflowInputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::WorkflowInputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::InputParameter::fromYaml(n); fromYaml(n["type"], *type); fromYaml(n["inputBinding"], *inputBinding); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::WorkflowInputParameter{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputBinding"], *res.inputBinding); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::WorkflowInputParameter{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputBinding"], *res.inputBinding); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::ExpressionTool::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5054,97 +5085,105 @@ inline auto https___w3id_org_cwl_cwl::ExpressionTool::toYaml() const -> YAML::No addYamlField(n, "expression", toYaml(*expression)); return n; } -inline void https___w3id_org_cwl_cwl::ExpressionTool::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::ExpressionTool::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["id"], *id); fromYaml(n["label"], *label); fromYaml(n["doc"], *doc); - fromYaml(convertMapToList(n["inputs"], "id"), *inputs); - fromYaml(convertMapToList(n["outputs"], "id"), *outputs); - fromYaml(convertMapToList(n["requirements"], "class"), *requirements); - fromYaml(convertMapToList(n["hints"], "class"), *hints); + + fromYaml(convertMapToList(n["inputs"], +"id"), *inputs); + + fromYaml(convertMapToList(n["outputs"], +"id"), *outputs); + + fromYaml(convertMapToList(n["requirements"], +"class"), *requirements); + + fromYaml(convertMapToList(n["hints"], +"class"), *hints); fromYaml(n["cwlVersion"], *cwlVersion); fromYaml(n["intent"], *intent); fromYaml(n["class"], *class_); fromYaml(n["expression"], *expression); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::ExpressionTool{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["id"], *res.id); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputs"], *res.inputs); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outputs"], *res.outputs); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["requirements"], *res.requirements); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["hints"], *res.hints); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["cwlVersion"], *res.cwlVersion); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["intent"], *res.intent); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["expression"], *res.expression); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::ExpressionTool{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["id"], *res.id); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputs"], *res.inputs); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outputs"], *res.outputs); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["requirements"], *res.requirements); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["hints"], *res.hints); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["cwlVersion"], *res.cwlVersion); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["intent"], *res.intent); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["expression"], *res.expression); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::WorkflowOutputParameter::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5155,7 +5194,7 @@ inline auto https___w3id_org_cwl_cwl::WorkflowOutputParameter::toYaml() const -> addYamlField(n, "type", toYaml(*type)); return n; } -inline void https___w3id_org_cwl_cwl::WorkflowOutputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::WorkflowOutputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::OutputParameter::fromYaml(n); fromYaml(n["outputSource"], *outputSource); @@ -5164,40 +5203,40 @@ inline void https___w3id_org_cwl_cwl::WorkflowOutputParameter::fromYaml(YAML::No fromYaml(n["type"], *type); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::WorkflowOutputParameter{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["outputSource"], *res.outputSource); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["linkMerge"], *res.linkMerge); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["pickValue"], *res.pickValue); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::WorkflowOutputParameter{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["outputSource"], *res.outputSource); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["linkMerge"], *res.linkMerge); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["pickValue"], *res.pickValue); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline https___w3id_org_cwl_cwl::Sink::~Sink() = default; inline auto https___w3id_org_cwl_cwl::Sink::toYaml() const -> YAML::Node { using ::toYaml; @@ -5207,7 +5246,7 @@ inline auto https___w3id_org_cwl_cwl::Sink::toYaml() const -> YAML::Node { addYamlField(n, "pickValue", toYaml(*pickValue)); return n; } -inline void https___w3id_org_cwl_cwl::Sink::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Sink::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["source"], *source); fromYaml(n["linkMerge"], *linkMerge); @@ -5224,7 +5263,7 @@ inline auto https___w3id_org_cwl_cwl::WorkflowStepInput::toYaml() const -> YAML: addYamlField(n, "valueFrom", toYaml(*valueFrom)); return n; } -inline void https___w3id_org_cwl_cwl::WorkflowStepInput::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::WorkflowStepInput::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::Identified::fromYaml(n); https___w3id_org_cwl_cwl::Sink::fromYaml(n); @@ -5234,49 +5273,49 @@ inline void https___w3id_org_cwl_cwl::WorkflowStepInput::fromYaml(YAML::Node con fromYaml(n["valueFrom"], *valueFrom); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::WorkflowStepInput{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["default"], *res.default_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["valueFrom"], *res.valueFrom); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::WorkflowStepInput{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["default"], *res.default_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["valueFrom"], *res.valueFrom); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::WorkflowStepOutput::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; n = mergeYaml(n, https___w3id_org_cwl_cwl::Identified::toYaml()); return n; } -inline void https___w3id_org_cwl_cwl::WorkflowStepOutput::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::WorkflowStepOutput::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::Identified::fromYaml(n); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::WorkflowStepOutput{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::WorkflowStepOutput{}; - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::WorkflowStep::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5296,79 +5335,85 @@ inline auto https___w3id_org_cwl_cwl::WorkflowStep::toYaml() const -> YAML::Node addYamlField(n, "scatterMethod", toYaml(*scatterMethod)); return n; } -inline void https___w3id_org_cwl_cwl::WorkflowStep::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::WorkflowStep::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::Identified::fromYaml(n); https___w3id_org_cwl_cwl::Labeled::fromYaml(n); https___w3id_org_cwl_salad::Documented::fromYaml(n); - fromYaml(convertMapToList(n["in"], "id"), *in); + + fromYaml(convertMapToList(n["in"], +"id"), *in); fromYaml(n["out"], *out); - fromYaml(convertMapToList(n["requirements"], "class"), *requirements); - fromYaml(convertMapToList(n["hints"], "class"), *hints); + + fromYaml(convertMapToList(n["requirements"], +"class"), *requirements); + + fromYaml(convertMapToList(n["hints"], +"class"), *hints); fromYaml(n["run"], *run); fromYaml(n["when"], *when); fromYaml(n["scatter"], *scatter); fromYaml(n["scatterMethod"], *scatterMethod); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::WorkflowStep{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["in"], *res.in); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["out"], *res.out); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["requirements"], *res.requirements); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["hints"], *res.hints); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["run"], *res.run); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["when"], *res.when); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["scatter"], *res.scatter); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["scatterMethod"], *res.scatterMethod); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::WorkflowStep{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["in"], *res.in); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["out"], *res.out); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["requirements"], *res.requirements); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["hints"], *res.hints); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["run"], *res.run); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["when"], *res.when); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["scatter"], *res.scatter); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["scatterMethod"], *res.scatterMethod); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::Workflow::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5390,97 +5435,107 @@ inline auto https___w3id_org_cwl_cwl::Workflow::toYaml() const -> YAML::Node { convertListToMap(toYaml(*steps), "id")); return n; } -inline void https___w3id_org_cwl_cwl::Workflow::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Workflow::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["id"], *id); fromYaml(n["label"], *label); fromYaml(n["doc"], *doc); - fromYaml(convertMapToList(n["inputs"], "id"), *inputs); - fromYaml(convertMapToList(n["outputs"], "id"), *outputs); - fromYaml(convertMapToList(n["requirements"], "class"), *requirements); - fromYaml(convertMapToList(n["hints"], "class"), *hints); + + fromYaml(convertMapToList(n["inputs"], +"id"), *inputs); + + fromYaml(convertMapToList(n["outputs"], +"id"), *outputs); + + fromYaml(convertMapToList(n["requirements"], +"class"), *requirements); + + fromYaml(convertMapToList(n["hints"], +"class"), *hints); fromYaml(n["cwlVersion"], *cwlVersion); fromYaml(n["intent"], *intent); fromYaml(n["class"], *class_); - fromYaml(convertMapToList(n["steps"], "id"), *steps); -} - - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::Workflow{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["id"], *res.id); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputs"], *res.inputs); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outputs"], *res.outputs); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["requirements"], *res.requirements); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["hints"], *res.hints); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["cwlVersion"], *res.cwlVersion); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["intent"], *res.intent); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["steps"], *res.steps); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; + + fromYaml(convertMapToList(n["steps"], +"id"), *steps); +} + +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::Workflow{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["id"], *res.id); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputs"], *res.inputs); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outputs"], *res.outputs); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["requirements"], *res.requirements); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["hints"], *res.hints); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["cwlVersion"], *res.cwlVersion); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["intent"], *res.intent); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["steps"], *res.steps); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::SubworkflowFeatureRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5488,28 +5543,28 @@ inline auto https___w3id_org_cwl_cwl::SubworkflowFeatureRequirement::toYaml() co addYamlField(n, "class", toYaml(*class_)); return n; } -inline void https___w3id_org_cwl_cwl::SubworkflowFeatureRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::SubworkflowFeatureRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::SubworkflowFeatureRequirement{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::SubworkflowFeatureRequirement{}; - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::ScatterFeatureRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5517,28 +5572,28 @@ inline auto https___w3id_org_cwl_cwl::ScatterFeatureRequirement::toYaml() const addYamlField(n, "class", toYaml(*class_)); return n; } -inline void https___w3id_org_cwl_cwl::ScatterFeatureRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::ScatterFeatureRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::ScatterFeatureRequirement{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::ScatterFeatureRequirement{}; - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::MultipleInputFeatureRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5546,28 +5601,28 @@ inline auto https___w3id_org_cwl_cwl::MultipleInputFeatureRequirement::toYaml() addYamlField(n, "class", toYaml(*class_)); return n; } -inline void https___w3id_org_cwl_cwl::MultipleInputFeatureRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::MultipleInputFeatureRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::MultipleInputFeatureRequirement{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::MultipleInputFeatureRequirement{}; - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::StepInputExpressionRequirement::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5575,28 +5630,28 @@ inline auto https___w3id_org_cwl_cwl::StepInputExpressionRequirement::toYaml() c addYamlField(n, "class", toYaml(*class_)); return n; } -inline void https___w3id_org_cwl_cwl::StepInputExpressionRequirement::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::StepInputExpressionRequirement::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::ProcessRequirement::fromYaml(n); fromYaml(n["class"], *class_); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::StepInputExpressionRequirement{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::StepInputExpressionRequirement{}; - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::OperationInputParameter::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5604,28 +5659,28 @@ inline auto https___w3id_org_cwl_cwl::OperationInputParameter::toYaml() const -> addYamlField(n, "type", toYaml(*type)); return n; } -inline void https___w3id_org_cwl_cwl::OperationInputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OperationInputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::InputParameter::fromYaml(n); fromYaml(n["type"], *type); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::OperationInputParameter{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::OperationInputParameter{}; - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::OperationOutputParameter::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5633,28 +5688,28 @@ inline auto https___w3id_org_cwl_cwl::OperationOutputParameter::toYaml() const - addYamlField(n, "type", toYaml(*type)); return n; } -inline void https___w3id_org_cwl_cwl::OperationOutputParameter::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::OperationOutputParameter::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; https___w3id_org_cwl_cwl::OutputParameter::fromYaml(n); fromYaml(n["type"], *type); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::OperationOutputParameter{}; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::OperationOutputParameter{}; - if constexpr (IsConstant::value) try { - fromYaml(n["type"], *res.type); - fromYaml(n, res); - return res; - } catch(...) {} + if constexpr (IsConstant::value) try { + fromYaml(n["type"], *res.type); + fromYaml(n, res); + return res; + } catch(...) {} - return std::nullopt; - } - }; + return std::nullopt; + } +}; inline auto https___w3id_org_cwl_cwl::Operation::toYaml() const -> YAML::Node { using ::toYaml; auto n = YAML::Node{}; @@ -5674,90 +5729,98 @@ inline auto https___w3id_org_cwl_cwl::Operation::toYaml() const -> YAML::Node { addYamlField(n, "class", toYaml(*class_)); return n; } -inline void https___w3id_org_cwl_cwl::Operation::fromYaml(YAML::Node const& n) { +inline void https___w3id_org_cwl_cwl::Operation::fromYaml([[maybe_unused]] YAML::Node const& n) { using ::fromYaml; fromYaml(n["id"], *id); fromYaml(n["label"], *label); fromYaml(n["doc"], *doc); - fromYaml(convertMapToList(n["inputs"], "id"), *inputs); - fromYaml(convertMapToList(n["outputs"], "id"), *outputs); - fromYaml(convertMapToList(n["requirements"], "class"), *requirements); - fromYaml(convertMapToList(n["hints"], "class"), *hints); + + fromYaml(convertMapToList(n["inputs"], +"id"), *inputs); + + fromYaml(convertMapToList(n["outputs"], +"id"), *outputs); + + fromYaml(convertMapToList(n["requirements"], +"class"), *requirements); + + fromYaml(convertMapToList(n["hints"], +"class"), *hints); fromYaml(n["cwlVersion"], *cwlVersion); fromYaml(n["intent"], *intent); fromYaml(n["class"], *class_); } - template <> - struct DetectAndExtractFromYaml { - auto operator()(YAML::Node const& n) const -> std::optional { - if (!n.IsDefined()) return std::nullopt; - if (!n.IsMap()) return std::nullopt; - auto res = https___w3id_org_cwl_cwl::Operation{}; - - if constexpr (IsConstant::value) try { - fromYaml(n["id"], *res.id); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["label"], *res.label); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["doc"], *res.doc); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["inputs"], *res.inputs); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["outputs"], *res.outputs); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["requirements"], *res.requirements); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["hints"], *res.hints); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["cwlVersion"], *res.cwlVersion); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["intent"], *res.intent); - fromYaml(n, res); - return res; - } catch(...) {} - - if constexpr (IsConstant::value) try { - fromYaml(n["class"], *res.class_); - fromYaml(n, res); - return res; - } catch(...) {} - - return std::nullopt; - } - }; +template <> +struct DetectAndExtractFromYaml { + auto operator()(YAML::Node const& n) const -> std::optional { + if (!n.IsDefined()) return std::nullopt; + if (!n.IsMap()) return std::nullopt; + auto res = https___w3id_org_cwl_cwl::Operation{}; + + if constexpr (IsConstant::value) try { + fromYaml(n["id"], *res.id); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["label"], *res.label); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["doc"], *res.doc); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["inputs"], *res.inputs); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["outputs"], *res.outputs); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["requirements"], *res.requirements); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["hints"], *res.hints); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["cwlVersion"], *res.cwlVersion); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["intent"], *res.intent); + fromYaml(n, res); + return res; + } catch(...) {} + + if constexpr (IsConstant::value) try { + fromYaml(n["class"], *res.class_); + fromYaml(n, res); + return res; + } catch(...) {} + + return std::nullopt; + } +}; template auto toYaml(std::vector const& v) -> YAML::Node { @@ -5809,7 +5872,7 @@ bool detectAndExtractFromYaml(YAML::Node const& n, SomeVariant& v, Head* = nullp v = *r; return true; } - if constexpr (sizeof...(Args)) { + if constexpr (sizeof...(Args) > 0) { return detectAndExtractFromYaml(n, v); } return false;