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

NHTMLWriter.h File Reference

Methods to handle writing HTML output. More...

#include <MonsterworksCopyright.h>
#include <string>

Include dependency graph for NHTMLWriter.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  monsterworks
namespace  monsterworks::cgi
namespace  monsterworks::cgi::NHTMLWriter

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

Methods to handle writing HTML output.

Author
eeyore
Date
2004/03/04 02:51:26

Copyright (c) 2004 eeyore@monsterworks.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2.

This program is distributed in the hope that it wil be found useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MECHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Gnu Public License in the documentation or read the source of MonsterworksCopyright.h.

You should have received a copy of the GNU General Public Licence along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307 USA.

Definition in file NHTMLWriter.h.


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 monsterworks::cgi::NHTMLWriter::HTMLHeader(), and monsterworks::cgi::NHTMLWriter::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 monsterworks::cgi::NHTMLWriter::MonsterworksFooter(), and monsterworks::cgi::NHTMLWriter::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 monsterworks::cgi::NHTMLWriter::HTTPHeader().

Referenced by monsterworks::cgi::NHTMLWriter::ErrorPage(), and monsterworks::cgi::NHTMLWriter::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 monsterworks::cgi::NHTMLWriter::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 monsterworks::cgi::NHTMLWriter::HTMLFooter(), ourEmail, ourImageDir, ourPowerImage, ourRealServer, and ourServer.

Referenced by monsterworks::cgi::NHTMLWriter::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 monsterworks::cgi::NHTMLWriter::HTMLFooter(), and monsterworks::cgi::NHTMLWriter::HTMLHeader().


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