From 808c943027afe2556c214cd1a7a3655e11f2b5ab Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 5 Jan 2015 19:03:34 +0000 Subject: Extract conversions from any metadata --- slicer/slicer/parser.cpp | 6 +++--- slicer/slicer/parser.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/slicer/slicer/parser.cpp b/slicer/slicer/parser.cpp index 96dd9b6..d401f5b 100644 --- a/slicer/slicer/parser.cpp +++ b/slicer/slicer/parser.cpp @@ -29,7 +29,7 @@ namespace Slicer { auto type = dm->type(); auto c = Slice::ContainedPtr::dynamicCast(dm->container()); - auto conversions = getConversions(dm); + auto conversions = getConversions(dm->getMetaData()); for (const auto & conversion : conversions) { fprintf(cpp, "%s %s(const %s &);\n", conversion.ExchangeType.c_str(), @@ -429,10 +429,10 @@ namespace Slicer { std::vector - Slicer::getConversions(Slice::DataMemberPtr dm) + Slicer::getConversions(const std::list & dm) { std::vector rtn; - auto conversions = metaDataValues("slicer:conversion:", dm->getMetaData()); + auto conversions = metaDataValues("slicer:conversion:", dm); for (const auto & conversion : conversions) { auto split = metaDataSplit(conversion); if (split.size() != 3) { diff --git a/slicer/slicer/parser.h b/slicer/slicer/parser.h index 9be2465..a29ede9 100644 --- a/slicer/slicer/parser.h +++ b/slicer/slicer/parser.h @@ -48,7 +48,7 @@ namespace Slicer { void defineConversions(Slice::DataMemberPtr dm) const; void copyMetadata(const std::list & metadata) const; - static std::vector getConversions(Slice::DataMemberPtr); + static std::vector getConversions(const std::list & metadata); unsigned int components; FILE * cpp; -- cgit v1.2.3