From affb2435a751e37e2502af19acefc79aba287a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Tue, 11 Jun 2024 18:50:56 +0200 Subject: [PATCH] fix(RemoteGen): wrong proxy code generated for certain attributes --- .../RemoteGen/src/ProxyGenerator.cpp | 22 +++++++++---------- .../RemoteGen/src/SkeletonGenerator.cpp | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/platform/RemotingNG/RemoteGen/src/ProxyGenerator.cpp b/platform/RemotingNG/RemoteGen/src/ProxyGenerator.cpp index a8b467eae..669c3a22c 100644 --- a/platform/RemotingNG/RemoteGen/src/ProxyGenerator.cpp +++ b/platform/RemotingNG/RemoteGen/src/ProxyGenerator.cpp @@ -848,7 +848,7 @@ void ProxyGenerator::writeDeserializingBlock(const Poco::CppParser::Function* pF { std::string line("remoting__deser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_PRODUCES, \""); line.append(funcContentType); - line.append("\");"); + line.append("\"s);"); gen.writeMethodImplementation(line); } @@ -1138,23 +1138,23 @@ void ProxyGenerator::writeDeserializeReturnParam(const Poco::CppParser::Function } if (!location.empty()) { - gen.writeMethodImplementation("remoting__ser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_LOCATION, \"" + location + "\");"); + gen.writeMethodImplementation("remoting__deser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_LOCATION, \"" + location + "\"s);"); } if (!format.empty()) { - gen.writeMethodImplementation("remoting__ser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_FORMAT, \"" + format + "\");"); + gen.writeMethodImplementation("remoting__deser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_FORMAT, \"" + format + "\"s);"); } if (!contentType.empty()) { - gen.writeMethodImplementation("remoting__ser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_CONTENT_TYPE, \"" + contentType + "\");"); + gen.writeMethodImplementation("remoting__deser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_CONTENT_TYPE, \"" + contentType + "\"s);"); } if (!length.empty()) { - gen.writeMethodImplementation("remoting__ser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_LENGTH, \"" + length + "\");"); + gen.writeMethodImplementation("remoting__deser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_LENGTH, \"" + length + "\"s);"); } if (!xsdType.empty()) { - gen.writeMethodImplementation("remoting__ser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_XSDTYPE, \"" + xsdType + "\");"); + gen.writeMethodImplementation("remoting__deser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_XSDTYPE, \"" + xsdType + "\"s);"); } std::string retParamType(GenUtility::getResolvedReturnParameterType(pFunc->nameSpace(), pFunc)); @@ -1227,23 +1227,23 @@ void ProxyGenerator::writeDeserializeReturnParam(const Poco::CppParser::Function } if (!location.empty()) { - gen.writeMethodImplementation("remoting__ser.popProperty(Poco::RemotingNG::SerializerBase::PROP_LOCATION);"); + gen.writeMethodImplementation("remoting__deser.popProperty(Poco::RemotingNG::SerializerBase::PROP_LOCATION);"); } if (!format.empty()) { - gen.writeMethodImplementation("remoting__ser.popProperty(Poco::RemotingNG::SerializerBase::PROP_FORMAT);"); + gen.writeMethodImplementation("remoting__deser.popProperty(Poco::RemotingNG::SerializerBase::PROP_FORMAT);"); } if (!contentType.empty()) { - gen.writeMethodImplementation("remoting__ser.popProperty(Poco::RemotingNG::SerializerBase::PROP_CONTENT_TYPE);"); + gen.writeMethodImplementation("remoting__deser.popProperty(Poco::RemotingNG::SerializerBase::PROP_CONTENT_TYPE);"); } if (!length.empty()) { - gen.writeMethodImplementation("remoting__ser.popProperty(Poco::RemotingNG::SerializerBase::PROP_LENGTH);"); + gen.writeMethodImplementation("remoting__deser.popProperty(Poco::RemotingNG::SerializerBase::PROP_LENGTH);"); } if (!xsdType.empty()) { - gen.writeMethodImplementation("remoting__ser.popProperty(Poco::RemotingNG::SerializerBase::PROP_XSDTYPE);"); + gen.writeMethodImplementation("remoting__deser.popProperty(Poco::RemotingNG::SerializerBase::PROP_XSDTYPE);"); } } } diff --git a/platform/RemotingNG/RemoteGen/src/SkeletonGenerator.cpp b/platform/RemotingNG/RemoteGen/src/SkeletonGenerator.cpp index 93debccf6..3a9e03435 100644 --- a/platform/RemotingNG/RemoteGen/src/SkeletonGenerator.cpp +++ b/platform/RemotingNG/RemoteGen/src/SkeletonGenerator.cpp @@ -514,7 +514,7 @@ void SkeletonGenerator::invokeCodeGen(const Poco::CppParser::Function* pFuncNew, { std::string line("remoting__ser.pushProperty(Poco::RemotingNG::SerializerBase::PROP_PRODUCES, \""); line.append(funcResponseContentType); - line.append("\");"); + line.append("\"s);"); gen.writeMethodImplementation(indentation + line); }