diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmdmapper.cpp | 4 | ||||
-rw-r--r-- | src/cmdmapper.h | 6 | ||||
-rw-r--r-- | src/commentscan.l | 16 | ||||
-rw-r--r-- | src/docbookvisitor.cpp | 6 | ||||
-rw-r--r-- | src/docparser.cpp | 18 | ||||
-rw-r--r-- | src/docparser.h | 2 | ||||
-rw-r--r-- | src/doxygen.cpp | 2 | ||||
-rw-r--r-- | src/entry.cpp | 15 | ||||
-rw-r--r-- | src/entry.h | 3 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 8 | ||||
-rw-r--r-- | src/latexdocvisitor.cpp | 4 | ||||
-rw-r--r-- | src/mandocvisitor.cpp | 6 | ||||
-rw-r--r-- | src/perlmodgen.cpp | 4 | ||||
-rw-r--r-- | src/printdocvisitor.h | 4 | ||||
-rw-r--r-- | src/rtfdocvisitor.cpp | 6 | ||||
-rw-r--r-- | src/scanner.l | 8 | ||||
-rw-r--r-- | src/xmldocvisitor.cpp | 18 |
17 files changed, 90 insertions, 40 deletions
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index e62aa4f..372ba5b 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -149,6 +149,10 @@ CommandMap cmdMap[] = { "---", CMD_MDASH }, { "_setscope", CMD_SETSCOPE }, { "emoji", CMD_EMOJI }, + { "rtfinclude", CMD_RTFINCLUDE }, + { "docbookinclude",CMD_DOCBOOKINCLUDE }, + { "maninclude", CMD_MANINCLUDE }, + { "xmlinclude", CMD_XMLINCLUDE }, { 0, 0 }, }; diff --git a/src/cmdmapper.h b/src/cmdmapper.h index 246be9d..a86c20a 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -138,7 +138,11 @@ enum CommandType CMD_SNIPPETDOC = 108, CMD_SNIPWITHLINES= 109, CMD_EMOJI = 110, - CMD_EQUAL = 111 + CMD_EQUAL = 111, + CMD_RTFINCLUDE = 112, + CMD_DOCBOOKINCLUDE= 113, + CMD_MANINCLUDE = 114, + CMD_XMLINCLUDE = 115 }; enum HtmlTagType diff --git a/src/commentscan.l b/src/commentscan.l index 02117c2..9c672cd 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -286,6 +286,10 @@ static DocCmdMap docCmdMap[] = { "snippet", 0, TRUE }, { "snippetlineno", 0, TRUE }, { "noop", &handleNoop, TRUE }, + { "rtfinclude", 0, FALSE }, + { "docbookinclude", 0, FALSE }, + { "maninclude", 0, FALSE }, + { "xmlinclude", 0, FALSE }, { 0, 0, FALSE } }; @@ -487,18 +491,6 @@ static void addCite(yyscan_t yyscanner); /* start command character */ CMD ("\\"|"@") -DCMD1 ("arg"|"attention"|"author"|"cite"|"code") -DCMD2 ("date"|"dot"|"msc"|"dotfile"|"example"|"startuml") -DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include") -DCMD4 ("includelineno"|"internal"|"invariant") -DCMD5 ("latexinclude"|"latexonly"|"li"|"line"|"manonly"|"name") -DCMD6 ("note"|"par"|"paragraph"|"param"|"post") -DCMD7 ("pre"|"remarks"|(("relate"[sd])("also")?)) -DCMD8 ("remarks"|("return"[s]?)|"retval"|"sa"|"section") -DCMD9 ("see"|"since"|"subsection"|"subsubsection") -DCMD10 ("throw"|"until"|"verbatim") -DCMD11 ("verbinclude"|"version"|"warning") -DETAILEDCMD {CMD}({DCMD1}|{DCMD2}|{DCMD3}|{DCMD4}|{DCMD5}|{DCMD6}|{DCMD7}|{DCMD8}|{DCMD9}|{DCMD10}|{DCMD11}) XREFCMD {CMD}("bug"|"deprecated"|"test"|"todo"|"xrefitem") PRE [pP][rR][eE] TABLE [tT][aA][bB][lL][eE] diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index 9de0a16..e6d0014 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -434,6 +434,12 @@ DB_VIS_C case DocInclude::DontIncWithLines: case DocInclude::HtmlInclude: case DocInclude::LatexInclude: + case DocInclude::RtfInclude: + case DocInclude::ManInclude: + case DocInclude::XmlInclude: + break; + case DocInclude::DocbookInclude: + m_t << inc->text(); break; case DocInclude::VerbInclude: m_t << "<literallayout>"; diff --git a/src/docparser.cpp b/src/docparser.cpp index 5498adb..2d27ff9 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -2000,9 +2000,11 @@ void DocInclude::parse() case VerbInclude: // fall through case HtmlInclude: - readTextFileByName(m_file,m_text); - break; case LatexInclude: + case DocInclude::RtfInclude: + case DocInclude::ManInclude: + case DocInclude::XmlInclude: + case DocInclude::DocbookInclude: readTextFileByName(m_file,m_text); break; case Snippet: @@ -5776,6 +5778,18 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok) case CMD_LATEXINCLUDE: handleInclude(cmdName,DocInclude::LatexInclude); break; + case CMD_RTFINCLUDE: + handleInclude(cmdName,DocInclude::RtfInclude); + break; + case CMD_MANINCLUDE: + handleInclude(cmdName,DocInclude::ManInclude); + break; + case CMD_XMLINCLUDE: + handleInclude(cmdName,DocInclude::XmlInclude); + break; + case CMD_DOCBOOKINCLUDE: + handleInclude(cmdName,DocInclude::DocbookInclude); + break; case CMD_VERBINCLUDE: handleInclude(cmdName,DocInclude::VerbInclude); break; diff --git a/src/docparser.h b/src/docparser.h index b7164d7..2ce8f4b 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -583,7 +583,7 @@ class DocInclude : public DocNode public: enum Type { Include, DontInclude, VerbInclude, HtmlInclude, LatexInclude, IncWithLines, Snippet , IncludeDoc, SnippetDoc, SnipWithLines, - DontIncWithLines}; + DontIncWithLines, RtfInclude, ManInclude, DocbookInclude, XmlInclude}; DocInclude(DocNode *parent,const QCString &file, const QCString context, Type t, bool isExample,const QCString exampleFile, diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 5a5e95d..e32f8da 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -3724,7 +3724,7 @@ static void transferFunctionDocumentation() MemberNameIterator mni2(*mn); for (;(mdef=mni2.current());++mni2) { - if (mdec!=mdef && !mdec->isAlias() && !mdef->isAlias()) + if (mdec!=mdef && mdec->getNamespaceDef()==mdef->getNamespaceDef() && !mdec->isAlias() && !mdef->isAlias()) { combineDeclarationAndDefinition(mdec,mdef); } diff --git a/src/entry.cpp b/src/entry.cpp index cc8cd1f..a0e616a 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -169,21 +169,6 @@ void Entry::copyToSubEntry(const std::shared_ptr<Entry> ¤t) m_sublist.push_back(copy); } -void Entry::moveFromSubEntry(const Entry *child,std::shared_ptr<Entry> &moveTo) -{ - auto it = std::find_if(m_sublist.begin(),m_sublist.end(), - [child](const std::shared_ptr<Entry>&elem) { return elem.get()==child; }); - if (it!=m_sublist.end()) - { - moveTo = *it; - m_sublist.erase(it); - } - else - { - moveTo.reset(); - } -} - void Entry::removeSubEntry(const Entry *e) { auto it = std::find_if(m_sublist.begin(),m_sublist.end(), diff --git a/src/entry.h b/src/entry.h index 802a212..3cd53e9 100644 --- a/src/entry.h +++ b/src/entry.h @@ -216,9 +216,6 @@ class Entry void moveToSubEntryAndRefresh(Entry* &e); void moveToSubEntryAndRefresh(std::shared_ptr<Entry> &e); - /*! take \a child of of to list of children and move it into \a moveTo */ - void moveFromSubEntry(const Entry *child,std::shared_ptr<Entry> &moveTo); - /*! make a copy of \a e and add it as a child to this entry */ void copyToSubEntry (Entry* e); void copyToSubEntry (const std::shared_ptr<Entry> &e); diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 424fead..aff838e 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -180,6 +180,10 @@ static bool isDocIncludeVisible(DocInclude *s) { case DocInclude::DontInclude: case DocInclude::LatexInclude: + case DocInclude::RtfInclude: + case DocInclude::ManInclude: + case DocInclude::XmlInclude: + case DocInclude::DocbookInclude: return FALSE; default: return TRUE; @@ -715,6 +719,10 @@ void HtmlDocVisitor::visit(DocInclude *inc) break; case DocInclude::DontInclude: case DocInclude::LatexInclude: + case DocInclude::RtfInclude: + case DocInclude::ManInclude: + case DocInclude::XmlInclude: + case DocInclude::DocbookInclude: case DocInclude::DontIncWithLines: break; case DocInclude::HtmlInclude: diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 730f083..b9ce963 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -503,6 +503,10 @@ void LatexDocVisitor::visit(DocInclude *inc) case DocInclude::DontInclude: case DocInclude::DontIncWithLines: case DocInclude::HtmlInclude: + case DocInclude::RtfInclude: + case DocInclude::ManInclude: + case DocInclude::XmlInclude: + case DocInclude::DocbookInclude: break; case DocInclude::LatexInclude: m_t << inc->text(); diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 6b76008..fef857e 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -304,6 +304,12 @@ void ManDocVisitor::visit(DocInclude *inc) case DocInclude::DontIncWithLines: case DocInclude::HtmlInclude: case DocInclude::LatexInclude: + case DocInclude::RtfInclude: + case DocInclude::XmlInclude: + case DocInclude::DocbookInclude: + break; + case DocInclude::ManInclude: + m_t << inc->text(); break; case DocInclude::VerbInclude: if (!m_firstCol) m_t << endl; diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 4ecee5e..7bbc4a7 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -733,6 +733,10 @@ void PerlModDocVisitor::visit(DocInclude *inc) case DocInclude::DontIncWithLines: return; case DocInclude::HtmlInclude: type = "htmlonly"; break; case DocInclude::LatexInclude: type = "latexonly"; break; + case DocInclude::RtfInclude: type = "rtfonly"; break; + case DocInclude::ManInclude: type = "manonly"; break; + case DocInclude::XmlInclude: type = "xmlonly"; break; + case DocInclude::DocbookInclude: type = "docbookonly"; break; case DocInclude::VerbInclude: type = "preformatted"; break; case DocInclude::Snippet: return; case DocInclude::SnipWithLines: return; diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index ed4e76b..7bc5821 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -202,6 +202,10 @@ class PrintDocVisitor : public DocVisitor if (inc->isBlock()) printf(" block=\"yes\""); break; case DocInclude::LatexInclude: printf("latexinclude"); break; + case DocInclude::RtfInclude: printf("rtfinclude"); break; + case DocInclude::DocbookInclude: printf("docbookinclude"); break; + case DocInclude::ManInclude: printf("maninclude"); break; + case DocInclude::XmlInclude: printf("xmlinclude"); break; case DocInclude::VerbInclude: printf("verbinclude"); break; case DocInclude::Snippet: printf("snippet"); break; case DocInclude::SnipWithLines: printf("snipwithlines"); break; diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 471cf85..75ac400 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -473,6 +473,12 @@ void RTFDocVisitor::visit(DocInclude *inc) case DocInclude::DontIncWithLines: case DocInclude::HtmlInclude: case DocInclude::LatexInclude: + case DocInclude::ManInclude: + case DocInclude::XmlInclude: + case DocInclude::DocbookInclude: + break; + case DocInclude::RtfInclude: + m_t << inc->text(); break; case DocInclude::VerbInclude: m_t << "{" << endl; diff --git a/src/scanner.l b/src/scanner.l index cb6f5a3..00ba8a7 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -4914,7 +4914,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } <SkipCurly>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" { lineCount(yyscanner); - if ( yyextra->curlyCount ) + if ( yyextra->curlyCount ) { //addToBody(yytext); --yyextra->curlyCount ; @@ -4922,10 +4922,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) else { yyextra->current->endBodyLine=yyextra->yyLineNr; - // take yyextra->previous out of yyextra->current_root and move it into yyextra->current - yyextra->tempEntry = yyextra->current; // remember yyextra->current - yyextra->current_root->moveFromSubEntry(yyextra->previous.get(),yyextra->current); - yyextra->previous.reset(); + yyextra->tempEntry = yyextra->current; // temporarily switch to the previous entry + yyextra->current = yyextra->previous; yyextra->docBlockContext = SkipCurlyEndDoc; yyextra->docBlockInBody = FALSE; diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 019bef1..0aafd47 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -388,6 +388,24 @@ void XmlDocVisitor::visit(DocInclude *inc) filter(inc->text()); m_t << "</latexonly>"; break; + case DocInclude::RtfInclude: + m_t << "<rtfonly>"; + filter(inc->text()); + m_t << "</rtfonly>"; + break; + case DocInclude::ManInclude: + m_t << "<manonly>"; + filter(inc->text()); + m_t << "</manonly>"; + break; + case DocInclude::XmlInclude: + filter(inc->text()); + break; + case DocInclude::DocbookInclude: + m_t << "<docbookonly>"; + filter(inc->text()); + m_t << "</docbookonly>"; + break; case DocInclude::VerbInclude: m_t << "<verbatim>"; filter(inc->text()); |