Main Page | Namespace List | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

A class designed to write out HTML text. More...


Functions

std::string HTTPHeader (const std::string &inType, const std::string &inOtherData="")
 generates a standard HTTP header
std::string HTMLHeader (const std::string &inTitle="", const std::string &inOtherData="", const std::string &inBodyTags="")
 generates a standard HTTP header for a text/html return and opening the body of the document
std::string HTMLFooter ()
 generates a standard HTML footer, closing the body of the document
std::string MonsterworksFooter (const std::string &inContact="")
 generates a standard HTML footer, closing the body of the document and providing a link to the Monsterwork's site
std::string RedirectPage (const std::string &inLocation)
 generates a simple page redirecting the browser to a new location
std::string ErrorPage (const std::string &inMessage="", const std::string &inContact="")
 generates a simple error page


Detailed Description

A class designed to write out HTML text.

Function Documentation

std::string monsterworks::cgi::NHTMLWriter::ErrorPage const std::string &  inMessage = "",
const std::string &  inContact = ""
 

generates a simple error page

Returns:
the page as a string
Parameters:
inMessage  the Message to display
inContact  who to contact for more information
Definition at line 128 of file NHTMLWriter.cp.

References HTMLHeader(), and MonsterworksFooter().

std::string monsterworks::cgi::NHTMLWriter::HTMLFooter  ) 
 

generates a standard HTML footer, closing the body of the document

Returns:
the footer as a string
Definition at line 81 of file NHTMLWriter.cp.

Referenced by MonsterworksFooter(), and RedirectPage().

std::string monsterworks::cgi::NHTMLWriter::HTMLHeader const std::string &  inTitle = "",
const std::string &  inOtherData = "",
const std::string &  inBodyTags = ""
 

generates a standard HTTP header for a text/html return and opening the body of the document

Returns:
the header as a string
Parameters:
inTitle  the title of the HTML page
inOtherData  extra data in the HTTP header
inBodyTags  added to the body tag
Definition at line 60 of file NHTMLWriter.cp.

References HTTPHeader().

Referenced by ErrorPage(), and RedirectPage().

std::string monsterworks::cgi::NHTMLWriter::HTTPHeader const std::string &  inType,
const std::string &  inOtherData = ""
 

generates a standard HTTP header

Returns:
the header as a string
Parameters:
inType  should be a MIME type (e.g. "text/html")
inOtherData  is added before the double returns that terminate the header, it should end with a newline \r\n and defaults to the empty string
Definition at line 42 of file NHTMLWriter.cp.

Referenced by HTMLHeader().

string monsterworks::cgi::NHTMLWriter::MonsterworksFooter const std::string &  inContact = ""  ) 
 

generates a standard HTML footer, closing the body of the document and providing a link to the Monsterwork's site

Parameters:
inContact  contact information for the page
Definition at line 89 of file NHTMLWriter.cp.

References HTMLFooter(), ourEmail, ourImageDir, ourPowerImage, ourRealServer, and ourServer.

Referenced by ErrorPage().

std::string monsterworks::cgi::NHTMLWriter::RedirectPage const std::string &  inLocation  ) 
 

generates a simple page redirecting the browser to a new location

This refresh meta tag and a link for older browsers.

Returns:
the page as a string
Parameters:
inLocation  the URL to which we redirect
Definition at line 111 of file NHTMLWriter.cp.

References HTMLFooter(), and HTMLHeader().


monsterworks Code by Monsterworks. Made available under the GNU Public License.
Documentation by doxygen.