mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-17 15:14:48 +02:00
PageCompiler: merged changes from internal and macchina versions
This commit is contained in:
parent
f6cc0f7e8a
commit
8f3616c55c
@ -263,11 +263,11 @@ void CodeWriter::writeHandler(std::ostream& ostr)
|
|||||||
ostr << "void " << _class << "::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response)\n";
|
ostr << "void " << _class << "::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response)\n";
|
||||||
ostr << "{\n";
|
ostr << "{\n";
|
||||||
writeResponse(ostr);
|
writeResponse(ostr);
|
||||||
|
writeSession(ostr);
|
||||||
if (_page.has("page.precondition"))
|
if (_page.has("page.precondition"))
|
||||||
{
|
{
|
||||||
ostr << "\tif (!(" << _page.get("page.precondition") << ")) return;\n\n";
|
ostr << "\tif (!(" << _page.get("page.precondition") << ")) return;\n\n";
|
||||||
}
|
}
|
||||||
writeSession(ostr);
|
|
||||||
writeForm(ostr);
|
writeForm(ostr);
|
||||||
ostr << _page.preHandler().str();
|
ostr << _page.preHandler().str();
|
||||||
writeContent(ostr);
|
writeContent(ostr);
|
||||||
|
@ -54,6 +54,11 @@ void OSPCodeWriter::writeHandlerMembers(std::ostream& ostr)
|
|||||||
ostr << "\t\treturn _pContext;\n";
|
ostr << "\t\treturn _pContext;\n";
|
||||||
ostr << "\t}\n";
|
ostr << "\t}\n";
|
||||||
ostr << "\n";
|
ostr << "\n";
|
||||||
|
ostr << "\tPoco::OSP::BundleContext::Ptr c() const\n";
|
||||||
|
ostr << "\t{\n";
|
||||||
|
ostr << "\t\treturn _pContext;\n";
|
||||||
|
ostr << "\t}\n";
|
||||||
|
ostr << "\n";
|
||||||
ostr << "private:\n";
|
ostr << "private:\n";
|
||||||
ostr << "\tPoco::OSP::BundleContext::Ptr _pContext;\n";
|
ostr << "\tPoco::OSP::BundleContext::Ptr _pContext;\n";
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ protected:
|
|||||||
helpFormatter.setHeader(
|
helpFormatter.setHeader(
|
||||||
"\n"
|
"\n"
|
||||||
"The POCO C++ Server Page Compiler.\n"
|
"The POCO C++ Server Page Compiler.\n"
|
||||||
"Copyright (c) 2008-2012 by Applied Informatics Software Engineering GmbH.\n"
|
"Copyright (c) 2008-2016 by Applied Informatics Software Engineering GmbH.\n"
|
||||||
"All rights reserved.\n\n"
|
"All rights reserved.\n\n"
|
||||||
"This program compiles web pages containing embedded C++ code "
|
"This program compiles web pages containing embedded C++ code "
|
||||||
"into a C++ class that can be used with the HTTP server "
|
"into a C++ class that can be used with the HTTP server "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user