Utility class that gives simple interface to create HTML and XML documents. More...
#include <ie_exp_HTML_util.h>
Public Member Functions | |
IE_Exp_HTML_TagWriter (IE_Exp_HTML_OutputWriter *pOutputWriter) | |
void | openTag (const std::string &tagName, bool isInline=false, bool isSingle=false) |
void | addAttribute (const std::string &name, const std::string &value) |
void | writeData (const std::string &data) |
void | closeTag () |
void | flush () |
void | openComment () |
void | closeComment () |
void | enableXmlMode (bool enable=true) |
Private Member Functions | |
void | _closeAttributes () |
Private Attributes | |
std::vector< std::string > | m_tagStack |
std::vector< bool > | m_inlineFlagStack |
IE_Exp_HTML_OutputWriter * | m_pOutputWriter |
bool | m_bXmlModeEnabled |
bool | m_bCurrentTagIsSingle |
bool | m_bAttributesWritten |
bool | m_bDataWritten |
bool | m_bInComment |
std::string | m_buffer |
Utility class that gives simple interface to create HTML and XML documents.
IE_Exp_HTML_TagWriter::IE_Exp_HTML_TagWriter | ( | IE_Exp_HTML_OutputWriter * | pOutputWriter | ) |
void IE_Exp_HTML_TagWriter::_closeAttributes | ( | ) | [inline, private] |
References m_bAttributesWritten, m_bCurrentTagIsSingle, m_bInComment, m_buffer, m_bXmlModeEnabled, m_inlineFlagStack, m_tagStack, and UT_ASSERT.
Referenced by closeTag(), openComment(), openTag(), and writeData().
void IE_Exp_HTML_TagWriter::addAttribute | ( | const std::string & | name, | |
const std::string & | value | |||
) |
References m_bInComment, m_buffer, and UT_ASSERT.
Referenced by IE_Exp_HTML_XHTMLWriter::_handleAwmlStyle(), IE_Exp_HTML_DocumentWriter::_handleStyleAndId(), IE_Exp_HTML_DocumentWriter::closeHead(), IE_Exp_HTML_DocumentWriter::insertAnnotations(), IE_Exp_EPUB_EPUB3Writer::insertAnnotations(), IE_Exp_HTML_DocumentWriter::insertEndnotes(), IE_Exp_EPUB_EPUB3Writer::insertEndnotes(), IE_Exp_HTML_DocumentWriter::insertFootnotes(), IE_Exp_EPUB_EPUB3Writer::insertFootnotes(), IE_Exp_HTML_DocumentWriter::insertImage(), IE_Exp_HTML_DocumentWriter::insertLink(), IE_Exp_HTML_DocumentWriter::insertMeta(), IE_Exp_HTML_DocumentWriter::insertStyle(), IE_Exp_HTML_DocumentWriter::insertTOC(), IE_Exp_HTML_DocumentWriter::openAnnotation(), IE_Exp_EPUB_EPUB3Writer::openAnnotation(), IE_Exp_HTML_DocumentWriter::openBookmark(), IE_Exp_HTML_DocumentWriter::openCell(), IE_Exp_HTML_XHTMLWriter::openDocument(), IE_Exp_EPUB_EPUB3Writer::openDocument(), IE_Exp_HTML_DocumentWriter::openField(), IE_Exp_HTML_DocumentWriter::openHyperlink(), and IE_Exp_HTML_DocumentWriter::openTable().
void IE_Exp_HTML_TagWriter::closeComment | ( | ) |
References m_bInComment, m_buffer, and UT_ASSERT.
Referenced by IE_Exp_HTML_DocumentWriter::closeHead(), and IE_Exp_HTML_DocumentWriter::insertStyle().
void IE_Exp_HTML_TagWriter::closeTag | ( | ) |
References _closeAttributes(), flush(), m_bCurrentTagIsSingle, m_bDataWritten, m_bInComment, m_buffer, m_inlineFlagStack, m_tagStack, UT_ASSERT, and UT_DEBUGMSG.
Referenced by IE_Exp_HTML_DocumentWriter::closeAnnotation(), IE_Exp_EPUB_EPUB3Writer::closeAnnotation(), IE_Exp_HTML_DocumentWriter::closeBlock(), IE_Exp_HTML_DocumentWriter::closeBody(), IE_Exp_HTML_DocumentWriter::closeBookmark(), IE_Exp_HTML_DocumentWriter::closeCell(), IE_Exp_HTML_DocumentWriter::closeDocument(), IE_Exp_HTML_DocumentWriter::closeField(), IE_Exp_HTML_DocumentWriter::closeHead(), IE_Exp_HTML_DocumentWriter::closeHeading(), IE_Exp_HTML_DocumentWriter::closeHyperlink(), IE_Exp_HTML_DocumentWriter::closeList(), IE_Exp_HTML_DocumentWriter::closeListItem(), IE_Exp_HTML_DocumentWriter::closeRow(), IE_Exp_HTML_DocumentWriter::closeSection(), IE_Exp_HTML_DocumentWriter::closeSpan(), IE_Exp_HTML_DocumentWriter::closeTable(), IE_Exp_HTML_DocumentWriter::closeTextbox(), IE_Exp_HTML_DocumentWriter::insertAnnotations(), IE_Exp_EPUB_EPUB3Writer::insertAnnotations(), IE_Exp_HTML_DocumentWriter::insertEndnotes(), IE_Exp_EPUB_EPUB3Writer::insertEndnotes(), IE_Exp_HTML_DocumentWriter::insertFootnotes(), IE_Exp_EPUB_EPUB3Writer::insertFootnotes(), IE_Exp_HTML_DocumentWriter::insertImage(), IE_Exp_HTML_DocumentWriter::insertLineFeed(), IE_Exp_HTML_DocumentWriter::insertLink(), IE_Exp_HTML_DocumentWriter::insertMeta(), IE_Exp_HTML_DocumentWriter::insertStyle(), IE_Exp_HTML_DocumentWriter::insertTitle(), IE_Exp_HTML_DocumentWriter::insertTOC(), and openTag().
void IE_Exp_HTML_TagWriter::enableXmlMode | ( | bool | enable = true |
) |
void IE_Exp_HTML_TagWriter::flush | ( | void | ) |
References m_buffer, m_pOutputWriter, and IE_Exp_HTML_OutputWriter::write().
Referenced by closeTag().
void IE_Exp_HTML_TagWriter::openComment | ( | ) |
References _closeAttributes(), m_bInComment, m_buffer, and UT_ASSERT.
Referenced by IE_Exp_HTML_DocumentWriter::closeHead(), and IE_Exp_HTML_DocumentWriter::insertStyle().
void IE_Exp_HTML_TagWriter::openTag | ( | const std::string & | tagName, | |
bool | isInline = false , |
|||
bool | isSingle = false | |||
) |
References _closeAttributes(), closeTag(), m_bAttributesWritten, m_bCurrentTagIsSingle, m_bDataWritten, m_bInComment, m_buffer, m_inlineFlagStack, m_tagStack, UT_ASSERT, and UT_DEBUGMSG.
Referenced by IE_Exp_HTML_DocumentWriter::closeHead(), IE_Exp_HTML_DocumentWriter::insertAnnotations(), IE_Exp_EPUB_EPUB3Writer::insertAnnotations(), IE_Exp_HTML_DocumentWriter::insertEndnotes(), IE_Exp_EPUB_EPUB3Writer::insertEndnotes(), IE_Exp_HTML_DocumentWriter::insertFootnotes(), IE_Exp_EPUB_EPUB3Writer::insertFootnotes(), IE_Exp_HTML_DocumentWriter::insertImage(), IE_Exp_HTML_DocumentWriter::insertLineFeed(), IE_Exp_HTML_DocumentWriter::insertLink(), IE_Exp_HTML_DocumentWriter::insertMeta(), IE_Exp_HTML_DocumentWriter::insertStyle(), IE_Exp_HTML_DocumentWriter::insertTitle(), IE_Exp_HTML_DocumentWriter::insertTOC(), IE_Exp_HTML_DocumentWriter::openAnnotation(), IE_Exp_EPUB_EPUB3Writer::openAnnotation(), IE_Exp_HTML_DocumentWriter::openBlock(), IE_Exp_HTML_DocumentWriter::openBody(), IE_Exp_HTML_DocumentWriter::openBookmark(), IE_Exp_HTML_DocumentWriter::openCell(), IE_Exp_HTML_XHTMLWriter::openDocument(), IE_Exp_HTML_DocumentWriter::openDocument(), IE_Exp_EPUB_EPUB3Writer::openDocument(), IE_Exp_HTML_DocumentWriter::openField(), IE_Exp_HTML_DocumentWriter::openHead(), IE_Exp_HTML_DocumentWriter::openHeading(), IE_Exp_HTML_DocumentWriter::openHyperlink(), IE_Exp_HTML_DocumentWriter::openList(), IE_Exp_HTML_DocumentWriter::openListItem(), IE_Exp_HTML_DocumentWriter::openRow(), IE_Exp_HTML_DocumentWriter::openSection(), IE_Exp_HTML_DocumentWriter::openSpan(), IE_Exp_HTML_DocumentWriter::openTable(), and IE_Exp_HTML_DocumentWriter::openTextbox().
void IE_Exp_HTML_TagWriter::writeData | ( | const std::string & | data | ) |
References _closeAttributes(), m_bDataWritten, m_bInComment, and m_buffer.
Referenced by IE_Exp_HTML_DocumentWriter::closeBody(), IE_Exp_HTML_DocumentWriter::closeHead(), IE_Exp_HTML_DocumentWriter::insertAnnotations(), IE_Exp_EPUB_EPUB3Writer::insertAnnotations(), IE_Exp_HTML_DocumentWriter::insertEndnotes(), IE_Exp_EPUB_EPUB3Writer::insertEndnotes(), IE_Exp_HTML_DocumentWriter::insertFootnotes(), IE_Exp_EPUB_EPUB3Writer::insertFootnotes(), IE_Exp_HTML_DocumentWriter::insertMath(), IE_Exp_HTML_DocumentWriter::insertStyle(), IE_Exp_HTML_DocumentWriter::insertText(), IE_Exp_HTML_DocumentWriter::insertTitle(), IE_Exp_HTML_DocumentWriter::insertTOC(), IE_Exp_HTML_DocumentWriter::openBody(), and IE_Exp_HTML_DocumentWriter::openField().
bool IE_Exp_HTML_TagWriter::m_bAttributesWritten [private] |
Referenced by _closeAttributes(), and openTag().
bool IE_Exp_HTML_TagWriter::m_bCurrentTagIsSingle [private] |
Referenced by _closeAttributes(), closeTag(), and openTag().
bool IE_Exp_HTML_TagWriter::m_bDataWritten [private] |
Referenced by closeTag(), openTag(), and writeData().
bool IE_Exp_HTML_TagWriter::m_bInComment [private] |
Referenced by _closeAttributes(), addAttribute(), closeComment(), closeTag(), openComment(), openTag(), and writeData().
std::string IE_Exp_HTML_TagWriter::m_buffer [private] |
Referenced by _closeAttributes(), addAttribute(), closeComment(), closeTag(), flush(), openComment(), openTag(), and writeData().
bool IE_Exp_HTML_TagWriter::m_bXmlModeEnabled [private] |
Referenced by _closeAttributes(), and enableXmlMode().
std::vector<bool> IE_Exp_HTML_TagWriter::m_inlineFlagStack [private] |
Referenced by _closeAttributes(), closeTag(), and openTag().
Referenced by flush().
std::vector<std::string> IE_Exp_HTML_TagWriter::m_tagStack [private] |
Referenced by _closeAttributes(), closeTag(), and openTag().