The DocParser
Class Reference
Declaration
Included Headers
Base class
class | IDocParser |
opaque parser interface More... | |
Public Member Functions Index
void | pushContext () |
void | popContext () |
void | handleImg (DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs) |
Token | internalValidatingParseDoc (DocNodeVariant *parent, DocNodeList &children, const QCString &doc) |
QCString | processCopyDoc (const char *data, size_t &len) |
QCString | findAndCopyImage (const QCString &fileName, DocImage::Type type, bool doWarn=true) |
void | checkArgumentName () |
void | checkRetvalName () |
void | checkUnOrMultipleDocumentedParams () |
bool | findDocsForMemberOrCompound (const QCString &commandName, QCString *pDoc, QCString *pBrief, const Definition **pDef) |
bool | defaultHandleToken (DocNodeVariant *parent, Token tok, DocNodeList &children, bool handleWord=TRUE) |
void | errorHandleDefaultToken (DocNodeVariant *parent, Token tok, DocNodeList &children, const QCString &txt) |
void | defaultHandleTitleAndSize (const CommandType cmd, DocNodeVariant *parent, DocNodeList &children, QCString &width, QCString &height) |
Token | handleStyleArgument (DocNodeVariant *parent, DocNodeList &children, const QCString &cmdName) |
void | handleStyleEnter (DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName, const HtmlAttribList *attribs) |
void | handleStyleLeave (DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName) |
void | handlePendingStyleCommands (DocNodeVariant *parent, DocNodeList &children) |
void | handleInitialStyleCommands (DocNodeVariant *parent, DocNodeList &children) |
Token | handleAHref (DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs) |
void | handleUnclosedStyleCommands () |
void | handleLinkedWord (DocNodeVariant *parent, DocNodeList &children, bool ignoreAutoLinkFlag=FALSE) |
void | handleParameterType (DocNodeVariant *parent, DocNodeList &children, const QCString ¶mTypes) |
void | handleInternalRef (DocNodeVariant *parent, DocNodeList &children) |
void | handleAnchor (DocNodeVariant *parent, DocNodeList &children) |
void | handlePrefix (DocNodeVariant *parent, DocNodeList &children) |
void | handleImage (DocNodeVariant *parent, DocNodeList &children) |
void | readTextFileByName (const QCString &file, QCString &text) |
Public Member Attributes Index
std::stack< DocParserContext > | contextStack |
DocParserContext | context |
DocTokenizer | tokenizer |
Definition at line 98 of file docparser_p.h.
Public Member Functions
checkArgumentName()
|
Collects the parameters found with @param command in a list context.paramsFound. If the parameter is not an actual parameter of the current member context.memberDef, then a warning is raised (unless warnings are disabled altogether).
Declaration at line 108 of file docparser_p.h, definition at line 208 of file docparser.cpp.
References argListToString, Config_getBool, context, Definition::docFile, Definition::docLine, ArgumentList::empty, end, QCString::endsWith, FALSE, QCString::isEmpty, QCString::left, QCString::length, QCString::lower, Definition::name, qPrint, QCString::sprintf, QCString::str, QCString::stripWhiteSpace, TRUE and warn_doc_error.
Referenced by DocParamList::parse and DocParamList::parseXml.
checkRetvalName()
|
Collects the return values found with @retval command in a global list g_parserContext.retvalsFound.
Declaration at line 109 of file docparser_p.h, definition at line 273 of file docparser.cpp.
References Config_getBool, context, QCString::isEmpty, QCString::str and warn_doc_error.
Referenced by DocParamList::parse and DocParamList::parseXml.
checkUnOrMultipleDocumentedParams()
|
Checks if the parameters that have been specified using @param are indeed all parameters and that a parameter does not have multiple @param blocks. Must be called after checkArgumentName() has been called for each argument.
Declaration at line 110 of file docparser_p.h, definition at line 294 of file docparser.cpp.
References argListToString, Config_getBool, context, ArgumentList::empty, QCString::endsWith, FALSE, QCString::isEmpty, QCString::left, QCString::length, QCString::lower, ArgumentList::push_back, ArgumentList::size, QCString::str, QCString::stripWhiteSpace, TRUE, warn_doc_error and warn_incomplete_doc.
Referenced by validatingParseDoc.
defaultHandleTitleAndSize()
|
Declaration at line 120 of file docparser_p.h, definition at line 1006 of file docparser.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Mappers::cmdMapper, context, defaultHandleToken, errorHandleDefaultToken, handlePendingStyleCommands, Token::is, Token::is_any_of, parent and tokenizer.
Referenced by DocPara::handleCommand, DocDiaFile::parse, DocDotFile::parse, DocImage::parse, DocMscFile::parse and DocPlantUmlFile::parse.
defaultHandleToken()
|
Declaration at line 115 of file docparser_p.h, definition at line 1208 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, AUTO_TRACE_ADD, DocStyleChange::Bold, DocStyleChange::Center, DocStyleChange::Cite, CMD_AMP, CMD_ANCHOR, CMD_AT, CMD_BOLD, CMD_BSLASH, CMD_CODE, CMD_DBONLY, CMD_DCOLON, CMD_DOLLAR, CMD_EMPHASIS, CMD_EQUAL, CMD_EXCLAMATION, CMD_FORMULA, CMD_GREATER, CMD_HASH, CMD_HTMLONLY, CMD_IANCHOR, CMD_IFILE, CMD_ILINE, CMD_IMAGE, CMD_INTERNALREF, CMD_IPREFIX, CMD_LATEXONLY, CMD_LESS, CMD_MANONLY, CMD_MDASH, CMD_MINUS, CMD_NDASH, CMD_PERCENT, CMD_PLUS, CMD_PUNT, CMD_QUESTION, CMD_QUOTE, CMD_RTFONLY, CMD_SETSCOPE, CMD_XMLONLY, Mappers::cmdMapper, DocStyleChange::Code, context, DocSymbol::decodeSymbol, DocStyleChange::Del, DocVerbatim::DocbookOnly, GrowVector< T >::empty, FALSE, handleAnchor, handleImage, handleImg, handleInternalRef, handleLinkedWord, handlePrefix, handleStyleArgument, handleStyleEnter, handleStyleLeave, HTML_BOLD, HTML_CENTER, HTML_CITE, HTML_CODE, HTML_DEL, HTML_DIV, HTML_EMPHASIS, HTML_IMG, HTML_INS, HTML_KBD, HTML_PRE, HTML_S, HTML_SMALL, HTML_SPAN, HTML_STRIKE, HTML_SUB, HTML_SUP, HTML_TT, HTML_UNDERLINE, DocVerbatim::HtmlOnly, Mappers::htmlTagMapper, DocStyleChange::Ins, insidePRE, Token::is, Token::is_any_of, DocStyleChange::Italic, DocStyleChange::Kbd, DocVerbatim::LatexOnly, DocVerbatim::ManOnly, parent, DocVerbatim::RtfOnly, DocStyleChange::S, DocStyleChange::Small, DocStyleChange::Span, DocStyleChange::Strike, DocStyleChange::Subscript, DocStyleChange::Superscript, HtmlEntityMapper::Sym_Amp, HtmlEntityMapper::Sym_At, HtmlEntityMapper::Sym_BSlash, HtmlEntityMapper::Sym_Dollar, HtmlEntityMapper::Sym_Dot, HtmlEntityMapper::Sym_DoubleColon, HtmlEntityMapper::Sym_Equal, HtmlEntityMapper::Sym_Exclam, HtmlEntityMapper::Sym_Greater, HtmlEntityMapper::Sym_Hash, HtmlEntityMapper::Sym_Less, HtmlEntityMapper::Sym_Minus, HtmlEntityMapper::Sym_Percent, HtmlEntityMapper::Sym_Plus, HtmlEntityMapper::Sym_Quest, HtmlEntityMapper::Sym_Quot, HtmlEntityMapper::Sym_Unknown, Token::to_string, tokenizer, TRUE, DocStyleChange::Typewriter, DocStyleChange::Underline, Token::value, warn_doc_error, XML_C and DocVerbatim::XmlOnly.
Referenced by defaultHandleTitleAndSize, handleStyleArgument and DocPara::injectToken.
errorHandleDefaultToken()
|
Declaration at line 118 of file docparser_p.h, definition at line 536 of file docparser.cpp.
References DocNodeList::append, Token::command_to_char, context, parent, qPrint, Token::to_string, tokenizer, Token::value and warn_doc_error.
Referenced by defaultHandleTitleAndSize, handleStyleArgument, DocHRef::parse, DocHtmlCaption::parse, DocHtmlHeader::parse, DocHtmlSummary::parse, DocInternalRef::parse, DocRef::parse, DocSecRefItem::parse, DocTitle::parse and DocVhdlFlow::parse.
findAndCopyImage()
|
search for an image in the imageNameDict and if found copies the image to the output directory (which depends on the type parameter).
Declaration at line 107 of file docparser_p.h, definition at line 94 of file docparser.cpp.
References FileDef::absFilePath, Config_getBool, Config_getString, context, copyFile, DocImage::DocBook, QCString::endsWith, err, FileInfo::exists, QCString::ExplicitSize, findFileDef, QCString::findRev, DocImage::Html, Doxygen::imageNameLinkedMap, Doxygen::indexList, FileInfo::isSymLink, DocImage::Latex, QCString::left, QCString::length, Definition::name, qPrint, Dir::remove, QCString::right, DocImage::Rtf, showFileDefMatches, QCString::sprintf, QCString::startsWith, QCString::str, Portable::system, tokenizer, warn_doc_error and DocImage::Xml.
Referenced by handleImage and handleImg.
findDocsForMemberOrCompound()
|
Looks for a documentation block with name commandName in the current context (g_parserContext.context). The resulting documentation string is put in pDoc, the definition in which the documentation was found is put in pDef.
- Return Values
-
TRUE if name was found.
FALSE if name was not found.
Declaration at line 111 of file docparser_p.h, definition at line 383 of file docparser.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Definition::briefDescription, GetDefInput::checkCV, Doxygen::classLinkedMap, Config_getBool, context, Definition::documentation, FALSE, QCString::find, findFileDef, GetDefResult::found, getDefs, Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, QCString::isEmpty, QCString::left, QCString::length, GetDefResult::md, Doxygen::namespaceLinkedMap, Doxygen::pageLinkedMap, QCString::prepend, qstrlen, removeRedundantWhiteSpace, QCString::right, QCString::size, QCString::startsWith and substitute.
Referenced by processCopyDoc.
handleAHref()
|
Declaration at line 130 of file docparser_p.h, definition at line 708 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, context, convertNameToFile, FALSE, DocNodeList::get_last, parent, tokenizer, TRUE and warn_doc_error.
Referenced by DocPara::handleHtmlStartTag, DocHtmlDescTitle::parse and DocHtmlHeader::parse.
handleAnchor()
|
Declaration at line 135 of file docparser_p.h, definition at line 942 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, context, FALSE, Token::is, Token::is_any_of, parent, Token::to_string, tokenizer and warn_doc_error.
Referenced by defaultHandleToken and DocPara::handleCommand.
handleImage()
|
Declaration at line 137 of file docparser_p.h, definition at line 1090 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, context, DocImage::DocBook, findAndCopyImage, DocNodeList::get_last, DocImage::Html, Token::is, Token::is_any_of, QCString::isEmpty, DocImage::Latex, QCString::lower, QCString::mid, parent, DocImage::Rtf, split, QCString::startsWith, QCString::stripWhiteSpace, Token::to_string, tokenizer, warn_doc_error and DocImage::Xml.
Referenced by defaultHandleToken and DocPara::handleCommand.
handleImg()
|
Declaration at line 103 of file docparser_p.h, definition at line 1583 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, AUTO_TRACE_ADD, context, FALSE, findAndCopyImage, DocImage::Html, parent, tokenizer, TRUE and warn_doc_error.
Referenced by defaultHandleToken and DocPara::handleHtmlStartTag.
handleInitialStyleCommands()
|
Declaration at line 129 of file docparser_p.h, definition at line 697 of file docparser.cpp.
References DocStyleChange::attribs, AUTO_TRACE, context, handleStyleEnter, parent, DocStyleChange::style and DocStyleChange::tagName.
Referenced by DocPara::parse.
handleInternalRef()
|
Declaration at line 134 of file docparser_p.h, definition at line 920 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, context, DocNodeList::get_last, Token::is, Token::is_any_of, parent, Token::to_string, tokenizer and warn_doc_error.
Referenced by defaultHandleToken and DocPara::handleCommand.
handleLinkedWord()
|
Declaration at line 132 of file docparser_p.h, definition at line 777 of file docparser.cpp.
References Definition::anchor, DocNodeList::append, AUTO_TRACE, AUTO_TRACE_ADD, Definition::briefDescriptionAsTooltip, Config_getList, context, Definition::definitionType, FALSE, findFileDef, getClass, MemberDef::getClassDef, Definition::getOutputFileBase, Definition::getReference, Definition::getSourceFileBase, GroupDef::groupTitle, handleLinkedWord, Doxygen::inputNameLinkedMap, Definition::isLinkable, MemberDef::isObjCMethod, linkToText, Definition::name, MemberDef::objCMethodName, parent, resolveRef, toFileDef, toGroupDef, tokenizer, TRUE, Definition::TypeFile, Definition::TypeGroup and warn_doc_error.
Referenced by defaultHandleToken, DocPara::handleHtmlStartTag, handleLinkedWord, handleParameterType, DocPara::parse, DocParamList::parse and DocParamList::parseXml.
handleParameterType()
|
Declaration at line 133 of file docparser_p.h, definition at line 896 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, context, QCString::find, handleLinkedWord, QCString::mid and parent.
Referenced by DocParamList::parse.
handlePendingStyleCommands()
|
Called at the end of a paragraph to close all open style changes (e.g. a without a ). The closed styles are pushed onto a stack and entered again at the start of a new paragraph.
Declaration at line 128 of file docparser_p.h, definition at line 680 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, context, FALSE, parent, DocStyleChange::position, DocStyleChange::style and DocStyleChange::tagName.
Referenced by defaultHandleTitleAndSize, DocHRef::parse, DocHtmlCaption::parse, DocHtmlDescTitle::parse, DocHtmlHeader::parse, DocInternalRef::parse, DocLink::parse, DocPara::parse, DocRef::parse, DocSecRefItem::parse, DocTitle::parse and DocVhdlFlow::parse.
handlePrefix()
|
Declaration at line 136 of file docparser_p.h, definition at line 970 of file docparser.cpp.
References AUTO_TRACE, context, Token::is, Token::is_any_of, parent, Token::to_string, tokenizer and warn_doc_error.
Referenced by defaultHandleToken and DocPara::handleCommand.
handleStyleArgument()
|
Declaration at line 122 of file docparser_p.h, definition at line 569 of file docparser.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, context, defaultHandleToken, errorHandleDefaultToken, Mappers::htmlTagMapper, insideLI, Token::is, Token::is_any_of, reg::match, parent, Token::to_string, tokenizer, UNKNOWN, Token::value and warn_doc_error.
Referenced by defaultHandleToken and DocPara::handleCommand.
handleStyleEnter()
|
Called when a style change starts. For instance a <b> command is encountered.
Declaration at line 124 of file docparser_p.h, definition at line 622 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, GrowVector< T >::back, context, parent, tokenizer and TRUE.
Referenced by defaultHandleToken, DocPara::handleHtmlStartTag and handleInitialStyleCommands.
handleStyleLeave()
|
Called when a style change ends. For instance a </b> command is encountered.
Declaration at line 126 of file docparser_p.h, definition at line 634 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, context, FALSE, QCString::lower, parent, tokenizer and warn_doc_error.
Referenced by defaultHandleToken, DocPara::handleHtmlEndTag and DocPara::handleHtmlStartTag.
handleUnclosedStyleCommands()
|
Declaration at line 131 of file docparser_p.h, definition at line 753 of file docparser.cpp.
References AUTO_TRACE, context, handleUnclosedStyleCommands, tokenizer and warn_doc_error.
Referenced by handleUnclosedStyleCommands, DocRoot::parse and DocText::parse.
internalValidatingParseDoc()
|
Declaration at line 104 of file docparser_p.h, definition at line 1614 of file docparser.cpp.
References DocNodeList::append, AUTO_TRACE, AUTO_TRACE_EXIT, GrowVector< T >::back, context, QCString::data, GrowVector< T >::empty, FALSE, DocNodeList::get_last, Token::is, QCString::isEmpty, DocPara::isFirst, DocPara::isLast, DocPara::markLast, parent, GrowVector< T >::pop_back, tokenizer and TRUE.
Referenced by DocPara::handleInheritDoc, DocRef::parse, DocXRefItem::parse, DocTitle::parseFromString and DocSimpleSect::parseRcs.
popContext()
|
Declaration at line 102 of file docparser_p.h, definition at line 74 of file docparser.cpp.
References context, contextStack and tokenizer.
Referenced by DocPara::handleInheritDoc, DocRef::parse, DocXRefItem::parse, DocTitle::parseFromString and DocSimpleSect::parseRcs.
processCopyDoc()
|
Declaration at line 106 of file docparser_p.h, definition at line 1809 of file docparser.cpp.
References GrowBuf::addChar, GrowBuf::addStr, MemberDef::argumentList, AUTO_TRACE, AUTO_TRACE_EXIT, Definition::briefFile, Definition::briefLine, context, Definition::definitionType, Definition::docFile, Definition::docLine, extractCopyDocId, findDocsForMemberOrCompound, GrowBuf::get, GrowBuf::getPos, inlineArgListToDoc, isCopyBriefOrDetailsCmd, Definition::isReference, isVerbatimSection, processCopyDoc, skipToEndMarker, MemberDef::templateMaster, tokenizer, toMemberDef, TRUE, Trace::trunc, Definition::TypeMember and warn_doc_error.
Referenced by processCopyDoc and validatingParseDoc.
pushContext()
|
Declaration at line 101 of file docparser_p.h, definition at line 60 of file docparser.cpp.
References context, contextStack and tokenizer.
Referenced by DocPara::handleInheritDoc, DocRef::parse, DocXRefItem::parse, DocTitle::parseFromString and DocSimpleSect::parseRcs.
readTextFileByName()
Declaration at line 138 of file docparser_p.h, definition at line 1655 of file docparser.cpp.
References AUTO_TRACE, Config_getBool, context, Doxygen::exampleNameLinkedMap, fileToString, findFilePath, QCString::isEmpty, showFileDefMatches, tokenizer and warn_doc_error.
Referenced by DocInclude::parse.
Public Member Attributes
context
|
Definition at line 141 of file docparser_p.h.
Referenced by DocSimpleSect::appendLinkWord, checkArgumentName, checkIfHtmlEndTagEndsAutoList, checkRetvalName, checkUnOrMultipleDocumentedParams, createRef, defaultHandleTitleAndSize, defaultHandleToken, errorHandleDefaultToken, findAndCopyImage, findDocsForMemberOrCompound, handleAHref, handleAnchor, DocPara::handleCite, DocPara::handleCommand, DocPara::handleDoxyConfig, DocPara::handleEmoji, DocPara::handleFile, DocPara::handleHtmlStartTag, DocPara::handleIFile, handleImage, handleImg, DocPara::handleInclude, DocPara::handleIncludeOperator, DocPara::handleInheritDoc, handleInitialStyleCommands, handleInternalRef, DocPara::handleLink, handleLinkedWord, handleParameterType, handlePendingStyleCommands, handlePrefix, DocPara::handleRef, DocPara::handleSection, DocPara::handleShowDate, DocPara::handleStartCode, handleStyleArgument, handleStyleEnter, handleStyleLeave, handleUnclosedStyleCommands, DocPara::handleXRefItem, DocPara::injectToken, internalValidatingParseDoc, DocAutoList::parse, DocHRef::parse, DocHtmlDescData::parse, DocHtmlDescList::parse, DocHtmlDescTitle::parse, DocHtmlHeader::parse, DocHtmlList::parse, DocHtmlRow::parse, DocHtmlTable::parse, DocInclude::parse, DocIncOperator::parse, DocIndexEntry::parse, DocInternal::parse, DocLink::parse, DocPara::parse, DocParamList::parse, DocRef::parse, DocRoot::parse, DocSecRefList::parse, DocSection::parse, DocText::parse, DocTitle::parseFromString, DocSimpleSect::parseRcs, DocHtmlList::parseXml, DocHtmlRow::parseXml, DocHtmlTable::parseXml, DocParamList::parseXml, popContext, processCopyDoc, pushContext, readTextFileByName, validatingParseDoc, validatingParseText and validatingParseTitle.
contextStack
|
Definition at line 140 of file docparser_p.h.
Referenced by popContext and pushContext.
tokenizer
|
Definition at line 142 of file docparser_p.h.
Referenced by checkIfHtmlEndTagEndsAutoList, createRef, defaultHandleTitleAndSize, defaultHandleToken, docFindSections, errorHandleDefaultToken, findAndCopyImage, handleAHref, handleAnchor, DocPara::handleCite, DocPara::handleCommand, DocPara::handleDoxyConfig, DocPara::handleEmoji, DocPara::handleFile, DocPara::handleHtmlEndTag, DocPara::handleHtmlStartTag, DocPara::handleIFile, DocPara::handleILine, handleImage, handleImg, DocPara::handleInclude, DocPara::handleIncludeOperator, handleInternalRef, DocPara::handleLink, handleLinkedWord, handlePrefix, DocPara::handleRef, DocPara::handleSection, DocPara::handleShowDate, DocPara::handleStartCode, handleStyleArgument, handleStyleEnter, handleStyleLeave, handleUnclosedStyleCommands, DocPara::handleXRefItem, internalValidatingParseDoc, DocAutoList::parse, DocHRef::parse, DocHtmlCaption::parse, DocHtmlDescList::parse, DocHtmlDescTitle::parse, DocHtmlHeader::parse, DocHtmlList::parse, DocHtmlRow::parse, DocHtmlSummary::parse, DocHtmlTable::parse, DocIndexEntry::parse, DocInternalRef::parse, DocLink::parse, DocPara::parse, DocParamList::parse, DocRef::parse, DocRoot::parse, DocSecRefItem::parse, DocSecRefList::parse, DocText::parse, DocTitle::parse, DocVhdlFlow::parse, DocTitle::parseFromString, DocHtmlList::parseXml, DocHtmlRow::parseXml, DocHtmlTable::parseXml, popContext, processCopyDoc, pushContext, readTextFileByName, validatingParseDoc, validatingParseText and validatingParseTitle.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus by Doxygen 1.14.0.