cpp-qt-qhttpengine-server.apihandler.cpp.mustache Maven / Gradle / Ivy
{{>licenseInfo}}
#include
#include
#include
#include
#include
#include "{{classname}}Handler.h"
#include "{{classname}}Request.h"
{{#cppNamespaceDeclarations}}
namespace {{this}} {
{{/cppNamespaceDeclarations}}
{{classname}}Handler::{{classname}}Handler(){
}
{{classname}}Handler::~{{classname}}Handler(){
}
{{#operations}}{{#operation}}void {{classname}}Handler::{{nickname}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {
{{#allParams}}
Q_UNUSED({{paramName}});
{{/allParams}}
auto reqObj = qobject_cast<{{classname}}Request*>(sender());
if( reqObj != nullptr )
{
{{#returnType}}{{{.}}} res;{{/returnType}}
reqObj->{{nickname}}Response({{#returnType}}res{{/returnType}});
}
}
{{/operation}}{{/operations}}
{{#cppNamespaceDeclarations}}
}
{{/cppNamespaceDeclarations}}