mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-31 06:35:03 +01: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 << "{\n";
|
||||
writeResponse(ostr);
|
||||
writeSession(ostr);
|
||||
if (_page.has("page.precondition"))
|
||||
{
|
||||
ostr << "\tif (!(" << _page.get("page.precondition") << ")) return;\n\n";
|
||||
}
|
||||
writeSession(ostr);
|
||||
writeForm(ostr);
|
||||
ostr << _page.preHandler().str();
|
||||
writeContent(ostr);
|
||||
|
@ -54,6 +54,11 @@ void OSPCodeWriter::writeHandlerMembers(std::ostream& ostr)
|
||||
ostr << "\t\treturn _pContext;\n";
|
||||
ostr << "\t}\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 << "\tPoco::OSP::BundleContext::Ptr _pContext;\n";
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ protected:
|
||||
helpFormatter.setHeader(
|
||||
"\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"
|
||||
"This program compiles web pages containing embedded C++ code "
|
||||
"into a C++ class that can be used with the HTTP server "
|
||||
|
Loading…
x
Reference in New Issue
Block a user