LibreOffice Module helpcompiler (master) 1
|
Tagger class. More...
#include <BasCodeTagger.hxx>
Public Types | |
enum | TaggerException { NULL_DOCUMENT , EMPTY_DOCUMENT } |
Public Member Functions | |
BasicCodeTagger (xmlDocPtr rootDoc) | |
~BasicCodeTagger () | |
void | tagBasicCodes () |
Manages tagging process. More... | |
Private Member Functions | |
void | tagParagraph (xmlNodePtr paragraph) |
Used by tagBasCodeParagraphs(). It does the work on the current paragraph containing Basic code. More... | |
void | getBasicCodeContainerNodes () |
Gathers all the <bascode> tag nodes from xml tree. More... | |
void | tagBasCodeParagraphs () |
Extracts Basic Codes contained in <bascode> tags. More... | |
Static Private Member Functions | |
static xmlChar * | getTypeString (TokenType tokenType) |
Converts SyntaxHighlighter's TokenTypes enum to a type string for More... | |
Private Attributes | |
xmlDocPtr | m_pDocument |
std::vector< xmlNodePtr > | m_BasicCodeContainerTags |
std::unique_ptr< LibXmlTreeWalker > | m_pXmlTreeWalker |
SyntaxHighlighter | m_Highlighter |
bool | m_bTaggingCompleted |
Tagger class.
Definition at line 21 of file BasCodeTagger.hxx.
Enumerator | |
---|---|
NULL_DOCUMENT | |
EMPTY_DOCUMENT |
Definition at line 35 of file BasCodeTagger.hxx.
BasicCodeTagger::BasicCodeTagger | ( | xmlDocPtr | rootDoc | ) |
Definition at line 53 of file BasCodeTagger.cxx.
References Basic, m_bTaggingCompleted, m_pDocument, m_pXmlTreeWalker, and NULL_DOCUMENT.
BasicCodeTagger::~BasicCodeTagger | ( | ) |
Definition at line 63 of file BasCodeTagger.cxx.
|
private |
Gathers all the <bascode> tag nodes from xml tree.
Assumes m_pDocument is valid. Handles m_pXmlTreeWalker and m_BasicCodeContainerTags members.
Definition at line 70 of file BasCodeTagger.cxx.
References m_BasicCodeContainerTags, m_pDocument, and m_pXmlTreeWalker.
Referenced by tagBasicCodes().
|
staticprivate |
Converts SyntaxHighlighter's TokenTypes enum to a type string for
Definition at line 184 of file BasCodeTagger.cxx.
Referenced by tagParagraph().
|
private |
Extracts Basic Codes contained in <bascode> tags.
For each <bascode> this method iterates through it's <paragraph> tags and "inserts" tags according to the Basic code syntax found in that paragraph.
Definition at line 99 of file BasCodeTagger.cxx.
References m_BasicCodeContainerTags, and tagParagraph().
Referenced by tagBasicCodes().
void BasicCodeTagger::tagBasicCodes | ( | ) |
Manages tagging process.
This is the "main" function of BasicCodeTagger.
Definition at line 164 of file BasCodeTagger.cxx.
References ex, getBasicCodeContainerNodes(), m_bTaggingCompleted, and tagBasCodeParagraphs().
Referenced by HelpCompiler::tagBasicCodeExamples().
|
private |
Used by tagBasCodeParagraphs(). It does the work on the current paragraph containing Basic code.
Definition at line 116 of file BasCodeTagger.cxx.
References SyntaxHighlighter::getHighlightPortions(), getTypeString(), m_Highlighter, m_pDocument, OUStringToOString(), paragraph, and text().
Referenced by tagBasCodeParagraphs().
|
private |
Definition at line 25 of file BasCodeTagger.hxx.
Referenced by getBasicCodeContainerNodes(), and tagBasCodeParagraphs().
|
private |
Definition at line 28 of file BasCodeTagger.hxx.
Referenced by BasicCodeTagger(), and tagBasicCodes().
|
private |
Definition at line 27 of file BasCodeTagger.hxx.
Referenced by tagParagraph().
|
private |
Definition at line 24 of file BasCodeTagger.hxx.
Referenced by BasicCodeTagger(), getBasicCodeContainerNodes(), and tagParagraph().
|
private |
Definition at line 26 of file BasCodeTagger.hxx.
Referenced by BasicCodeTagger(), and getBasicCodeContainerNodes().