summaryrefslogtreecommitdiff
path: root/slicer/tool
diff options
context:
space:
mode:
Diffstat (limited to 'slicer/tool')
-rw-r--r--slicer/tool/parser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp
index 445dda5..8a58484 100644
--- a/slicer/tool/parser.cpp
+++ b/slicer/tool/parser.cpp
@@ -415,6 +415,16 @@ namespace Slicer {
auto name = md.value("slicer:root:");
defineRoot(typeToString(decl), name ? *name : c->name(), decl);
+ fprintbf(cpp, "static constexpr ClassRefImplImpl<%s", decl->typeId());
+ for (const auto & base : decl->definition()->allBases()) {
+ if (decl != base->declaration()) {
+ fprintbf(cpp, ", %s", base->declaration()->typeId());
+ }
+ }
+ fprintbf(cpp, "> ref%d;\n", components);
+ fprintbf(cpp, "template<>\n");
+ fprintbf(cpp, "constinit const ClassRefBase * const ModelPartForClass<%s>::classref{ &ref%d };\n",
+ decl->typeId(), components);
auto typeName = md.value("slicer:typename:");
fprintbf(cpp, "template<>\n");