#include <HTMLStream.hpp>
Inheritance diagram for HTMLStream:
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) |
|
|
|
|
|
Recieves characters between tags. Prints to stdout, but can be overridden. Reimplemented from SAXParser. |
|
Recieves the end tag. Prints to stdout, but can be overridden. Reimplemented from SAXParser. |
|
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 handleVars(std::string& var) Returns the value of variable var sent. |
|
Reimplemented from SAXParser. |
|
|
|
|
|
|
|
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). |
|
Recieves the start tag, and the tag's attributes. Prints to stdout, but can be overridden. Reimplemented from SAXParser. |