CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CgiWriter.cc
Go to the documentation of this file.
2 
4 {
5  out->getHTTPResponseHeader().addHeader("Content-Type", "text/html");
6  out->getHTTPResponseHeader().addHeader("Expires", "0");
7  out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0");
8  out->getHTTPResponseHeader().addHeader("Cache-Control", "post-check=0, pre-check=0");
9  out->getHTTPResponseHeader().addHeader("Pragma", "no-cache");
10 
11  *out << cgicc::HTMLDoctype(cgicc::HTMLDoctype::eStrict) << std::endl;
12  // This is here for the sake of producing correct html:
13  // *out << cgicc::html() << std::endl;
14  *out << cgicc::html().set("lang", "en").set("dir","ltr") << std::endl;
15 }
16 
18 {
19  std::string js_file_url = contextURL + "/temporary/WebLib.js";
20  std::string css_file_url = contextURL + "/temporary/style.css";
21 
22  *out << cgicc::head() << std::endl;
23 
24  *out << cgicc::script().set("src", js_file_url.c_str()) << cgicc::script() << std::endl;
25 
26  *out << cgicc::link().set("type", "text/css").set("href", css_file_url.c_str()).set("rel", "stylesheet") << std::endl;
27 
28  *out << cgicc::meta().set("http-equiv", "pragma").set("content", "no-cache") << std::endl;
29 
30  *out << cgicc::head() << std::endl;
31 }
32 
34 {
35  *out << "</html>" << std::endl;
36 }
std::string contextURL
Definition: CgiWriter.h:10
void output_head()
Definition: CgiWriter.cc:17
void output_finish()
Definition: CgiWriter.cc:33
std::string link(std::string &nm, std::string &ns)
Definition: hierarchy.cc:47
void output_preamble()
Definition: CgiWriter.cc:3
xgi::Output * out
Definition: CgiWriter.h:9
void set(const std::string &name, int value)
set the flag, with a run-time name