From 6cc908bfe207963bd1eda611a9a0c1ad0140e5a0 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 22 Jul 2017 00:17:29 +0100 Subject: Move some generated sequence code into impl.h --- slicer/slicer/modelPartsTypes.impl.h | 6 ++++++ slicer/tool/parser.cpp | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index 98dba9d..76b71dc 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -398,6 +398,12 @@ namespace Slicer { return metadata; } + template + ModelPartPtr ModelPartForSequence::elementModelPart(typename T::value_type & e) const + { + return ModelPart::CreateFor(e); + } + template ModelPartPtr ModelPartForSequence::GetContainedModelPart() { diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp index bc8c0ef..a2fc81b 100644 --- a/slicer/tool/parser.cpp +++ b/slicer/tool/parser.cpp @@ -369,13 +369,6 @@ namespace Slicer { } fprintbf(cpp, "\treturn GetAnonChildRef(flt);\n}\n\n"); - fprintbf(cpp, "template<> DLL_PUBLIC\n"); - fprintbf(cpp, "ModelPartPtr\n"); - fprintbf(cpp, "ModelPartForSequence< %s >::elementModelPart(typename %s::value_type & e) const {\n", - s->scoped(), - s->scoped()); - fprintbf(cpp, "\treturn ModelPart::CreateFor(e);\n}\n\n"); - fprintbf(cpp, "template<> DLL_PUBLIC\n"); auto ename = metaDataValue("slicer:element:", s->getMetaData()); fprintbf(cpp, "const std::string ModelPartForSequence< %s >::elementName(\"%s\");\n\n", -- cgit v1.2.3