Skip to content

Commit

Permalink
fix(RemoteGen): wrong proxy code generated for certain attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Jun 11, 2024
1 parent f400afe commit affb243
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions platform/RemotingNG/RemoteGen/src/ProxyGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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);");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion platform/RemotingNG/RemoteGen/src/SkeletonGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit affb243

Please sign in to comment.