From 7941a514ba017d0b5ff6c5c9637b2e30308fbd11 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 9 Apr 2024 23:52:43 -0500 Subject: [PATCH] [ox/model] Add constexpr ModelTypeId_v --- deps/ox/src/ox/model/typenamecatcher.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/deps/ox/src/ox/model/typenamecatcher.hpp b/deps/ox/src/ox/model/typenamecatcher.hpp index d2b555d4..c83fca2f 100644 --- a/deps/ox/src/ox/model/typenamecatcher.hpp +++ b/deps/ox/src/ox/model/typenamecatcher.hpp @@ -147,4 +147,19 @@ constexpr auto ModelTypeName_v = getModelTypeName(); template constexpr auto ModelTypeVersion_v = requireModelTypeVersion(); +template +constexpr auto ModelTypeVersionStr_v = [] { + constexpr auto version = ModelTypeVersion_v; + constexpr auto versionStr = ox::sfmt("{}", version); + return ox::BString{versionStr}; +}; + +template +constexpr auto ModelTypeId_v = [] { + constexpr auto name = ModelTypeName_v; + constexpr auto version = ModelTypeVersion_v; + constexpr auto versionStr = ox::sfmt>("{}", version); + return ox::sfmt>("{};{}", name, versionStr); +}(); + }