diff --git a/include/odm.h b/include/odm.h index 2a3d75b..0d6c801 100644 --- a/include/odm.h +++ b/include/odm.h @@ -7,14 +7,27 @@ using michlib::errmessage; -template consteval bool MustSupported() +template consteval bool MustSup() { static_assert(IsActionSupported); return true; }; -constexpr bool supported = MustSupported() && MustSupported() && MustSupported() && - MustSupported() && MustSupported() && MustSupported() && - MustSupported() && MustSupported() && MustSupported() && - MustSupported() && MustSupported() && MustSupported() && - MustSupported() && MustSupported() && MustSupported(); +constexpr bool NEMOsup = + MustSup() && MustSup() && MustSup() && MustSup(); + +constexpr bool HYCOMsup = + MustSup() && MustSup() && MustSup() && MustSup(); + +constexpr bool AVISOsup = + MustSup() && MustSup() && MustSup() && MustSup(); + +constexpr bool AVISOLsup = MustSup() && MustSup() && MustSup() && + MustSup(); + +constexpr bool BINFILEsup = MustSup() && MustSup() && MustSup(); + +template static constexpr bool DisableAction = false; + +// Exceptions +template<> constexpr bool DisableAction = true; diff --git a/src/odm.cpp b/src/odm.cpp index 149552b..1129643 100644 --- a/src/odm.cpp +++ b/src/odm.cpp @@ -87,7 +87,7 @@ int main(int argc, char** argv) [&data = arg, &args = std::as_const(args)](const auto& arg) { using AT = std::decay_t; - if constexpr(IsActionSupported) + if constexpr(IsActionSupported && !DisableAction) return DoAction(args, data); else return MString("Unsupported combination of action and source");