diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-07-22 00:17:29 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-07-22 00:17:29 +0100 |
commit | 6cc908bfe207963bd1eda611a9a0c1ad0140e5a0 (patch) | |
tree | b89eea6c5f88ea3d1a28f6a28288915e031c5817 | |
parent | Fix and tidy the checking of metadata in SQL serializers (diff) | |
download | slicer-6cc908bfe207963bd1eda611a9a0c1ad0140e5a0.tar.bz2 slicer-6cc908bfe207963bd1eda611a9a0c1ad0140e5a0.tar.xz slicer-6cc908bfe207963bd1eda611a9a0c1ad0140e5a0.zip |
Move some generated sequence code into impl.h
-rw-r--r-- | slicer/slicer/modelPartsTypes.impl.h | 6 | ||||
-rw-r--r-- | 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 @@ -399,6 +399,12 @@ namespace Slicer { } template<typename T> + ModelPartPtr ModelPartForSequence<T>::elementModelPart(typename T::value_type & e) const + { + return ModelPart::CreateFor(e); + } + + template<typename T> ModelPartPtr ModelPartForSequence<T>::GetContainedModelPart() { return ModelPart::CreateFor<typename T::value_type>(); 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 @@ -370,13 +370,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", s->scoped(), |