PageCompiler: merged changes from internal and macchina versions

This commit is contained in:
Guenter Obiltschnig 2016-02-29 16:40:19 +01:00
parent f6cc0f7e8a
commit 8f3616c55c
3 changed files with 7 additions and 2 deletions

View File

@ -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);

View File

@ -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";
}

View File

@ -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 "