Adds ktexttemplate as apt package to new_docker_build.sh and builds successfully
This commit is contained in:
39 files changed
+647
-208
No files matched your search
@@ -83,12 +83,15 @@ bool XmlReader::readServiceFile(const QString& svcFile, const QString& idlServic
|
||||
INFO_LOG(m_logger) << "SvcFile: " << svcFile;
|
||||
|
||||
QDomDocument doc;
|
||||
auto parseResult = doc.setContent(&f);
|
||||
QString errorMsg;
|
||||
int errorLine = 0;
|
||||
int errorColumn = 0;
|
||||
auto parseResult = doc.setContent(&f, &errorMsg, &errorLine, &errorColumn);
|
||||
if (!parseResult)
|
||||
{
|
||||
m_errorString = QLatin1String("Error parsing service file '") + svcFile + QLatin1String("' at line ") +
|
||||
QString::number(parseResult.errorLine) + QLatin1Char(':') +
|
||||
QString::number(parseResult.errorColumn);
|
||||
QString::number(errorLine) + QLatin1Char(':') +
|
||||
QString::number(errorColumn);
|
||||
ERROR_LOG(m_logger) << m_errorString;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -187,6 +187,7 @@ class DtcGenerator(object):
|
||||
outputHeader( outfile, parser, 'DTC' )
|
||||
outfile.write('\n')
|
||||
outfile.write('#include <DDS/Generic/generic_data_reader.h>\n')
|
||||
outfile.write('#include <DDS/DTC/generic_dtc.h>\n')
|
||||
outfile.write('\n')
|
||||
outfile.write('/**\n')
|
||||
outfile.write(' * Type definitions \n')
|
||||
|
||||
@@ -215,7 +215,7 @@ bool DtcImpl::waitForHistoricalData{{ dt.name }}(int timeoutMSec)
|
||||
template <>
|
||||
{{ dt.key.cppType }} getKey(const {{ dt.type }} &val)
|
||||
{
|
||||
return val.{{ dt.key.name }}();
|
||||
return val.{{ dt.key.name }};
|
||||
}
|
||||
|
||||
QMap<{{ dt.key.cppType }},::{{ namespace }}::{{ dt.type }}> DtcImpl::{{ dt.nameFlc }}s()
|
||||
|
||||
@@ -116,9 +116,17 @@ static T buildErrorReason(int reason, int requestId)
|
||||
}
|
||||
|
||||
T reply;
|
||||
reply.id(requestId);
|
||||
reply.errorString(errString);
|
||||
reply.errorParams(errArgs);
|
||||
{% if ft.isCoreFt %}
|
||||
reply.setId(requestId);
|
||||
reply.setStr(errString.c_str());
|
||||
for (const auto& arg : errArgs)
|
||||
reply.arg(arg);
|
||||
{% else %}
|
||||
reply.id = requestId;
|
||||
reply.errorString = errString.c_str();
|
||||
for (const auto& arg : errArgs)
|
||||
reply.errorParams.push_back(arg);
|
||||
{% endif %}
|
||||
return reply;
|
||||
}
|
||||
|
||||
@@ -195,9 +203,12 @@ int64_t FtcImpl::{{ ft.requestFlc }}(const {{ ft.requestType }} &request, const
|
||||
{% if ft.isCoreFt %}
|
||||
const auto _reply = future.get(); // throws if exception set
|
||||
|
||||
Core::FunctionReplyObject fro(
|
||||
{% for rp in ft.replyParams %} _reply.{{ rp.nameGetter }}(){% if not forloop.last %},{% endif %} {% endfor %}
|
||||
);
|
||||
Core::FunctionReplyObject fro;
|
||||
fro.setId(_reply.id);
|
||||
fro.setStr(_reply.errorString.c_str());
|
||||
for (const auto& arg : _reply.errorParams)
|
||||
fro.arg(arg);
|
||||
fro.setAdditionalInfo(_reply.additionalInfo.c_str());
|
||||
fro.setUniqueId(m_last{{ ft.request }}UniqueId);
|
||||
|
||||
if (fro.error())
|
||||
@@ -232,10 +243,12 @@ void FtcImpl::{{ ft.onReply }}(const {{ namespace }}::{{ ft.reply }} &reply, int
|
||||
|
||||
m_last{{ ft.request }}UniqueId = uniqueId + {{ ft.replyHandlerHash }};
|
||||
{% if ft.isCoreFt %}
|
||||
Core::FunctionReplyObject fro(
|
||||
{% for rp in ft.replyParams %}
|
||||
reply.{{ rp.nameGetter }}(){% if not forloop.last %},{% endif %} {% endfor %}
|
||||
);
|
||||
Core::FunctionReplyObject fro;
|
||||
fro.setId(reply.id);
|
||||
fro.setStr(reply.errorString.c_str());
|
||||
for (const auto& arg : reply.errorParams)
|
||||
fro.arg(arg);
|
||||
fro.setAdditionalInfo(reply.additionalInfo.c_str());
|
||||
fro.setUniqueId(m_last{{ ft.request }}UniqueId);
|
||||
cb(fro);
|
||||
{% else %}
|
||||
|
||||
Reference in new issue
Block a user