Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

HTMLStream Class Reference

#include <HTMLStream.hpp>

Inheritance diagram for HTMLStream:

SAXParser List of all members.

Public Methods

 HTMLStream ()
 ~HTMLStream ()
void sendHeader (std::string mime="text/html")
void characters (const std::string &name, const std::string &chars)
void startElement (const std::string &name, Attributes_t &attr, bool standalone=false)
void endElement (const std::string &name, bool standalone=false)
void processingInstruction (std::string &name, Attributes_t &attr)
std::string handleVars (std::string &var)
void setVars (Attributes_t &vars)
void setVars (std::string &var, std::string &val)
void setVars (char *ch, std::string &val)
virtual void handleSegment (std::string &name, std::string &segment)

Constructor & Destructor Documentation

HTMLStream::HTMLStream  
 

HTMLStream::~HTMLStream  
 


Member Function Documentation

void HTMLStream::characters const std::string &    name,
const std::string &    chars
[virtual]
 

Recieves characters between tags. Prints to stdout, but can be overridden.

Reimplemented from SAXParser.

void HTMLStream::endElement const std::string &    name,
bool    standalone = false
[virtual]
 

Recieves the end tag. Prints to stdout, but can be overridden.

Reimplemented from SAXParser.

void HTMLStream::handleSegment std::string &    name,
std::string &    segment
[virtual]
 

virtual void handleSegment(std::string& name, std::string& segment) Dummy function that is meant to be overloaded, for recursive parsing and variable replacement. It is called when it finds an <?end name="..." ?> processing instruction.

std::string HTMLStream::handleVars std::string &    var
 

std::string handleVars(std::string& var) Returns the value of variable var sent.

void HTMLStream::processingInstruction std::string &    name,
Attributes_t   attr
[virtual]
 

Reimplemented from SAXParser.

void HTMLStream::sendHeader std::string    mime = "text/html"
 

void HTMLStream::setVars char *    ch,
std::string &    val
 

void HTMLStream::setVars std::string &    var,
std::string &    val
 

void HTMLStream::setVars Attributes_t   vars
 

void setVars(Attributes_t& vars) Attributes_t is a typedef for std::map<std::string, std::string> It adds vars to the internal Attributes_t env, setting it up for variable replacement. This also re-assigns variables. It is overloaded so that a single variable can be changed or added (for example, for iterating though database rows).

void HTMLStream::startElement const std::string &    name,
Attributes_t   attr,
bool    standalone = false
[virtual]
 

Recieves the start tag, and the tag's attributes. Prints to stdout, but can be overridden.

Reimplemented from SAXParser.


The documentation for this class was generated from the following files:
Generated on Mon Jul 21 20:05:31 2003 for HTMLTemplate by doxygen1.2.18