#include <writer.hh>
Public Member Functions | |
| writer (std::ostream &ostr) | |
| ~writer (void) | |
| void | text (const std::string &data) |
| void | endLine (void) |
| void | tag (const char *tagname, int nattr=0, const char **attr=0, const char **value=0) |
| void | tag (const char *tagname, const attList &attr) |
| void | tagNData (const char *tagname, int nattr=0, const char **attr=0, const char **value=0) |
| void | tagNData (const char *tagname, const attList &attr) |
| void | meta (const char *name, const char *value) |
| void | meta (const char *name, double value) |
| void | Integer (int N) |
| void | endTag (const std::string &tagname) |
| void | pushDefault (const attList &x) |
| const attList & | refDefault (void) const |
| attList & | refDefault (void) |
| void | popDefault (void) |
| void | sync (void) |
| html::writer::writer | ( | std::ostream & | ostr | ) |
| html::writer::~writer | ( | void | ) |
Destroy an HTML writer. brief Writer destructor.
| void html::writer::text | ( | const std::string & | data | ) |
| void html::writer::endLine | ( | void | ) |
Flush the current output line to the output stream followed by an end-of-line character. THe current line length is reset to zero brief End an output line.
| void html::writer::tag | ( | const char * | tagname, | |
| int | nattr = 0, |
|||
| const char ** | attr = 0, |
|||
| const char ** | value = 0 | |||
| ) |
Write an html tag to the output file. A list of attribute names and associated values are written inside the tag block. Attribute names with null value pointers are not written. The tag name is added to the writer tag list for validation. brief Write a tag.
| tagname | Pointer to the tag name. | |
| nattr | Number of attributes to be included in the tag. | |
| attr | List of pointers to attribute names. | |
| value | List of pointers to attribute values. |
| void html::writer::tag | ( | const char * | tagname, | |
| const attList & | attr | |||
| ) |
| void html::writer::tagNData | ( | const char * | tagname, | |
| int | nattr = 0, |
|||
| const char ** | attr = 0, |
|||
| const char ** | value = 0 | |||
| ) |
Write a dataless html tag to the output file. A list of attribute names and associated values are written inside the tag block. Attribute names with null value pointers are not written. The "<tag>" syntax is used and no end tag block will be generated. brief Write a dataless tag.
| tagname | Pointer to the tag name. | |
| nattr | Number of attributes to be included in the tag. | |
| attr | List of pointers to attribute names. | |
| value | List of pointers to attribute values. |
| void html::writer::tagNData | ( | const char * | tagname, | |
| const attList & | attr | |||
| ) |
| void html::writer::meta | ( | const char * | name, | |
| const char * | value | |||
| ) |
Write HTML meta-data word to the document. The HTML meta-data have the following form: <meta http-equiv='name' content='value'>. brief Write HTML meta-data.
| name | HTML meta-data name. | |
| value | HTML meta-data value. |
| void html::writer::meta | ( | const char * | name, | |
| double | value | |||
| ) |
Write HTML meta-data value to the document. The HTML meta-data have the following form: <meta http-equiv='name' content='value'>. brief Write HTML meta-data.
| name | HTML meta-data name. | |
| value | Numberic HTML meta-data value. |
| void html::writer::Integer | ( | int | N | ) |
Write an integer value to the output stream. brief Write an integer.
| N | value to be written. |
| void html::writer::endTag | ( | const std::string & | tagname | ) |
Write the </name> end tag to the output stream. The specified tag name must match that of the most recent unclosed tag. brief write a close tag.
| tagname | Name f tag to be closed. |
| void html::writer::pushDefault | ( | const attList & | x | ) |
Push an attribute list onto the top of the writer's default attribute stack. The new attributes will replace any attributes with the same name. brief Push the specified attributes onto the default attribute stack.
| x | attribute list. |
| const html::attList & html::writer::refDefault | ( | void | ) | const [inline] |
Get a constant reference to the current default attribute list. brief Get the current default attribute list.
| html::attList & html::writer::refDefault | ( | void | ) | [inline] |
Get a reference to the current default attribute list. brief Get the current default attribute list.
| void html::writer::popDefault | ( | void | ) |
Remove the current attribute list from the default attribute stack. brief Remove the current list from the default attribute stack.
| void html::writer::sync | ( | void | ) |
Synchronize the buffer to the output file by flushing buffered data to the output stream. brief Flush output data.
1.5.4