diff options
author | Petr Prikryl <prikryl@atlas.cz> | 2014-09-24 06:10:59 (GMT) |
---|---|---|
committer | Petr Prikryl <prikryl@atlas.cz> | 2014-09-24 06:10:59 (GMT) |
commit | 84898eb601b4708ef4c310a517b99a4bf09f4954 (patch) | |
tree | f4f667a188d58644eb71631d470d4c7a485e5911 | |
parent | f8a304ecf96e7fc7d9e8a026f00cdf419e4bfc37 (diff) | |
parent | 2b6d6bf5ef71341af6afec1802c5991318c9692a (diff) | |
download | Doxygen-84898eb601b4708ef4c310a517b99a4bf09f4954.zip Doxygen-84898eb601b4708ef4c310a517b99a4bf09f4954.tar.gz Doxygen-84898eb601b4708ef4c310a517b99a4bf09f4954.tar.bz2 |
Merge branch 'master' of https://github.com/doxygen/doxygen.git
76 files changed, 1735 insertions, 782 deletions
diff --git a/Makefile.in b/Makefile.in index a83f08b..e90167c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -35,6 +35,7 @@ distclean: clean -cd src ; $(MAKE) distclean -cd libmd5 ; $(MAKE) distclean -cd vhdlparser ; $(MAKE) distclean + -cd qtools ; $(MAKE) distclean -cd addon/doxywizard ; $(MAKE) distclean -cd addon/doxysearch ; $(MAKE) distclean -cd addon/doxyapp ; $(MAKE) distclean @@ -111,7 +112,7 @@ DISTDIR = doxygen-`echo $(VERSION) | tr - _` dist: clean rm -rf $(DISTDIR) mkdir $(DISTDIR) - cp -a $(DISTFILES) README $(DISTDIR) + cp -a $(DISTFILES) $(DISTDIR) find $(DISTDIR) \( -name ".svn" \) -print0 | xargs -0 rm -rf tar zcvf $(DISTDIR).src.tar.gz $(DISTDIR) rm -rf $(DISTDIR) @@ -31,6 +31,8 @@ Developers --------- * Build Status: <a href="https://travis-ci.org/doxygen/doxygen"><img src="https://secure.travis-ci.org/doxygen/doxygen.png?branch=master"/></a> +* Coverity Scan Build Status: <a href="https://scan.coverity.com/projects/2860"> <img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/2860/badge.svg"/> </a> + * Install * Quick install see (./INSTALL) * else http://www.doxygen.org/manual/install.html diff --git a/addon/doxysearch/doxysearch.cpp b/addon/doxysearch/doxysearch.cpp index 11af8e3..d885502 100644 --- a/addon/doxysearch/doxysearch.cpp +++ b/addon/doxysearch/doxysearch.cpp @@ -401,7 +401,7 @@ int main(int argc,char **argv) Xapian::Document doc = i.get_document(); highlighter(doc.get_value(FIELD_DOC),words,hl); std::cout << " {\"type\": \"" << doc.get_value(FIELD_TYPE) << "\"," << std::endl - << " \"name\": \"" << doc.get_value(FIELD_NAME) << doc.get_value(FIELD_ARGS) << "\"," << std::endl + << " \"name\": \"" << doc.get_value(FIELD_NAME) << escapeString(doc.get_value(FIELD_ARGS)) << "\"," << std::endl << " \"tag\": \"" << doc.get_value(FIELD_TAG) << "\"," << std::endl << " \"url\": \"" << doc.get_value(FIELD_URL) << "\"," << std::endl; std::cout << " \"fragments\":[" << std::endl; diff --git a/doc/commands.doc b/doc/commands.doc index 73eb842..1b3f2bd 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -2147,7 +2147,8 @@ Commands for displaying examples \addindex \\snippet Where the \ref cmdinclude "\\include" command can be used to include a complete file as source code, this command can be used to quote only - a fragment of a source file. + a fragment of a source file. In case `this` is used as <file-name> the + current file is taken as file to take the snippet from. For example, the putting the following command in the documentation, references a snippet in file \c example.cpp residing in a subdirectory diff --git a/qtools/Makefile.in b/qtools/Makefile.in index ca66cc1..411ee5d 100644 --- a/qtools/Makefile.in +++ b/qtools/Makefile.in @@ -26,5 +26,6 @@ clean: Makefile.qtools $(MAKE) -f Makefile.qtools clean distclean: clean + $(RM) Makefile.qtools FORCE: diff --git a/qtools/qgstring.cpp b/qtools/qgstring.cpp index 85dd879..8b15675 100644 --- a/qtools/qgstring.cpp +++ b/qtools/qgstring.cpp @@ -209,7 +209,7 @@ QGString &QGString::operator+=( const QGString &s ) assert(memSize>=len1+len2+1); char *newData = memSize!=m_memSize ? (char*)realloc( m_data, memSize ) : m_data; m_memSize = memSize; - if (m_data) + if (newData) { m_data = newData; memcpy( m_data + len1, s, len2 + 1 ); diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp index fa8f1d3..3673c20 100644 --- a/qtools/qstring.cpp +++ b/qtools/qstring.cpp @@ -11499,9 +11499,9 @@ static inline bool format(QChar::Decomposition tag, QString & str, unsigned int l = index + len; unsigned int r = index; - bool left = FALSE, right = FALSE; + bool right = FALSE; - left = ((l < str.length()) && + bool left = ((l < str.length()) && ((str[(int)l].joining() == QChar::Dual) || (str[(int)l].joining() == QChar::Right))); if (r > 0) { diff --git a/qtools/qthread.cpp b/qtools/qthread.cpp index db2a0de..02c99f2 100644 --- a/qtools/qthread.cpp +++ b/qtools/qthread.cpp @@ -52,6 +52,7 @@ QThread::~QThread() QMutexLocker locker(&d->mutex); if (d->running && !d->finished) qWarning("QThread: Destroyed while thread is still running"); + delete d; } bool QThread::isFinished() const diff --git a/src/cite.cpp b/src/cite.cpp index a33f12f..fb96c7a 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -62,9 +62,14 @@ void CiteDict::writeLatexBibliography(FTextStream &t) unit = "chapter"; t << "% Bibliography\n" "\\newpage\n" - "\\phantomsection\n" - "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n" - "\\bibliographystyle{" << style << "}\n" + "\\phantomsection\n"; + bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); + if (!pdfHyperlinks) + { + t << "\\clearemptydoublepage\n"; + t << "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n"; + } + t << "\\bibliographystyle{" << style << "}\n" "\\bibliography{"; QStrList &citeDataList = Config_getList("CITE_BIB_FILES"); QCString latexOutputDir = Config_getString("LATEX_OUTPUT")+"/"; @@ -87,8 +92,12 @@ void CiteDict::writeLatexBibliography(FTextStream &t) } bibdata = citeDataList.next(); } - t << "}\n" - "\n"; + t << "}\n"; + if (pdfHyperlinks) + { + t << "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n"; + } + t << "\n"; } void CiteDict::insert(const char *label) @@ -294,7 +303,6 @@ void CiteDict::generatePage() const thisDir.remove(citeListFile); thisDir.remove(doxygenBstFile); thisDir.remove(bib2xhtmlFile); - bibdata = citeDataList.first(); // we might try to remove too many files as empty files didn't get a coresponding new file // but the remove function does not emit an error for it and we don't catch the error return // so no problem. diff --git a/src/classdef.cpp b/src/classdef.cpp index c36a83f..d02dd5d 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -854,13 +854,14 @@ void ClassDef::setIncludeFile(FileDef *fd, static void searchTemplateSpecs(/*in*/ Definition *d, /*out*/ QList<ArgumentList> &result, - /*out*/ QCString &name) + /*out*/ QCString &name, + /*in*/ SrcLangExt lang) { if (d->definitionType()==Definition::TypeClass) { if (d->getOuterScope()) { - searchTemplateSpecs(d->getOuterScope(),result,name); + searchTemplateSpecs(d->getOuterScope(),result,name,lang); } ClassDef *cd=(ClassDef *)d; if (!name.isEmpty()) name+="::"; @@ -876,7 +877,7 @@ static void searchTemplateSpecs(/*in*/ Definition *d, result.append(cd->templateArguments()); if (!isSpecialization) { - name+=tempArgListToString(cd->templateArguments()); + name+=tempArgListToString(cd->templateArguments(),lang); } } } @@ -887,11 +888,11 @@ static void searchTemplateSpecs(/*in*/ Definition *d, } static void writeTemplateSpec(OutputList &ol,Definition *d, - const QCString &type) + const QCString &type,SrcLangExt lang) { QList<ArgumentList> specs; QCString name; - searchTemplateSpecs(d,specs,name); + searchTemplateSpecs(d,specs,name,lang); if (specs.count()>0) // class has template scope specifiers { ol.startSubsubsection(); @@ -962,7 +963,7 @@ void ClassDef::writeDetailedDocumentationBody(OutputList &ol) if (getLanguage()==SrcLangExt_Cpp) { - writeTemplateSpec(ol,this,compoundTypeString()); + writeTemplateSpec(ol,this,compoundTypeString(),getLanguage()); } // repeat brief description @@ -1179,7 +1180,7 @@ int ClassDef::countInheritanceNodes() void ClassDef::writeInheritanceGraph(OutputList &ol) { // count direct inheritance relations - int count=countInheritanceNodes(); + const int count=countInheritanceNodes(); bool renderDiagram = FALSE; if (Config_getBool("HAVE_DOT") && @@ -1216,7 +1217,7 @@ void ClassDef::writeInheritanceGraph(OutputList &ol) ol.disableAllBut(OutputGenerator::Man); } - if (m_impl->inherits && (count=m_impl->inherits->count())>0) + if (m_impl->inherits && m_impl->inherits->count()>0) { ol.startParagraph(); //parseText(ol,theTranslator->trInherits()+" "); @@ -1242,24 +1243,6 @@ void ClassDef::writeInheritanceGraph(OutputList &ol) if (cd->isLinkable()) { - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <base"; - if (bcd->prot==Protected) - { - Doxygen::tagFile << " protection=\"protected\""; - } - else if (bcd->prot==Private) - { - Doxygen::tagFile << " protection=\"private\""; - } - if (bcd->virt==Virtual) - { - Doxygen::tagFile << " virtualness=\"virtual\""; - } - Doxygen::tagFile << ">" << convertToXML(cd->name()) - << "</base>" << endl; - } ol.writeObjectLink(cd->getReference(), cd->getOutputFileBase(), cd->anchor(), @@ -1281,7 +1264,7 @@ void ClassDef::writeInheritanceGraph(OutputList &ol) } // write subclasses - if (m_impl->inheritedBy && (count=m_impl->inheritedBy->count())>0) + if (m_impl->inheritedBy && m_impl->inheritedBy->count()>0) { ol.startParagraph(); QCString inheritLine = theTranslator->trInheritedByList(m_impl->inheritedBy->count()); @@ -1573,36 +1556,118 @@ void ClassDef::writeSummaryLinks(OutputList &ol) ol.popGeneratorState(); } -void ClassDef::writeTagFileMarker() +void ClassDef::writeTagFile(FTextStream &tagFile) { - // write section to the tag file - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + if (!isLinkableInProject()) return; + tagFile << " <compound kind=\"" << compoundTypeString(); + tagFile << "\""; + if (isObjectiveC()) { tagFile << " objc=\"yes\""; } + tagFile << ">" << endl; + tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; + tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; + if (!anchor().isEmpty()) { - Doxygen::tagFile << " <compound kind=\"" << compoundTypeString(); - Doxygen::tagFile << "\""; - if (isObjectiveC()) { Doxygen::tagFile << " objc=\"yes\""; } - Doxygen::tagFile << ">" << endl; - Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; - Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; - if (!anchor().isEmpty()) - { - Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl; - } - QCString idStr = id(); - if (!idStr.isEmpty()) + tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl; + } + QCString idStr = id(); + if (!idStr.isEmpty()) + { + tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl; + } + if (m_impl->tempArgs) + { + ArgumentListIterator ali(*m_impl->tempArgs); + Argument *a; + for (;(a=ali.current());++ali) { - Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl; + tagFile << " <templarg>" << convertToXML(a->name) << "</templarg>" << endl; } - if (m_impl->tempArgs) + } + if (m_impl->inherits) + { + BaseClassListIterator it(*m_impl->inherits); + BaseClassDef *ibcd; + for (it.toFirst();(ibcd=it.current());++it) { - ArgumentListIterator ali(*m_impl->tempArgs); - Argument *a; - for (;(a=ali.current());++ali) + ClassDef *cd=ibcd->classDef; + if (cd && cd->isLinkable()) { - Doxygen::tagFile << " <templarg>" << convertToXML(a->name) << "</templarg>" << endl; + if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + { + tagFile << " <base"; + if (ibcd->prot==Protected) + { + tagFile << " protection=\"protected\""; + } + else if (ibcd->prot==Private) + { + tagFile << " protection=\"private\""; + } + if (ibcd->virt==Virtual) + { + tagFile << " virtualness=\"virtual\""; + } + tagFile << ">" << convertToXML(cd->name()) << "</base>" << endl; + } } } } + QListIterator<LayoutDocEntry> eli( + LayoutDocManager::instance().docEntries(LayoutDocManager::Class)); + LayoutDocEntry *lde; + for (eli.toFirst();(lde=eli.current());++eli) + { + switch (lde->kind()) + { + case LayoutDocEntry::ClassNestedClasses: + { + if (m_impl->innerClasses) + { + ClassSDict::Iterator cli(*m_impl->innerClasses); + ClassDef *innerCd; + for (cli.toFirst();(innerCd=cli.current());++cli) + { + if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0 && + protectionLevelVisible(innerCd->protection()) && + !innerCd->isEmbeddedInOuterScope() + ) + { + tagFile << " <class kind=\"" << innerCd->compoundTypeString() << + "\">" << convertToXML(innerCd->name()) << "</class>" << endl; + } + } + } + } + break; + case LayoutDocEntry::MemberDecl: + { + LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; + MemberList * ml = getMemberList(lmd->type); + if (ml) + { + ml->writeTagFile(tagFile); + } + } + break; + case LayoutDocEntry::MemberGroups: + { + if (m_impl->memberGroupSDict) + { + MemberGroupSDict::Iterator mgli(*m_impl->memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->writeTagFile(tagFile); + } + } + } + break; + default: + break; + } + } + writeDocAnchorsToTagFile(tagFile); + tagFile << " </compound>" << endl; } /** Write class documentation inside another container (i.e. a group) */ @@ -1721,9 +1786,6 @@ void ClassDef::writeInlineDocumentation(OutputList &ol) ol.endIndent(); } ol.popGeneratorState(); - - // part 4: write tag file information - writeTagFileMarker(); } void ClassDef::writeMoreLink(OutputList &ol,const QCString &anchor) @@ -1809,12 +1871,6 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade ol.startMemberList(); found=TRUE; } - if (!Config_getString("GENERATE_TAGFILE").isEmpty() && - !isReference()) // skip classes found in tag files - { - Doxygen::tagFile << " <class kind=\"" << compoundTypeString() - << "\">" << convertToXML(name()) << "</class>" << endl; - } ol.startMemberDeclaration(); ol.startMemberItem(anchor(),FALSE); QCString ctype = compoundTypeString(); @@ -1902,8 +1958,6 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString & /*page pageType += compoundTypeString(); toupper(pageType.at(1)); - writeTagFileMarker(); - Doxygen::indexList->addIndexItem(this,0); if (Doxygen::searchIndex) @@ -2016,11 +2070,6 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString & /*page } } - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </compound>" << endl; - } ol.endContents(); } @@ -2053,9 +2102,16 @@ QCString ClassDef::title() const } else { - pageTitle = theTranslator->trCompoundReference(displayName(), - m_impl->compType == Interface && getLanguage()==SrcLangExt_ObjC ? Class : m_impl->compType, - m_impl->tempArgs != 0); + if (Config_getBool("HIDE_COMPOUND_REFERENCE")) + { + pageTitle = displayName(); + } + else + { + pageTitle = theTranslator->trCompoundReference(displayName(), + m_impl->compType == Interface && getLanguage()==SrcLangExt_ObjC ? Class : m_impl->compType, + m_impl->tempArgs != 0); + } } return pageTitle; } @@ -3767,7 +3823,7 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( //{ // clName = clName.left(clName.length()-2); //} - //printf("m_impl->lang=%d clName=%s\n",m_impl->lang,clName.data()); + //printf("m_impl->lang=%d clName=%s isSpecialization=%d\n",getLanguage(),clName.data(),isSpecialization); scName+=clName; ArgumentList *al=0; if (templateArguments()) @@ -3777,7 +3833,7 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( al = actualParams->at(*actualParamIndex); if (!isSpecialization) { - scName+=tempArgListToString(al); + scName+=tempArgListToString(al,lang); } (*actualParamIndex)++; } @@ -3785,7 +3841,7 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( { if (!isSpecialization) { - scName+=tempArgListToString(templateArguments()); + scName+=tempArgListToString(templateArguments(),lang); } } } @@ -4191,14 +4247,14 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QC if (ml) { //printf(" writeDeclaration type=%d count=%d\n",lt,ml->numDecMembers()); - ml->writeDeclarations(ol,this,0,0,0,tt,st,definitionType(),FALSE,showInline,inheritedFrom,lt); + ml->writeDeclarations(ol,this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt); tt.resize(0); st.resize(0); } if (ml2) { //printf(" writeDeclaration type=%d count=%d\n",lt2,ml2->numDecMembers()); - ml2->writeDeclarations(ol,this,0,0,0,tt,st,definitionType(),FALSE,showInline,inheritedFrom,lt); + ml2->writeDeclarations(ol,this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt); } static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB"); if (!inlineInheritedMembers) // show inherited members as separate lists @@ -4253,7 +4309,7 @@ void ClassDef::writePlainMemberDeclaration(OutputList &ol, if (ml) { ml->setInGroup(inGroup); - ml->writePlainDeclarations(ol,this,0,0,0,definitionType(),inheritedFrom,inheritId); + ml->writePlainDeclarations(ol,this,0,0,0,inheritedFrom,inheritId); } } diff --git a/src/classdef.h b/src/classdef.h index 9f0ae5f..0729d20 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -46,6 +46,7 @@ class StringDict; struct IncludeInfo; class ClassDefImpl; class ArgumentList; +class FTextStream; /** A class representing of a compound symbol. * @@ -391,6 +392,7 @@ class ClassDef : public Definition ClassDef *inheritedFrom,const QCString &inheritId); int countMembersIncludingGrouped(MemberListType lt,ClassDef *inheritedFrom,bool additional); int countInheritanceNodes(); + void writeTagFile(FTextStream &); bool visited; @@ -400,7 +402,6 @@ class ClassDef : public Definition void showUsedFiles(OutputList &ol); private: - void writeTagFileMarker(); void writeDocumentationContents(OutputList &ol,const QCString &pageTitle); void internalInsertMember(MemberDef *md,Protection prot,bool addToAllList); void addMemberToList(MemberListType lt,MemberDef *md,bool isBrief); diff --git a/src/commentscan.l b/src/commentscan.l index 168907f..3bfd563 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -917,7 +917,7 @@ ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]* LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]* CITESCHAR [a-z_A-Z\x80-\xFF] CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/]* -CITEID {CITESCHAR}*{CITEECHAR}+("."{CITESCHAR}*{CITEECHAR}+)* +CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)* SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) SCOPENAME "$"?(({ID}?{BN}*("::"|"."){BN}*)*)((~{BN}*)?{ID}) TMPLSPEC "<"{BN}*[^>]+{BN}*">" diff --git a/src/config.xml b/src/config.xml index f83ee55..1e97b47 100644 --- a/src/config.xml +++ b/src/config.xml @@ -250,7 +250,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='string' id='PROJECT_LOGO' format='image' defval=''> <docs> <![CDATA[ - With the \c PROJECT_LOGO tag one can specify an logo or icon that is + With the \c PROJECT_LOGO tag one can specify a logo or an icon that is included in the documentation. The maximum height of the logo should not exceed 55 pixels and the maximum width should not exceed 200 pixels. Doxygen will copy the logo to the output directory. @@ -270,7 +270,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='CREATE_SUBDIRS' defval='0'> <docs> <![CDATA[ - If the \c CREATE_SUBDIRS tag is set to \c YES, then doxygen will create + If the \c CREATE_SUBDIRS tag is set to \c YES then doxygen will create 4096 sub-directories (in 2 levels) under the output directory of each output format and will distribute the generated files over these directories. Enabling this option can be useful when feeding doxygen a huge amount of source @@ -344,7 +344,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='BRIEF_MEMBER_DESC' defval='1'> <docs> <![CDATA[ - If the \c BRIEF_MEMBER_DESC tag is set to \c YES doxygen will + If the \c BRIEF_MEMBER_DESC tag is set to \c YES, doxygen will include brief member descriptions after the members that are listed in the file and class documentation (similar to \c Javadoc). Set to \c NO to disable this. @@ -354,7 +354,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='REPEAT_BRIEF' defval='1'> <docs> <![CDATA[ - If the \c REPEAT_BRIEF tag is set to \c YES doxygen will + If the \c REPEAT_BRIEF tag is set to \c YES, doxygen will prepend the brief description of a member or function before the detailed description <br>Note: @@ -411,7 +411,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='FULL_PATH_NAMES' defval='1'> <docs> <![CDATA[ - If the \c FULL_PATH_NAMES tag is set to \c YES doxygen will prepend the full + If the \c FULL_PATH_NAMES tag is set to \c YES, doxygen will prepend the full path before files name in the file list and in the header files. If set to \c NO the shortest path that makes the file name unique will be used ]]> @@ -501,7 +501,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='SEPARATE_MEMBER_PAGES' defval='0'> <docs> <![CDATA[ - If the \c SEPARATE_MEMBER_PAGES tag is set to \c YES, then doxygen will produce + If the \c SEPARATE_MEMBER_PAGES tag is set to \c YES then doxygen will produce a new page for each member. If set to \c NO, the documentation of a member will be part of the file/class/namespace that contains it. ]]> @@ -597,7 +597,7 @@ Go to the <a href="commands.html">next</a> section or return to the <code>.inc</code> files as Fortran files (default is PHP), and <code>.f</code> files as C (default is Fortran), use: `inc=Fortran f=C`. - <br>Note For files without extension you can use `no_extension` as a placeholder. + <br>Note: For files without extension you can use `no_extension` as a placeholder. <br>Note that for custom extensions you also need to set \ref cfg_file_patterns "FILE_PATTERNS" otherwise the files are not read by doxygen. ]]> @@ -620,7 +620,7 @@ Go to the <a href="commands.html">next</a> section or return to the <![CDATA[ When enabled doxygen tries to link words that correspond to documented classes, or namespaces to their corresponding documentation. Such a link can be - prevented in individual cases by by putting a \c % sign in front of the word or + prevented in individual cases by putting a \c % sign in front of the word or globally by setting \c AUTOLINK_SUPPORT to \c NO. ]]> </docs> @@ -671,7 +671,7 @@ Go to the <a href="commands.html">next</a> section or return to the <docs> <![CDATA[ If member grouping is used in the documentation and the \c DISTRIBUTE_GROUP_DOC - tag is set to \c YES, then doxygen will reuse the documentation of the first + tag is set to \c YES then doxygen will reuse the documentation of the first member in the group (if any) for the other members of the group. By default all members of a group must be documented explicitly. ]]> @@ -747,7 +747,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='EXTRACT_ALL' defval='0'> <docs> <![CDATA[ - If the \c EXTRACT_ALL tag is set to \c YES doxygen will assume all + If the \c EXTRACT_ALL tag is set to \c YES, doxygen will assume all entities in documentation are documented, even if no documentation was available. Private class members and static file members will be hidden unless the \ref cfg_extract_private "EXTRACT_PRIVATE" respectively @@ -762,7 +762,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='EXTRACT_PRIVATE' defval='0'> <docs> <![CDATA[ - If the \c EXTRACT_PRIVATE tag is set to \c YES all private members of a + If the \c EXTRACT_PRIVATE tag is set to \c YES, all private members of a class will be included in the documentation. ]]> </docs> @@ -770,7 +770,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='EXTRACT_PACKAGE' defval='0'> <docs> <![CDATA[ - If the \c EXTRACT_PACKAGE tag is set to \c YES all members with package + If the \c EXTRACT_PACKAGE tag is set to \c YES, all members with package or internal scope will be included in the documentation. ]]> </docs> @@ -778,7 +778,7 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='EXTRACT_STATIC' defval='0'> <docs> <![CDATA[ - If the \c EXTRACT_STATIC tag is set to \c YES all static members of a file + If the \c EXTRACT_STATIC tag is set to \c YES, all static members of a file will be included in the documentation. ]]> </docs> @@ -786,9 +786,9 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='EXTRACT_LOCAL_CLASSES' defval='1'> <docs> <![CDATA[ - If the \c EXTRACT_LOCAL_CLASSES tag is set to \c YES classes (and structs) + If the \c EXTRACT_LOCAL_CLASSES tag is set to \c YES, classes (and structs) defined locally in source files will be included in the documentation. - If set to \c NO only classes defined in header files are included. Does not + If set to \c NO, only classes defined in header files are included. Does not have any effect for Java sources. ]]> </docs> @@ -796,10 +796,10 @@ Go to the <a href="commands.html">next</a> section or return to the <option type='bool' id='EXTRACT_LOCAL_METHODS' defval='0'> <docs> <![CDATA[ - This flag is only useful for Objective-C code. When set to \c YES local + This flag is only useful for Objective-C code. If set to \c YES, local methods, which are defined in the implementation section but not in the interface are included in the documentation. - If set to \c NO only methods in the interface are included. + If set to \c NO, only methods in the interface are included. ]]> </docs> </option> @@ -829,7 +829,7 @@ Go to the <a href="commands.html">next</a> section or return to the <![CDATA[ If the \c HIDE_UNDOC_CLASSES tag is set to \c YES, doxygen will hide all undocumented classes that are normally visible in the class hierarchy. - If set to \c NO these classes will be included in the + If set to \c NO, these classes will be included in the various overviews. This option has no effect if \ref cfg_extract_all "EXTRACT_ALL" is enabled. ]]> @@ -840,7 +840,7 @@ Go to the <a href="commands.html">next</a> section or return to the <![CDATA[ If the \c HIDE_FRIEND_COMPOUNDS tag is set to \c YES, doxygen will hide all friend (class|struct|union) declarations. - If set to \c NO these declarations will be included in the + If set to \c NO, these declarations will be included in the documentation. ]]> </docs> @@ -850,7 +850,7 @@ Go to the <a href="commands.html">next</a> section or return to the <![CDATA[ If the \c HIDE_IN_BODY_DOCS tag is set to \c YES, doxygen will hide any documentation blocks found inside the body of a function. - If set to \c NO these blocks will be appended to the + If set to \c NO, these blocks will be appended to the function's detailed documentation block. ]]> </docs> @@ -870,7 +870,7 @@ Go to the <a href="commands.html">next</a> section or return to the <![CDATA[ If the \c CASE_SENSE_NAMES tag is set to \c NO then doxygen will only generate file names in lower-case letters. If set to - \c YES upper-case letters are also allowed. This is useful if you have + \c YES, upper-case letters are also allowed. This is useful if you have classes or files whose names only differ in case and if your file system supports case sensitive file names. Windows and Mac users are advised to set this option to \c NO. @@ -882,7 +882,16 @@ Go to the <a href="commands.html">next</a> section or return to the <![CDATA[ If the \c HIDE_SCOPE_NAMES tag is set to \c NO then doxygen will show members with their full class and namespace scopes in the - documentation. If set to \c YES the scope will be hidden. + documentation. If set to \c YES, the scope will be hidden. +]]> + </docs> + </option> + <option type='bool' id='HIDE_COMPOUND_REFERENCE' defval='0'> + <docs> +<![CDATA[ + If the \c HIDE_COMPOUND_REFERENCE tag is set to \c NO (default) then + doxygen will append additional text to a page's title, such as Class Reference. + If set to \c YES the compound reference will be hidden. ]]> </docs> </option> @@ -926,7 +935,7 @@ Go to the <a href="commands.html">next</a> section or return to the <![CDATA[ If the \c SORT_MEMBER_DOCS tag is set to \c YES then doxygen will sort the (detailed) documentation of file and class members - alphabetically by member name. If set to \c NO the members will appear in + alphabetically by member name. If set to \c NO, the members will appear in declaration order. ]]> </docs> @@ -936,7 +945,7 @@ Go to the <a href="commands.html">next</a> section or return to the <![CDATA[ If the \c SORT_BRIEF_DOCS tag is set to \c YES then doxygen will sort the brief descriptions of file, namespace and class members alphabetically - by member name. If set to \c NO the members will appear in + by member name. If set to \c NO, the members will appear in declaration order. Note that this will also influence the order of the classes in the class list. ]]> @@ -1055,7 +1064,7 @@ Go to the <a href="commands.html">next</a> section or return to the <docs> <![CDATA[ Set the \c SHOW_USED_FILES tag to \c NO to disable the list of files generated - at the bottom of the documentation of classes and structs. If set to \c YES the + at the bottom of the documentation of classes and structs. If set to \c YES, the list will mention the files that were used to generate the documentation. ]]> </docs> @@ -1174,7 +1183,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" <option type='bool' id='WARN_IF_UNDOCUMENTED' defval='1'> <docs> <![CDATA[ - If the \c WARN_IF_UNDOCUMENTED tag is set to \c YES, then doxygen will generate warnings + If the \c WARN_IF_UNDOCUMENTED tag is set to \c YES then doxygen will generate warnings for undocumented members. If \ref cfg_extract_all "EXTRACT_ALL" is set to \c YES then this flag will automatically be disabled. ]]> @@ -1195,7 +1204,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" <![CDATA[ This \c WARN_NO_PARAMDOC option can be enabled to get warnings for functions that are documented, but have no documentation for their parameters - or return value. If set to \c NO doxygen will only warn about + or return value. If set to \c NO, doxygen will only warn about wrong or incomplete parameter documentation, but not about the absence of documentation. ]]> @@ -1430,7 +1439,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" <docs> <![CDATA[ If the \c FILTER_SOURCE_FILES tag is set to \c YES, the input filter (if set using - \ref cfg_input_filter "INPUT_FILTER" ) will also be used to filter the input + \ref cfg_input_filter "INPUT_FILTER") will also be used to filter the input files that are used for producing the source files to browse (i.e. when \ref cfg_source_browser "SOURCE_BROWSER" is set to \c YES). ]]> @@ -1508,7 +1517,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" <docs> <![CDATA[ If the \c REFERENCES_LINK_SOURCE tag is set to \c YES - and \ref cfg_source_browser "SOURCE_BROWSER" tag is set to \c YES, then the hyperlinks from + and \ref cfg_source_browser "SOURCE_BROWSER" tag is set to \c YES then the hyperlinks from functions in \ref cfg_references_relation "REFERENCES_RELATION" and \ref cfg_referenced_by_relation "REFERENCED_BY_RELATION" lists will link to the source code. Otherwise they will link to the documentation. @@ -1563,7 +1572,7 @@ to disable this feature. <option type='bool' id='CLANG_ASSISTED_PARSING' setting='USE_LIBCLANG' defval='0'> <docs> <![CDATA[ - If the \c CLANG_ASSISTED_PARSING tag is set to \c YES, then doxygen will use the + If the \c CLANG_ASSISTED_PARSING tag is set to \c YES then doxygen will use the <a href="http://clang.llvm.org/">clang parser</a> for more accurate parsing at the cost of reduced performance. This can be particularly helpful with template rich C++ code for which doxygen's built-in parser lacks the @@ -1618,7 +1627,7 @@ to disable this feature. <option type='bool' id='GENERATE_HTML' defval='1'> <docs> <![CDATA[ - If the \c GENERATE_HTML tag is set to \c YES doxygen will + If the \c GENERATE_HTML tag is set to \c YES, doxygen will generate HTML output ]]> </docs> @@ -1785,7 +1794,7 @@ doxygen -w html new_header.html new_footer.html new_stylesheet.css YourConfigFil user-defined cascading style sheets that are included after the standard style sheets created by doxygen. Using this option one can overrule certain style aspects. This is preferred over using \ref cfg_html_stylesheet "HTML_STYLESHEET" - since it does not replace the standard style sheet and is therefor more + since it does not replace the standard style sheet and is therefore more robust against future updates. Doxygen will copy the style sheet files to the output directory. \note The order of the extra stylesheet files is of importance (e.g. the last @@ -2001,7 +2010,7 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. <![CDATA[ The \c HHC_LOCATION tag can be used to specify the location (absolute path including file name) of - the HTML help compiler (\c hhc.exe). If non-empty doxygen will try to run + the HTML help compiler (\c hhc.exe). If non-empty, doxygen will try to run the HTML help compiler on the generated \c index.hhp. ]]> </docs> @@ -2199,7 +2208,7 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. <option type='bool' id='EXT_LINKS_IN_WINDOW' defval='0' depends='GENERATE_HTML'> <docs> <![CDATA[ - When the \c EXT_LINKS_IN_WINDOW option is set to \c YES doxygen will open + If the \c EXT_LINKS_IN_WINDOW option is set to \c YES, doxygen will open links to external symbols imported via tag files in a separate window. ]]> </docs> @@ -2231,7 +2240,7 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. <![CDATA[ Enable the \c USE_MATHJAX option to render \f$\mbox{\LaTeX}\f$ formulas using MathJax (see http://www.mathjax.org) which uses client side Javascript for the - rendering instead of using prerendered bitmaps. Use this if you do not + rendering instead of using pre-rendered bitmaps. Use this if you do not have \f$\mbox{\LaTeX}\f$ installed or if you want to formulas look prettier in the HTML output. When enabled you may also need to install MathJax separately and configure the path to it using the \ref cfg_mathjax_relpath "MATHJAX_RELPATH" @@ -2423,7 +2432,7 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... <option type='bool' id='GENERATE_LATEX' defval='1'> <docs> <![CDATA[ - If the \c GENERATE_LATEX tag is set to \c YES doxygen will + If the \c GENERATE_LATEX tag is set to \c YES, doxygen will generate \f$\mbox{\LaTeX}\f$ output. ]]> </docs> @@ -2459,7 +2468,7 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... <option type='bool' id='COMPACT_LATEX' defval='0' depends='GENERATE_LATEX'> <docs> <![CDATA[ - If the \c COMPACT_LATEX tag is set to \c YES doxygen generates more compact + If the \c COMPACT_LATEX tag is set to \c YES, doxygen generates more compact \f$\mbox{\LaTeX}\f$ documents. This may be useful for small projects and may help to save some trees in general. ]]> @@ -2508,8 +2517,8 @@ EXTRA_PACKAGES=times <code>\$doxygenversion</code>, <code>\$projectname</code>, <code>\$projectnumber</code>, <code>\$projectbrief</code>, <code>\$projectlogo</code>. - Doxygen will replace <code>\$title</code> with the empy string, for the replacement values of the - other commands the user is refered to \ref cfg_html_header "HTML_HEADER". + Doxygen will replace <code>\$title</code> with the empty string, for the replacement values of the + other commands the user is referred to \ref cfg_html_header "HTML_HEADER". ]]> </docs> </option> @@ -2555,7 +2564,7 @@ EXTRA_PACKAGES=times <![CDATA[ If the \c USE_PDFLATEX tag is set to \c YES, doxygen will use \c pdflatex to generate the PDF file directly from the \f$\mbox{\LaTeX}\f$ - files. Set this option to \c YES to get a higher quality PDF documentation. + files. Set this option to \c YES, to get a higher quality PDF documentation. ]]> </docs> </option> @@ -2604,7 +2613,7 @@ EXTRA_PACKAGES=times <option type='bool' id='GENERATE_RTF' defval='0'> <docs> <![CDATA[ - If the \c GENERATE_RTF tag is set to \c YES doxygen will generate RTF output. + If the \c GENERATE_RTF tag is set to \c YES, doxygen will generate RTF output. The RTF output is optimized for Word 97 and may not look too pretty with other RTF readers/editors. ]]> @@ -2622,7 +2631,7 @@ EXTRA_PACKAGES=times <option type='bool' id='COMPACT_RTF' defval='0' depends='GENERATE_RTF'> <docs> <![CDATA[ - If the \c COMPACT_RTF tag is set to \c YES doxygen generates more compact + If the \c COMPACT_RTF tag is set to \c YES, doxygen generates more compact RTF documents. This may be useful for small projects and may help to save some trees in general. ]]> @@ -2669,7 +2678,7 @@ EXTRA_PACKAGES=times <option type='bool' id='GENERATE_MAN' defval='0'> <docs> <![CDATA[ - If the \c GENERATE_MAN tag is set to \c YES doxygen will + If the \c GENERATE_MAN tag is set to \c YES, doxygen will generate man pages for classes and files. ]]> </docs> @@ -2719,7 +2728,7 @@ EXTRA_PACKAGES=times <option type='bool' id='GENERATE_XML' defval='0'> <docs> <![CDATA[ - If the \c GENERATE_XML tag is set to \c YES doxygen will + If the \c GENERATE_XML tag is set to \c YES, doxygen will generate an XML file that captures the structure of the code including all documentation. ]]> @@ -2737,7 +2746,7 @@ EXTRA_PACKAGES=times <option type='bool' id='XML_PROGRAMLISTING' defval='1' depends='GENERATE_XML'> <docs> <![CDATA[ - If the \c XML_PROGRAMLISTING tag is set to \c YES doxygen will + If the \c XML_PROGRAMLISTING tag is set to \c YES, doxygen will dump the program listings (including syntax highlighting and cross-referencing information) to the XML output. Note that enabling this will significantly increase the size of the XML output. @@ -2749,7 +2758,7 @@ EXTRA_PACKAGES=times <option type='bool' id='GENERATE_DOCBOOK' defval='0'> <docs> <![CDATA[ -If the \c GENERATE_DOCBOOK tag is set to \c YES doxygen will generate Docbook files +If the \c GENERATE_DOCBOOK tag is set to \c YES, doxygen will generate Docbook files that can be used to generate PDF. ]]> </docs> @@ -2766,7 +2775,7 @@ front of it. <option type='bool' id='DOCBOOK_PROGRAMLISTING' defval='0' depends='GENERATE_DOCBOOK'> <docs> <![CDATA[ - If the \c DOCBOOK_PROGRAMLISTING tag is set to \c YES doxygen will + If the \c DOCBOOK_PROGRAMLISTING tag is set to \c YES, doxygen will include the program listings (including syntax highlighting and cross-referencing information) to the DOCBOOK output. Note that enabling this will significantly increase the size of the DOCBOOK output. @@ -2778,7 +2787,7 @@ front of it. <option type='bool' id='GENERATE_AUTOGEN_DEF' defval='0'> <docs> <![CDATA[ - If the \c GENERATE_AUTOGEN_DEF tag is set to \c YES doxygen will + If the \c GENERATE_AUTOGEN_DEF tag is set to \c YES, doxygen will generate an AutoGen Definitions (see http://autogen.sf.net) file that captures the structure of the code including all documentation. Note that this feature is still experimental @@ -2813,7 +2822,7 @@ put in front of it. <option type='bool' id='GENERATE_PERLMOD' defval='0'> <docs> <![CDATA[ - If the \c GENERATE_PERLMOD tag is set to \c YES doxygen will + If the \c GENERATE_PERLMOD tag is set to \c YES, doxygen will generate a Perl module file that captures the structure of the code including all documentation. <br>Note that this @@ -2825,7 +2834,7 @@ put in front of it. <option type='bool' id='PERLMOD_LATEX' defval='0' depends='GENERATE_PERLMOD'> <docs> <![CDATA[ - If the \c PERLMOD_LATEX tag is set to \c YES doxygen will generate + If the \c PERLMOD_LATEX tag is set to \c YES, doxygen will generate the necessary \c Makefile rules, \c Perl scripts and \f$\mbox{\LaTeX}\f$ code to be able to generate PDF and DVI output from the Perl module output. ]]> @@ -2834,10 +2843,10 @@ put in front of it. <option type='bool' id='PERLMOD_PRETTY' defval='1' depends='GENERATE_PERLMOD'> <docs> <![CDATA[ - If the \c PERLMOD_PRETTY tag is set to \c YES the Perl module output will be + If the \c PERLMOD_PRETTY tag is set to \c YES, the Perl module output will be nicely formatted so it can be parsed by a human reader. This is useful if you want to understand what is going on. On the other hand, if this - tag is set to \c NO the size of the Perl module output will be much smaller + tag is set to \c NO, the size of the Perl module output will be much smaller and Perl will parse it just the same. ]]> </docs> @@ -2857,7 +2866,7 @@ put in front of it. <option type='bool' id='ENABLE_PREPROCESSING' defval='1'> <docs> <![CDATA[ - If the \c ENABLE_PREPROCESSING tag is set to \c YES doxygen will + If the \c ENABLE_PREPROCESSING tag is set to \c YES, doxygen will evaluate all C-preprocessor directives found in the sources and include files. ]]> @@ -2866,8 +2875,8 @@ put in front of it. <option type='bool' id='MACRO_EXPANSION' defval='0' depends='ENABLE_PREPROCESSING'> <docs> <![CDATA[ - If the \c MACRO_EXPANSION tag is set to \c YES doxygen will expand all macro - names in the source code. If set to \c NO only conditional + If the \c MACRO_EXPANSION tag is set to \c YES, doxygen will expand all macro + names in the source code. If set to \c NO, only conditional compilation will be performed. Macro expansion can be done in a controlled way by setting \ref cfg_expand_only_predef "EXPAND_ONLY_PREDEF" to \c YES. ]]> @@ -2885,7 +2894,7 @@ put in front of it. <option type='bool' id='SEARCH_INCLUDES' defval='1' depends='ENABLE_PREPROCESSING'> <docs> <![CDATA[ - If the \c SEARCH_INCLUDES tag is set to \c YES the includes files + If the \c SEARCH_INCLUDES tag is set to \c YES, the include files in the \ref cfg_include_path "INCLUDE_PATH" will be searched if a \c \#include is found. ]]> </docs> @@ -2986,8 +2995,8 @@ where `loc1` and `loc2` can be relative or absolute paths or URLs. <option type='bool' id='ALLEXTERNALS' defval='0'> <docs> <![CDATA[ - If the \c ALLEXTERNALS tag is set to \c YES all external class will be listed - in the class index. If set to \c NO only the inherited external classes + If the \c ALLEXTERNALS tag is set to \c YES, all external class will be listed + in the class index. If set to \c NO, only the inherited external classes will be listed. ]]> </docs> @@ -2995,7 +3004,7 @@ where `loc1` and `loc2` can be relative or absolute paths or URLs. <option type='bool' id='EXTERNAL_GROUPS' defval='1'> <docs> <![CDATA[ - If the \c EXTERNAL_GROUPS tag is set to \c YES all external groups will be listed + If the \c EXTERNAL_GROUPS tag is set to \c YES, all external groups will be listed in the modules index. If set to \c NO, only the current project's groups will be listed. ]]> @@ -3004,7 +3013,7 @@ where `loc1` and `loc2` can be relative or absolute paths or URLs. <option type='bool' id='EXTERNAL_PAGES' defval='1'> <docs> <![CDATA[ - If the \c EXTERNAL_PAGES tag is set to \c YES all external pages will be listed + If the \c EXTERNAL_PAGES tag is set to \c YES, all external pages will be listed in the related pages index. If set to \c NO, only the current project's pages will be listed. ]]> @@ -3023,7 +3032,7 @@ where `loc1` and `loc2` can be relative or absolute paths or URLs. <option type='bool' id='CLASS_DIAGRAMS' defval='1'> <docs> <![CDATA[ - If the \c CLASS_DIAGRAMS tag is set to \c YES doxygen will + If the \c CLASS_DIAGRAMS tag is set to \c YES, doxygen will generate a class diagram (in HTML and \f$\mbox{\LaTeX}\f$) for classes with base or super classes. Setting the tag to \c NO turns the diagrams off. Note that this option also works with \ref cfg_have_dot "HAVE_DOT" disabled, but it is recommended to @@ -3055,7 +3064,7 @@ to be found in the default search path. <option type='bool' id='HIDE_UNDOC_RELATIONS' defval='1'> <docs> <![CDATA[ - If set to \c YES, the inheritance and collaboration graphs will hide + If set to \c YES the inheritance and collaboration graphs will hide inheritance and usage relations if the target is undocumented or is not a class. ]]> @@ -3143,7 +3152,7 @@ to be found in the default search path. <option type='bool' id='UML_LOOK' defval='0' depends='HAVE_DOT'> <docs> <![CDATA[ - If the \c UML_LOOK tag is set to \c YES doxygen will generate inheritance and + If the \c UML_LOOK tag is set to \c YES, doxygen will generate inheritance and collaboration diagrams in a style similar to the OMG's Unified Modeling Language. ]]> @@ -3291,7 +3300,7 @@ to be found in the default search path. <![CDATA[ The \c DIAFILE_DIRS tag can be used to specify one or more directories that contain dia files that are included in the documentation (see the - \ref cmdmscfile "\\diafile" command). + \ref cmddiafile "\\diafile" command). ]]> </docs> </option> @@ -3305,6 +3314,14 @@ to be found in the default search path. ]]> </docs> </option> + <option type='list' id='PLANTUML_INCLUDE_PATH' format='dir' defval='' depends='HAVE_DOT'> + <docs> +<![CDATA[ + When using plantuml, the specified paths are searched for files specified by the \c !include + statement in a plantuml block. +]]> + </docs> + </option> <option type='int' id='DOT_GRAPH_MAX_NODES' minval='0' maxval='10000' defval='50' depends='HAVE_DOT'> <docs> <![CDATA[ @@ -3347,7 +3364,7 @@ to be found in the default search path. <option type='bool' id='DOT_MULTI_TARGETS' defval='0' depends='HAVE_DOT'> <docs> <![CDATA[ - Set the \c DOT_MULTI_TARGETS tag to \c YES allow dot to generate multiple output + Set the \c DOT_MULTI_TARGETS tag to \c YES to allow dot to generate multiple output files in one run (i.e. multiple -o and -T options on the command line). This makes \c dot run faster, but since only newer versions of \c dot (>1.8.10) support this, this feature is disabled by default. @@ -3366,7 +3383,7 @@ to be found in the default search path. <option type='bool' id='DOT_CLEANUP' defval='1' depends='HAVE_DOT'> <docs> <![CDATA[ -If the \c DOT_CLEANUP tag is set to \c YES doxygen will +If the \c DOT_CLEANUP tag is set to \c YES, doxygen will remove the intermediate dot files that are used to generate the various graphs. ]]> </docs> diff --git a/src/configgen.py b/src/configgen.py index 04ffc8c..7115dba 100755 --- a/src/configgen.py +++ b/src/configgen.py @@ -26,6 +26,7 @@ def transformDocs(doc): doc = doc.replace("\r", " ") doc = doc.replace("\t", " ") doc = doc.replace("\\&", "&") + doc = doc.replace("(\\c ", "(") doc = doc.replace("\\c ", " ") doc = doc.replace("\\b ", " ") doc = doc.replace("\\e ", " ") diff --git a/src/dbusxmlscanner.cpp b/src/dbusxmlscanner.cpp index e841428..aa3cc47 100644 --- a/src/dbusxmlscanner.cpp +++ b/src/dbusxmlscanner.cpp @@ -432,7 +432,7 @@ public: m_currentEnum = 0; } - if (EXTENSION("value")) + if (EXTENSION("value") && m_currentEnum) { CONDITION(!m_currentEntry, "end of value without start"); m_currentEntry->endBodyLine = lineNumber(); diff --git a/src/define.cpp b/src/define.cpp index 75459c9..2f4e43a 100644 --- a/src/define.cpp +++ b/src/define.cpp @@ -35,7 +35,7 @@ Define::Define(const Define &d) { //name=d.name; definition=d.definition; fileName=d.fileName; lineNr=d.lineNr; - lineNr=d.columnNr; + columnNr=d.columnNr; nargs=d.nargs; undef=d.undef; varArgs=d.varArgs; diff --git a/src/definition.cpp b/src/definition.cpp index 4a6a728..d2e3e01 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -371,7 +371,7 @@ Definition::Definition(const Definition &d) : DefinitionIntf() } if (d.m_impl->inbodyDocs) { - m_impl->details = new DocInfo(*d.m_impl->inbodyDocs); + m_impl->inbodyDocs = new DocInfo(*d.m_impl->inbodyDocs); } m_isSymbol = d.m_isSymbol; @@ -511,9 +511,9 @@ void Definition::addSectionsToIndex() } } -void Definition::writeDocAnchorsToTagFile() +void Definition::writeDocAnchorsToTagFile(FTextStream &tagFile) { - if (!Config_getString("GENERATE_TAGFILE").isEmpty() && m_impl->sectionDict) + if (m_impl->sectionDict) { //printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionDict->count()); SDict<SectionInfo>::Iterator sdi(*m_impl->sectionDict); @@ -523,15 +523,13 @@ void Definition::writeDocAnchorsToTagFile() if (!si->generated) { //printf("write an entry!\n"); - if (definitionType()==TypeMember) Doxygen::tagFile << " "; - Doxygen::tagFile << " <docanchor file=\"" - << si->fileName << "\""; + if (definitionType()==TypeMember) tagFile << " "; + tagFile << " <docanchor file=\"" << si->fileName << "\""; if (!si->title.isEmpty()) { - Doxygen::tagFile << " title=\"" << convertToXML(si->title) << "\""; + tagFile << " title=\"" << convertToXML(si->title) << "\""; } - Doxygen::tagFile << ">" << si->label - << "</docanchor>" << endl; + tagFile << ">" << si->label << "</docanchor>" << endl; } } } diff --git a/src/definition.h b/src/definition.h index 05ea621..b1f118d 100644 --- a/src/definition.h +++ b/src/definition.h @@ -34,6 +34,7 @@ struct ListItemInfo; struct SectionInfo; class Definition; class DefinitionImpl; +class FTextStream; /** Data associated with a detailed description. */ struct DocInfo @@ -334,7 +335,7 @@ class Definition : public DefinitionIntf /*! Writes the documentation anchors of the definition to * the Doxygen::tagFile stream. */ - void writeDocAnchorsToTagFile(); + void writeDocAnchorsToTagFile(FTextStream &); void setLocalName(const QCString name); void addSectionsToIndex(); diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 284d1ee..d2d9684 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -235,10 +235,6 @@ void DirDef::writeSubDirList(OutputList &ol) ol.insertMemberAlign(); ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName()); ol.endMemberItem(); - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl; - } if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(dd->getOutputFileBase()); @@ -297,10 +293,6 @@ void DirDef::writeFileList(OutputList &ol) ol.endTextLink(); ol.popGeneratorState(); } - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl; - } ol.endMemberItem(); if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { @@ -341,6 +333,53 @@ bool DirDef::hasDetailedDescription() const return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty(); } +void DirDef::writeTagFile(FTextStream &tagFile) +{ + tagFile << " <compound kind=\"dir\">" << endl; + tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl; + tagFile << " <path>" << convertToXML(name()) << "</path>" << endl; + tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; + QListIterator<LayoutDocEntry> eli( + LayoutDocManager::instance().docEntries(LayoutDocManager::Directory)); + LayoutDocEntry *lde; + for (eli.toFirst();(lde=eli.current());++eli) + { + switch (lde->kind()) + { + case LayoutDocEntry::DirSubDirs: + { + if (m_subdirs.count()>0) + { + DirDef *dd; + QListIterator<DirDef> it(m_subdirs); + for (;(dd=it.current());++it) + { + tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl; + } + } + } + break; + case LayoutDocEntry::DirFiles: + { + if (m_fileList->count()>0) + { + QListIterator<FileDef> it(*m_fileList); + FileDef *fd; + for (;(fd=it.current());++it) + { + tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl; + } + } + } + break; + default: + break; + } + } + writeDocAnchorsToTagFile(tagFile); + tagFile << " </compound>" << endl; +} + void DirDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); @@ -367,14 +406,6 @@ void DirDef::writeDocumentation(OutputList &ol) endTitle(ol,getOutputFileBase(),title); ol.startContents(); - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <compound kind=\"dir\">" << endl; - Doxygen::tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl; - Doxygen::tagFile << " <path>" << convertToXML(name()) << "</path>" << endl; - Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; - } - //---------------------------------------- start flexible part ------------------------------- SrcLangExt lang = getLanguage(); @@ -450,12 +481,6 @@ void DirDef::writeDocumentation(OutputList &ol) //---------------------------------------- end flexible part ------------------------------- - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </compound>" << endl; - } - ol.endContents(); endFileWithNavPath(this,ol); diff --git a/src/dirdef.h b/src/dirdef.h index 8f4fbc2..1a9f40c 100644 --- a/src/dirdef.h +++ b/src/dirdef.h @@ -72,6 +72,7 @@ class DirDef : public Definition // generate output void writeDocumentation(OutputList &ol); void writeDepGraph(FTextStream &t); + void writeTagFile(FTextStream &t); static DirDef *mergeDirectoryInTree(const QCString &path); bool visited; diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index 9f2dbe3..a227dd8 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -1329,7 +1329,7 @@ void DocbookDocVisitor::startDiaFile(const QCString &fileName, { baseName=baseName.left(i); } - baseName.prepend("msc_"); + baseName.prepend("dia_"); QCString outDir = Config_getString("DOCBOOK_OUTPUT"); writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP); m_t << "<para>" << endl; diff --git a/src/docparser.cpp b/src/docparser.cpp index 8be11c6..b21c15c 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -76,7 +76,8 @@ static const char *sectionLevelToName[] = "section", "subsection", "subsubsection", - "paragraph" + "paragraph", + "subparagraph" }; //--------------------------------------------------------------------------- @@ -4670,12 +4671,15 @@ int DocParamList::parse(const QCString &cmdName) DBG(("DocParamList::parse() start\n")); g_nodeStack.push(this); DocPara *par=0; + QCString saveCmdName = cmdName; int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", qPrint(cmdName)); + retval=0; + goto endparamlist; } doctokenizerYYsetStateParam(); tok=doctokenizerYYlex(); @@ -4715,7 +4719,13 @@ int DocParamList::parse(const QCString &cmdName) retval=0; goto endparamlist; } - ASSERT(tok==TK_WHITESPACE); + if (tok!=TK_WHITESPACE) /* premature end of comment block */ + { + warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token in comment block while parsing the " + "argument of command %s",qPrint(saveCmdName)); + retval=0; + goto endparamlist; + } par = new DocPara(this); m_paragraphs.append(par); @@ -5217,6 +5227,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) QCString blockId; if (t==DocInclude::Snippet) { + if (fileName == "this") fileName=g_fileName; doctokenizerYYsetStateSnippet(); tok=doctokenizerYYlex(); doctokenizerYYsetStatePara(); diff --git a/src/doctokenizer.l b/src/doctokenizer.l index ea4a1a4..e0e72a7 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -335,7 +335,7 @@ LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]* PHPTYPE [\\:a-z_A-Z0-9\x80-\xFF\-]+ CITESCHAR [a-z_A-Z\x80-\xFF] CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/]* -CITEID {CITESCHAR}*{CITEECHAR}+("."{CITESCHAR}*{CITEECHAR}+)* +CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)* MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+ OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}* LISTITEM {BLANK}*[-]("#")?{WS} diff --git a/src/dot.cpp b/src/dot.cpp index c64729a..4638309 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1093,7 +1093,11 @@ bool DotFilePatcher::run() Map *map = m_maps.at(mapId); //printf("patching FIG %d in file %s with contents of %s\n", // mapId,m_patchFile.data(),map->mapFile.data()); - writeVecGfxFigure(t,map->label,map->mapFile); + if (!writeVecGfxFigure(t,map->label,map->mapFile)) + { + err("problem writing FIG %d figure!\n",mapId); + return FALSE; + } } else // error invalid map id! { @@ -4667,9 +4671,10 @@ void DotGroupCollaboration::Edge::write( FTextStream &t ) const } switch( eType ) { - case thierarchy : + case thierarchy: arrowStyle = "dir=\"back\", style=\"solid\""; - default : + break; + default: t << ", color=\"" << linkTypeColor[(int)eType] << "\""; break; } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 533e6ef..8600a30 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -142,7 +142,6 @@ QDict<void> Doxygen::expandAsDefinedDict(257); // all macros that should be QIntDict<MemberGroupInfo> Doxygen::memGrpInfoDict(1009); // dictionary of the member groups heading PageDef *Doxygen::mainPage = 0; bool Doxygen::insideMainPage = FALSE; // are we generating docs for the main page? -FTextStream Doxygen::tagFile; NamespaceDef *Doxygen::globalScope = 0; QDict<RefList> *Doxygen::xrefLists = new QDict<RefList>; // dictionary of cross-referenced item lists bool Doxygen::parseSourcesNeeded = FALSE; @@ -1037,9 +1036,16 @@ static Definition *buildScopeFromQualifiedName(const QCString name, else // scope is a namespace { } - // make the parent/child scope relation - prevScope->addInnerCompound(innerScope); - innerScope->setOuterScope(prevScope); + if (innerScope) + { + // make the parent/child scope relation + prevScope->addInnerCompound(innerScope); + innerScope->setOuterScope(prevScope); + } + else // current scope is a class, so return only the namespace part... + { + return prevScope; + } // proceed to the next scope fragment p=idx+l+2; prevScope=innerScope; @@ -1303,18 +1309,31 @@ static void addClassToContext(EntryNav *rootNav) QCString tagName; QCString refFileName; TagInfo *tagInfo = rootNav->tagInfo(); + int i; if (tagInfo) { tagName = tagInfo->tagName; refFileName = tagInfo->fileName; - int i; - if ((i=fullName.find("::"))!=-1) + if (fullName.find("::")!=-1) // symbols imported via tag files may come without the parent scope, // so we artificially create it here { buildScopeFromQualifiedName(fullName,fullName.contains("::"),root->lang,tagInfo); } } + ArgumentList *tArgList = 0; + if ((root->lang==SrcLangExt_CSharp || root->lang==SrcLangExt_Java) && (i=fullName.find('<'))!=-1) + { + // a Java/C# generic class looks like a C++ specialization, so we need to split the + // name and template arguments here + tArgList = new ArgumentList; + stringToArgumentList(fullName.mid(i),tArgList); + fullName=fullName.left(i); + } + else + { + tArgList = getTemplateArgumentsFromName(fullName,root->tArgLists); + } cd=new ClassDef(root->fileName,root->startLine,root->startColumn, fullName,sec,tagName,refFileName,TRUE,root->spec&Entry::Enum); Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d tagInfo=%p\n", @@ -1329,8 +1348,6 @@ static void addClassToContext(EntryNav *rootNav) cd->setTypeConstraints(root->typeConstr); //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data()); - ArgumentList *tArgList = - getTemplateArgumentsFromName(fullName,root->tArgLists); //printf("class %s template args=%s\n",fullName.data(), // tArgList ? tempArgListToString(tArgList).data() : "<none>"); cd->setTemplateArguments(tArgList); @@ -1652,26 +1669,6 @@ static void processTagLessClasses(ClassDef *rootCd, } } -static void writeMainPageTagFileData() -{ - if (Doxygen::mainPage && !Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <compound kind=\"page\">" << endl - << " <name>" - << convertToXML(Doxygen::mainPage->name()) - << "</name>" << endl - << " <title>" - << convertToXML(Doxygen::mainPage->title()) - << "</title>" << endl - << " <filename>" - << convertToXML(Doxygen::mainPage->getOutputFileBase()) - << "</filename>" << endl; - - Doxygen::mainPage->writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </compound>" << endl; - } -} - static void findTagLessClasses(ClassDef *cd) { if (cd->getClassSDict()) @@ -2070,18 +2067,15 @@ static void findUsingDeclarations(EntryNav *rootNav) usingCd->name().data(),nd?nd->name().data():fd->name().data()); } - if (usingCd) // add the class to the correct scope + if (nd) { - if (nd) - { - //printf("Inside namespace %s\n",nd->name().data()); - nd->addUsingDeclaration(usingCd); - } - else if (fd) - { - //printf("Inside file %s\n",fd->name().data()); - fd->addUsingDeclaration(usingCd); - } + //printf("Inside namespace %s\n",nd->name().data()); + nd->addUsingDeclaration(usingCd); + } + else if (fd) + { + //printf("Inside file %s\n",fd->name().data()); + fd->addUsingDeclaration(usingCd); } } @@ -2833,14 +2827,14 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) else if (root->type.find(')',i)!=-1) // function ptr, not variable like "int (*bla)[10]" { root->type=root->type.left(root->type.length()-1); - root->args.prepend(")"); + root->args.prepend(") "); //printf("root->type=%s root->args=%s\n",root->type.data(),root->args.data()); } } else if (root->type.find("typedef ")!=-1 && root->type.right(2)=="()") // typedef void (func)(int) { root->type=root->type.left(root->type.length()-1); - root->args.prepend(")"); + root->args.prepend(") "); } } @@ -4100,8 +4094,12 @@ static QDict<int> *getTemplateArgumentsInName(ArgumentList *templateArguments,co */ static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,const QCString &name) { - FileDef *fd=cd->getFileDef(); ClassDef *result=0; + if (cd==0) + { + return result; + } + FileDef *fd=cd->getFileDef(); if (context && cd!=context) { result = getResolvedClass(context,0,name,0,0,TRUE,TRUE); @@ -4114,7 +4112,7 @@ static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,co { result = getClass(name); } - if (result==0 && cd && + if (result==0 && (cd->getLanguage()==SrcLangExt_CSharp || cd->getLanguage()==SrcLangExt_Java) && name.find('<')!=-1) { @@ -4236,13 +4234,10 @@ static void findUsedClassesForClass(EntryNav *rootNav, usedCd->setLanguage(masterCd->getLanguage()); Doxygen::hiddenClasses->append(usedName,usedCd); } - if (usedCd) - { - if (isArtificial) usedCd->setArtificial(TRUE); - Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", usedCd->name().data()); - instanceCd->addUsedClass(usedCd,md->name(),md->protection()); - usedCd->addUsedByClass(instanceCd,md->name(),md->protection()); - } + if (isArtificial) usedCd->setArtificial(TRUE); + Debug::print(Debug::Classes,0," Adding used class `%s' (1)\n", usedCd->name().data()); + instanceCd->addUsedClass(usedCd,md->name(),md->protection()); + usedCd->addUsedByClass(instanceCd,md->name(),md->protection()); } } } @@ -4389,7 +4384,7 @@ static bool findTemplateInstanceRelation(Entry *root, //printf("\n"); bool existingClass = (templSpec == - tempArgListToString(templateClass->templateArguments()) + tempArgListToString(templateClass->templateArguments(),root->lang) ); if (existingClass) return TRUE; @@ -4643,7 +4638,8 @@ static bool findClassRelation( if (si==-1) si=0; if (baseClass==0 && (root->lang==SrcLangExt_CSharp || root->lang==SrcLangExt_Java)) { - baseClass = Doxygen::genericsDict->find(baseClassName); + // for Java/C# strip the template part before looking for matching + baseClass = Doxygen::genericsDict->find(baseClassName.left(i)); //printf("looking for '%s' result=%p\n",baseClassName.data(),baseClass); } if (baseClass==0 && i!=-1) @@ -4705,7 +4701,7 @@ static bool findClassRelation( if (found) templSpec = tmpTemplSpec; } //printf("2. found=%d\n",found); - + //printf("root->name=%s biName=%s baseClassName=%s\n", // root->name.data(),biName.data(),baseClassName.data()); //if (cd->isCSharp() && i!=-1) // C# generic -> add internal -g postfix @@ -4933,6 +4929,22 @@ static void findClassEntries(EntryNav *rootNav) RECURSE_ENTRYTREE(findClassEntries,rootNav); } +static QCString extractClassName(EntryNav *rootNav) +{ + // strip any anonymous scopes first + QCString bName=stripAnonymousNamespaceScope(rootNav->name()); + bName=stripTemplateSpecifiersFromScope(bName); + int i; + if ((rootNav->lang()==SrcLangExt_CSharp || rootNav->lang()==SrcLangExt_Java) && + (i=bName.find('<'))!=-1) + { + // a Java/C# generic class looks like a C++ specialization, so we need to strip the + // template part before looking for matches + bName=bName.left(i); + } + return bName; +} + /*! Using the dictionary build by findClassEntries(), this * function will look for additional template specialization that * exists as inheritance relations only. These instances will be @@ -4947,9 +4959,7 @@ static void findInheritedTemplateInstances() for (;(rootNav=edi.current());++edi) { ClassDef *cd; - // strip any anonymous scopes first - QCString bName=stripAnonymousNamespaceScope(rootNav->name()); - bName=stripTemplateSpecifiersFromScope(bName); + QCString bName = extractClassName(rootNav); Debug::print(Debug::Classes,0," Inheritance: Class %s : \n",bName.data()); if ((cd=getClass(bName))) { @@ -4970,9 +4980,7 @@ static void findUsedTemplateInstances() for (;(rootNav=edi.current());++edi) { ClassDef *cd; - // strip any anonymous scopes first - QCString bName=stripAnonymousNamespaceScope(rootNav->name()); - bName=stripTemplateSpecifiersFromScope(bName); + QCString bName = extractClassName(rootNav); Debug::print(Debug::Classes,0," Usage: Class %s : \n",bName.data()); if ((cd=getClass(bName))) { @@ -4995,10 +5003,7 @@ static void computeClassRelations() rootNav->loadEntry(g_storage); Entry *root = rootNav->entry(); - - // strip any anonymous scopes first - QCString bName=stripAnonymousNamespaceScope(rootNav->name()); - bName=stripTemplateSpecifiersFromScope(bName); + QCString bName = extractClassName(rootNav); Debug::print(Debug::Classes,0," Relations: Class %s : \n",bName.data()); if ((cd=getClass(bName))) { @@ -6306,7 +6311,7 @@ static void findMember(EntryNav *rootNav, for (;(al=alli.current());++alli) { warnMsg+=" template "; - warnMsg+=tempArgListToString(al); + warnMsg+=tempArgListToString(al,root->lang); warnMsg+='\n'; } } @@ -6329,7 +6334,7 @@ static void findMember(EntryNav *rootNav, if (templAl!=0) { warnMsg+=" 'template "; - warnMsg+=tempArgListToString(templAl); + warnMsg+=tempArgListToString(templAl,root->lang); warnMsg+='\n'; } warnMsg+=" "; @@ -6578,7 +6583,7 @@ static void findMember(EntryNav *rootNav, funcType,funcName,funcArgs,exceptions, root->protection,root->virt, root->stat && !isMemberOf, - isMemberOf ? Foreign : isRelated ? Related : Member, + isMemberOf ? Foreign : Related, mtype, (root->tArgLists ? root->tArgLists->getLast() : 0), funcArgs.isEmpty() ? 0 : root->argList); @@ -8055,13 +8060,14 @@ static void generateClassList(ClassSDict &classSDict) ClassDef *cd=cli.current(); //printf("cd=%s getOuterScope=%p global=%p\n",cd->name().data(),cd->getOuterScope(),Doxygen::globalScope); - if ((cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file + if (cd && + (cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file cd->getOuterScope()==Doxygen::globalScope // only look at global classes ) && !cd->isHidden() && !cd->isEmbeddedInOuterScope() - ) + ) { - // skip external references, anonymous compounds and - // template instances + // skip external references, anonymous compounds and + // template instances if ( cd->isLinkableInProject() && cd->templateMaster()==0) { msg("Generating docs for compound %s...\n",cd->name().data()); @@ -8996,9 +9002,9 @@ static void generateNamespaceDocs() // for each class in the namespace... ClassSDict::Iterator cli(*nd->getClassSDict()); - for ( ; cli.current() ; ++cli ) + ClassDef *cd; + for ( ; (cd=cli.current()) ; ++cli ) { - ClassDef *cd=cli.current(); if ( ( cd->isLinkableInProject() && cd->templateMaster()==0 ) // skip external references, anonymous compounds and @@ -10527,6 +10533,87 @@ static void stopDoxygen(int) } #endif +static void writeTagFile() +{ + QCString &generateTagFile = Config_getString("GENERATE_TAGFILE"); + if (generateTagFile.isEmpty()) return; + + QFile tag(generateTagFile); + if (!tag.open(IO_WriteOnly)) + { + err("cannot open tag file %s for writing\n", + generateTagFile.data() + ); + return; + } + FTextStream tagFile(&tag); + tagFile << "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>" << endl; + tagFile << "<tagfile>" << endl; + + // for each file + FileNameListIterator fnli(*Doxygen::inputNameList); + FileName *fn; + for (fnli.toFirst();(fn=fnli.current());++fnli) + { + FileNameIterator fni(*fn); + FileDef *fd; + for (fni.toFirst();(fd=fni.current());++fni) + { + fd->writeTagFile(tagFile); + } + } + // for each class + ClassSDict::Iterator cli(*Doxygen::classSDict); + ClassDef *cd; + for ( ; (cd=cli.current()) ; ++cli ) + { + cd->writeTagFile(tagFile); + } + // for each namespace + NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict); + NamespaceDef *nd; + for ( ; (nd=nli.current()) ; ++nli ) + { + nd->writeTagFile(tagFile); + } + // for each group + GroupSDict::Iterator gli(*Doxygen::groupSDict); + GroupDef *gd; + for (gli.toFirst();(gd=gli.current());++gli) + { + gd->writeTagFile(tagFile); + } + // for each page + PageSDict::Iterator pdi(*Doxygen::pageSDict); + PageDef *pd=0; + for (pdi.toFirst();(pd=pdi.current());++pdi) + { + pd->writeTagFile(tagFile); + } + if (Doxygen::mainPage) Doxygen::mainPage->writeTagFile(tagFile); + + /* + if (Doxygen::mainPage && !Config_getString("GENERATE_TAGFILE").isEmpty()) + { + tagFile << " <compound kind=\"page\">" << endl + << " <name>" + << convertToXML(Doxygen::mainPage->name()) + << "</name>" << endl + << " <title>" + << convertToXML(Doxygen::mainPage->title()) + << "</title>" << endl + << " <filename>" + << convertToXML(Doxygen::mainPage->getOutputFileBase()) + << "</filename>" << endl; + + mainPage->writeDocAnchorsToTagFile(); + tagFile << " </compound>" << endl; + } + */ + + tagFile << "</tagfile>" << endl; +} + static void exitDoxygen() { if (!g_successfulRun) // premature exit @@ -10690,7 +10777,6 @@ void searchInputFiles() g_s.begin("Searching for files to process...\n"); QDict<void> *killDict = new QDict<void>(10007); - int inputSize=0; QStrList &inputList=Config_getList("INPUT"); g_inputFiles.setAutoDelete(TRUE); s=inputList.first(); @@ -10702,8 +10788,8 @@ void searchInputFiles() { // strip trailing slashes if (path.at(l-1)=='\\' || path.at(l-1)=='/') path=path.left(l-1); - - inputSize+=readFileOrDirectory( + + readFileOrDirectory( path, Doxygen::inputNameList, Doxygen::inputNameDict, @@ -11301,24 +11387,6 @@ void generateOutput() * Generate documentation * **************************************************************************/ - QFile *tag=0; - QCString &generateTagFile = Config_getString("GENERATE_TAGFILE"); - if (!generateTagFile.isEmpty()) - { - tag=new QFile(generateTagFile); - if (!tag->open(IO_WriteOnly)) - { - err("cannot open tag file %s for writing\n", - generateTagFile.data() - ); - cleanUpDoxygen(); - exit(1); - } - Doxygen::tagFile.setDevice(tag); - Doxygen::tagFile << "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>" << endl; - Doxygen::tagFile << "<tagfile>" << endl; - } - if (generateHtml) writeDoxFont(Config_getString("HTML_OUTPUT")); if (generateLatex) writeDoxFont(Config_getString("LATEX_OUTPUT")); if (generateRtf) writeDoxFont(Config_getString("RTF_OUTPUT")); @@ -11414,8 +11482,6 @@ void generateOutput() } } - writeMainPageTagFileData(); - if (g_outputList->count()>0) { writeIndexHierarchy(*g_outputList); @@ -11425,11 +11491,9 @@ void generateOutput() Doxygen::indexList->finalize(); g_s.end(); - if (!generateTagFile.isEmpty()) - { - Doxygen::tagFile << "</tagfile>" << endl; - delete tag; - } + g_s.begin("writing tag file...\n"); + writeTagFile(); + g_s.end(); if (Config_getBool("DOT_CLEANUP")) { diff --git a/src/doxygen.h b/src/doxygen.h index 6f766c0..aa9b745 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -114,7 +114,6 @@ class Doxygen static QStrList tagfileList; static MemberNameSDict *memberNameSDict; static MemberNameSDict *functionNameSDict; - static FTextStream tagFile; static SectionDict *sectionDict; static StringDict namespaceAliasDict; static GroupSDict *groupSDict; diff --git a/src/entry.cpp b/src/entry.cpp index ee3d0ae..9f863d2 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -301,21 +301,7 @@ void Entry::createSubtreeIndex(EntryNav *nav,FileStorage *storage,FileDef *fd) void Entry::createNavigationIndex(EntryNav *rootNav,FileStorage *storage,FileDef *fd) { - //printf("createNavigationIndex(%p) sublist=%p\n",this,m_sublist); - if (m_sublist) - { - //printf("saveEntries: %d children\n",root->sublist->count()); - // store all child entries of root, but keep the navigation info (=index) - QListIterator<Entry> eli(*m_sublist); - Entry *e; - for (eli.toFirst();(e=eli.current());++eli) - { - createSubtreeIndex(rootNav,storage,fd); - } - // remove all entries from root - //m_sublist->setAutoDelete(FALSE); - m_sublist->clear(); - } + createSubtreeIndex(rootNav,storage,fd); } void Entry::addSpecialListItem(const char *listName,int itemId) diff --git a/src/entry.h b/src/entry.h index 2cc2827..c92038f 100644 --- a/src/entry.h +++ b/src/entry.h @@ -133,7 +133,7 @@ class Entry static const uint64 Enum = (1ULL<<12); // for Java-style enums static const uint64 Service = (1ULL<<13); // UNO IDL static const uint64 Singleton = (1ULL<<14); // UNO IDL - static const uint64 ForwardDecl = (1ULL<<14); // forward declarad template classes + static const uint64 ForwardDecl = (1ULL<<15); // forward declarad template classes // member specifiers (add new items to the beginning) static const uint64 PrivateGettable = (1ULL<<20); // C# private getter diff --git a/src/filedef.cpp b/src/filedef.cpp index 9e8a61c..9c18e20 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -180,6 +180,112 @@ bool FileDef::hasDetailedDescription() const ); } +void FileDef::writeTagFile(FTextStream &tagFile) +{ + tagFile << " <compound kind=\"file\">" << endl; + tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; + tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl; + tagFile << " <filename>" << convertToXML(getOutputFileBase()) << "</filename>" << endl; + if (m_includeList && m_includeList->count()>0) + { + QListIterator<IncludeInfo> ili(*m_includeList); + IncludeInfo *ii; + for (;(ii=ili.current());++ili) + { + if (!ii->indirect) + { + FileDef *fd=ii->fileDef; + if (fd && fd->isLinkable() && !fd->isReference()) + { + bool isIDLorJava = FALSE; + SrcLangExt lang = fd->getLanguage(); + isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java; + const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no"; + const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no"; + tagFile << " <includes id=\"" + << convertToXML(fd->getOutputFileBase()) << "\" " + << "name=\"" << convertToXML(fd->name()) << "\" " + << "local=\"" << locStr << "\" " + << "imported=\"" << impStr << "\">" + << convertToXML(ii->includeName) + << "</includes>" + << endl; + } + } + } + } + QListIterator<LayoutDocEntry> eli( + LayoutDocManager::instance().docEntries(LayoutDocManager::File)); + LayoutDocEntry *lde; + for (eli.toFirst();(lde=eli.current());++eli) + { + switch (lde->kind()) + { + case LayoutDocEntry::FileClasses: + { + if (m_classSDict) + { + SDict<ClassDef>::Iterator ci(*m_classSDict); + ClassDef *cd; + for (ci.toFirst();(cd=ci.current());++ci) + { + if (cd->isLinkableInProject()) + { + tagFile << " <class kind=\"" << cd->compoundTypeString() << + "\">" << convertToXML(cd->name()) << "</class>" << endl; + } + } + } + } + break; + case LayoutDocEntry::FileNamespaces: + { + if (m_namespaceSDict) + { + SDict<NamespaceDef>::Iterator ni(*m_namespaceSDict); + NamespaceDef *nd; + for (ni.toFirst();(nd=ni.current());++ni) + { + if (nd->isLinkableInProject()) + { + tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl; + } + } + } + } + break; + case LayoutDocEntry::MemberDecl: + { + LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; + MemberList * ml = getMemberList(lmd->type); + if (ml) + { + ml->writeTagFile(tagFile); + } + } + break; + case LayoutDocEntry::MemberGroups: + { + if (m_memberGroupSDict) + { + MemberGroupSDict::Iterator mgli(*m_memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->writeTagFile(tagFile); + } + } + } + break; + default: + break; + } + } + + writeDocAnchorsToTagFile(tagFile); + tagFile << " </compound>" << endl; +} + void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title) { if (hasDetailedDescription()) @@ -319,19 +425,6 @@ void FileDef::writeIncludeFiles(OutputList &ol) ol.writeObjectLink(fd->getReference(), fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(), 0,ii->includeName); - if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fd->isReference()) - { - const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no"; - const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no"; - Doxygen::tagFile << " <includes id=\"" - << convertToXML(fd->getOutputFileBase()) << "\" " - << "name=\"" << convertToXML(fd->name()) << "\" " - << "local=\"" << locStr << "\" " - << "imported=\"" << impStr << "\">" - << convertToXML(ii->includeName) - << "</includes>" - << endl; - } } else { @@ -616,15 +709,6 @@ void FileDef::writeDocumentation(OutputList &ol) Doxygen::searchIndex->addWord(localName(),TRUE); } - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <compound kind=\"file\">" << endl; - Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; - Doxygen::tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl; - Doxygen::tagFile << " <filename>" - << convertToXML(getOutputFileBase()) - << "</filename>" << endl; - } //---------------------------------------- start flexible part ------------------------------- @@ -738,12 +822,6 @@ void FileDef::writeDocumentation(OutputList &ol) //---------------------------------------- end flexible part ------------------------------- - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </compound>" << endl; - } - ol.endContents(); endFileWithNavPath(this,ol); @@ -1657,16 +1735,19 @@ void FileDef::acquireFileVersion() } const int bufSize=1024; char buf[bufSize]; - int numRead = (int)fread(buf,1,bufSize,f); + int numRead = (int)fread(buf,1,bufSize-1,f); portable_pclose(f); - if (numRead>0 && !(m_fileVersion=QCString(buf,numRead).stripWhiteSpace()).isEmpty()) + if (numRead>0 && numRead<bufSize) { - msg("%s\n",m_fileVersion.data()); - } - else - { - msg("no version available\n"); + buf[numRead]='\0'; + m_fileVersion=QCString(buf,numRead).stripWhiteSpace(); + if (!m_fileVersion.isEmpty()) + { + msg("%s\n",m_fileVersion.data()); + return; + } } + msg("no version available\n"); } } diff --git a/src/filedef.h b/src/filedef.h index a95cd77..8cd5703 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -39,6 +39,7 @@ class NamespaceSDict; class MemberGroupSDict; class PackageDef; class DirDef; +class FTextStream; /** Class representing the data associated with a \#include statement. */ struct IncludeInfo @@ -146,6 +147,7 @@ class FileDef : public Definition void writeMemberPages(OutputList &ol); void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const; void writeSummaryLinks(OutputList &ol); + void writeTagFile(FTextStream &t); void startParsing(); void writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu); diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 64a49ca..8ea8aeb 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -258,11 +258,12 @@ CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS})) TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE{ARGS}|CLASS{ARGS}|PROCEDURE{ARGS}?) INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")" -ATTR_SPEC (ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE) +ATTR_SPEC (EXTERNAL|ALLOCATABLE|DIMENSION{ARGS}|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|NOPASS|PASS{ARGS}?|DEFERRED|NON_OVERRIDABLE) ACCESS_SPEC (PRIVATE|PUBLIC) LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")" /* Assume that attribute statements are almost the same as attributes. */ ATTR_STMT {ATTR_SPEC}|DIMENSION|{ACCESS_SPEC} +EXTERNAL_STMT (EXTERNAL) CONTAINS CONTAINS PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|IMPURE|PURE|ELEMENTAL)? @@ -726,6 +727,18 @@ private { } } */ +{EXTERNAL_STMT}/({BS}"::"|{BS_}{ID}) { + /* external can be a "type" or an attribute */ + if(YY_START == Start) + { + addModule(NULL); + yy_push_state(ModuleBody); //anon program + } + QCString tmp = yytext; + currentModifiers |= tmp.stripWhiteSpace(); + argType = QCString(yytext).simplifyWhiteSpace().lower(); + yy_push_state(AttributeList); + } {ATTR_STMT}/{BS_}{ID} | {ATTR_STMT}/{BS}"::" { /* attribute statement starts */ @@ -744,7 +757,7 @@ private { <AttributeList>{ {COMMA} {} {BS} {} -{ATTR_SPEC}. { /* update current modifierswhen it is an ATTR_SPEC and not a variable name */ +{ATTR_SPEC}. { /* update current modifiers when it is an ATTR_SPEC and not a variable name */ /* bug_625519 */ QChar chr = yytext[(int)yyleng-1]; if (chr.isLetter() || chr.isDigit() || (chr == '_')) @@ -1723,8 +1736,11 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs) } if (mdfs.external) { - if (!typeName.isEmpty()) typeName += ", "; - typeName += "external"; + if (!typeName.contains("external")) + { + if (!typeName.isEmpty()) typeName += ", "; + typeName += "external"; + } } if (mdfs.intrinsic) { @@ -2155,79 +2171,117 @@ static void handleCommentBlock(const QCString &doc,bool brief) } //---------------------------------------------------------------------------- - +/// Handle parameter description as defined after the declaration of the parameter static void subrHandleCommentBlock(const QCString &doc,bool brief) { QCString loc_doc; + loc_doc = doc.stripWhiteSpace(); + Entry *tmp_entry = current; current = subrCurrent.getFirst(); // temporarily switch to the entry of the subroutine / function // Still in the specification section so no inbodyDocs yet, but parameter documentation current->inbodyDocs = ""; - if (docBlock.stripWhiteSpace().find("\\param") == 0) + // strip \\param or @param, so we can do some extra checking. We will add it later on again. + if (loc_doc.find("\\param") == 0) { - handleCommentBlock("\n\n"+doc,brief); + loc_doc = loc_doc.right(loc_doc.length()-strlen("\\param")).stripWhiteSpace(); } - else if (docBlock.stripWhiteSpace().find("@param") == 0) + else if (loc_doc.find("@param") == 0) { - handleCommentBlock("\n\n"+doc,brief); + loc_doc = loc_doc.right(loc_doc.length()-strlen("@param")).stripWhiteSpace(); } - else + + // direction as defined with the declaration of the parameter + int dir1 = modifiers[current_root][argName.lower()].direction; + // in description [in] is specified + if (loc_doc.lower().find(directionParam[SymbolModifiers::IN]) == 0) { - int dir1 = modifiers[current_root][argName.lower()].direction; - loc_doc = doc.stripWhiteSpace(); - if (loc_doc.lower().find(directionParam[SymbolModifiers::IN]) == 0) + // check if with the declaration intent(in) or nothing has been specified + if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) || + (directionParam[dir1] == directionParam[SymbolModifiers::IN])) { - if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) || - (directionParam[dir1] == directionParam[SymbolModifiers::IN])) - { - handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::IN] + " " + - argName + " " + loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::IN])),brief); - } - else + // strip direction + loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::IN])); + // in case of emty documentation or (now) just name, consider it as no documemntation + if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower())) { - warn(yyFileName,yyLineNr, "inconsistency between intent attribute and documentation for variable: "+argName); - handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " + - argName + " " + doc,brief); + // reset current back to the part inside the routine + current=tmp_entry; + return; } + handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::IN] + " " + + argName + " " + loc_doc,brief); } - else if (loc_doc.lower().find(directionParam[SymbolModifiers::OUT]) == 0) + else { - if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) || - (directionParam[dir1] == directionParam[SymbolModifiers::OUT])) - { - handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::OUT] + " " + - argName + " " + loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::OUT])),brief); - } - else - { - warn(yyFileName,yyLineNr, "inconsistency between intent attribute and documentation for variable: "+argName); - handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " + - argName + " " + doc,brief); - } + // something different specified, give warning and leave error. + warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args + + " inconsistency between intent attribute and documentation for parameter: " + argName); + handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " + + argName + " " + loc_doc,brief); } - else if (loc_doc.lower().find(directionParam[SymbolModifiers::INOUT]) == 0) + } + // analogous to the [in] case, here [out] direction specified + else if (loc_doc.lower().find(directionParam[SymbolModifiers::OUT]) == 0) + { + if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) || + (directionParam[dir1] == directionParam[SymbolModifiers::OUT])) { - if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) || - (directionParam[dir1] == directionParam[SymbolModifiers::INOUT])) + loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::OUT])); + if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower())) { - handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::INOUT] + " " + - argName + " " + loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::INOUT])),brief); + current=tmp_entry; + return; } - else + handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::OUT] + " " + + argName + " " + loc_doc,brief); + } + else + { + warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args + + " inconsistency between intent attribute and documentation for parameter: " + argName); + handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " + + argName + " " + loc_doc,brief); + } + } + // analogous to the [in] case, here [in,out] direction specified + else if (loc_doc.lower().find(directionParam[SymbolModifiers::INOUT]) == 0) + { + if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) || + (directionParam[dir1] == directionParam[SymbolModifiers::INOUT])) + { + loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::INOUT])); + if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower())) { - warn(yyFileName,yyLineNr, "inconsistency between intent attribute and documentation for variable: "+argName); - handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " + - argName + " " + doc,brief); + current=tmp_entry; + return; } + handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::INOUT] + " " + + argName + " " + loc_doc,brief); } else { + warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args + + " inconsistency between intent attribute and documentation for parameter: " + argName); handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " + - argName + " " + doc,brief); + argName + " " + loc_doc,brief); + } + } + // analogous to the [in] case; here no direction specified + else + { + if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower())) + { + current=tmp_entry; + return; } + handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " + + argName + " " + loc_doc,brief); } + + // reset current back to the part inside the routine current=tmp_entry; } diff --git a/src/groupdef.cpp b/src/groupdef.cpp index f1d1877..9160538 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -546,6 +546,149 @@ void GroupDef::computeAnchors() setAnchors(allMemberList); } +void GroupDef::writeTagFile(FTextStream &tagFile) +{ + tagFile << " <compound kind=\"group\">" << endl; + tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; + tagFile << " <title>" << convertToXML(title) << "</title>" << endl; + tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; + QListIterator<LayoutDocEntry> eli( + LayoutDocManager::instance().docEntries(LayoutDocManager::Group)); + LayoutDocEntry *lde; + for (eli.toFirst();(lde=eli.current());++eli) + { + switch (lde->kind()) + { + case LayoutDocEntry::GroupClasses: + { + if (classSDict) + { + SDict<ClassDef>::Iterator ci(*classSDict); + ClassDef *cd; + for (ci.toFirst();(cd=ci.current());++ci) + { + if (cd->isLinkableInProject()) + { + tagFile << " <class kind=\"" << cd->compoundTypeString() + << "\">" << convertToXML(cd->name()) << "</class>" << endl; + } + } + } + } + break; + case LayoutDocEntry::GroupNamespaces: + { + if (namespaceSDict) + { + SDict<NamespaceDef>::Iterator ni(*namespaceSDict); + NamespaceDef *nd; + for (ni.toFirst();(nd=ni.current());++ni) + { + if (nd->isLinkableInProject()) + { + tagFile << " <namespace>" << convertToXML(nd->name()) + << "</namespace>" << endl; + } + } + } + } + break; + case LayoutDocEntry::GroupFiles: + { + if (fileList) + { + QListIterator<FileDef> it(*fileList); + FileDef *fd; + for (;(fd=it.current());++it) + { + if (fd->isLinkableInProject()) + { + tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl; + } + } + } + } + break; + case LayoutDocEntry::GroupPageDocs: + { + if (pageDict) + { + PageSDict::Iterator pdi(*pageDict); + PageDef *pd=0; + for (pdi.toFirst();(pd=pdi.current());++pdi) + { + QCString pageName = pd->getOutputFileBase(); + if (pd->isLinkableInProject()) + { + tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl; + } + } + } + } + break; + case LayoutDocEntry::GroupDirs: + { + if (dirList) + { + QListIterator<DirDef> it(*dirList); + DirDef *dd; + for (;(dd=it.current());++it) + { + if (dd->isLinkableInProject()) + { + tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl; + } + } + } + } + break; + case LayoutDocEntry::GroupNestedGroups: + { + if (groupList) + { + QListIterator<GroupDef> it(*groupList); + GroupDef *gd; + for (;(gd=it.current());++it) + { + if (gd->isVisible()) + { + tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl; + } + } + } + } + break; + case LayoutDocEntry::MemberDecl: + { + LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; + MemberList * ml = getMemberList(lmd->type); + if (ml) + { + ml->writeTagFile(tagFile); + } + } + break; + case LayoutDocEntry::MemberGroups: + { + if (memberGroupSDict) + { + MemberGroupSDict::Iterator mgli(*memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->writeTagFile(tagFile); + } + } + } + break; + default: + break; + } + } + writeDocAnchorsToTagFile(tagFile); + tagFile << " </compound>" << endl; +} + void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) { if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) @@ -670,10 +813,6 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title) ol.docify(theTranslator->trFile(FALSE,TRUE)+" "); ol.insertMemberAlign(); ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl; - } ol.endMemberItem(); if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { @@ -728,10 +867,6 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title) //ol.docify(" "); ol.insertMemberAlign(); ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle()); - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl; - } ol.endMemberItem(); if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { @@ -765,10 +900,6 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title) ol.insertMemberAlign(); ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName()); ol.endMemberItem(); - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl; - } if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(dd->getOutputFileBase()); @@ -801,13 +932,6 @@ void GroupDef::writePageDocumentation(OutputList &ol) { if (!pd->isReference()) { - QCString pageName = pd->getOutputFileBase(); - - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl; - } - SectionInfo *si=0; if (!pd->title().isEmpty() && !pd->name().isEmpty() && (si=Doxygen::sectionDict->find(pd->name()))!=0) @@ -941,7 +1065,15 @@ void GroupDef::writeDocumentation(OutputList &ol) ol.parseText(title); ol.popGeneratorState(); addGroupListToTitle(ol,this); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Man); ol.endTitleHead(getOutputFileBase(),title); + ol.popGeneratorState(); + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Man); + ol.endTitleHead(getOutputFileBase(),name()); + ol.parseText(title); + ol.popGeneratorState(); ol.endHeaderSection(); ol.startContents(); @@ -959,15 +1091,6 @@ void GroupDef::writeDocumentation(OutputList &ol) Doxygen::indexList->addIndexItem(this,0,0,title); - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <compound kind=\"group\">" << endl; - Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; - Doxygen::tagFile << " <title>" << convertToXML(title) << "</title>" << endl; - Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; - } - - //---------------------------------------- start flexible part ------------------------------- SrcLangExt lang=getLanguage(); @@ -1092,12 +1215,6 @@ void GroupDef::writeDocumentation(OutputList &ol) ol.popGeneratorState(); - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </compound>" << endl; - } - if (Config_getBool("SEPARATE_MEMBER_PAGES")) { allMemberList->sort(); @@ -1519,3 +1636,4 @@ bool GroupDef::hasDetailedDescription() const return ((!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty()); } + diff --git a/src/groupdef.h b/src/groupdef.h index bc956da..a21311b 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -39,6 +39,7 @@ class DirList; class FTVHelp; class Entry; class MemberDef; +class FTextStream; /** A model of a group of symbols. */ class GroupDef : public Definition @@ -67,6 +68,7 @@ class GroupDef : public Definition void writeDocumentation(OutputList &ol); void writeMemberPages(OutputList &ol); void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const; + void writeTagFile(FTextStream &); int countMembers() const; bool isLinkableInProject() const; bool isLinkable() const; diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index c1e535d..2629ab3 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -281,6 +281,7 @@ HtmlHelp::HtmlHelp() : indexFileDict(1009) HtmlHelp::~HtmlHelp() { if (m_fromUtf8!=(void *)(-1)) portable_iconv_close(m_fromUtf8); + delete index; } #if 0 /*! return a reference to the one and only instance of this class. diff --git a/src/index.cpp b/src/index.cpp index 430f5af..96b0f76 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -800,9 +800,9 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex) static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FTVHelp* ftv,bool addToIndex) { ClassSDict::Iterator cli(*cl); - for (;cli.current(); ++cli) + ClassDef *cd; + for (;(cd=cli.current());++cli) { - ClassDef *cd=cli.current(); //printf("class %s hasVisibleRoot=%d isVisibleInHierarchy=%d\n", // cd->name().data(), // hasVisibleRoot(cd->baseClasses()), @@ -923,9 +923,9 @@ static int countClassesInTreeList(const ClassSDict &cl) { int count=0; ClassSDict::Iterator cli(cl); - for (;cli.current(); ++cli) + ClassDef *cd; + for (;(cd=cli.current());++cli) { - ClassDef *cd=cli.current(); if (!hasVisibleRoot(cd->baseClasses())) // filter on root classes { if (cd->isVisibleInHierarchy()) // should it be visible @@ -1640,7 +1640,7 @@ static void writeAnnotatedClassList(OutputList &ol) static QCString letterToLabel(uint startLetter) { - char s[10]; + char s[11]; // max 0x12345678 + '\0' if (startLetter>0x20 && startLetter<=0x7f) // printable ASCII character { s[0]=(char)startLetter; @@ -3079,6 +3079,17 @@ static void countRelatedPages(int &docPages,int &indexPages) //---------------------------------------------------------------------------- +static bool mainPageHasOwnTitle() +{ + static QCString projectName = Config_getString("PROJECT_NAME"); + QCString title; + if (Doxygen::mainPage) + { + title = filterTitle(Doxygen::mainPage->title()); + } + return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0; +} + static void writePages(PageDef *pd,FTVHelp *ftv) { //printf("writePages()=%s pd=%p mainpage=%p\n",pd->name().data(),pd,Doxygen::mainPage); @@ -3115,8 +3126,8 @@ static void writePages(PageDef *pd,FTVHelp *ftv) } } if (hasSubPages && ftv) ftv->incContentsDepth(); - bool doIndent = (hasSections || hasSubPages) && - (pd!=Doxygen::mainPage || mainPageHasTitle()); + bool doIndent = (hasSections || hasSubPages) && + (pd!=Doxygen::mainPage || mainPageHasOwnTitle()); if (doIndent) { Doxygen::indexList->incContentsDepth(); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 086e012..4ad577e 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -543,8 +543,10 @@ static void writeDefaultFooter(FTextStream &t) else unit = "chapter"; t << "% Index\n" + "\\backmatter\n" "\\newpage\n" "\\phantomsection\n" + "\\clearemptydoublepage\n" "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trRTFGeneralIndex() << "}\n" "\\printindex\n" "\n" @@ -1260,7 +1262,7 @@ void LatexGenerator::startTitleHead(const char *fileName) static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); if (usePDFLatex && pdfHyperlinks && fileName) { - t << "\\hypertarget{" << stripPath(fileName) << "}{"; + t << "\\hypertarget{" << stripPath(fileName) << "}{}"; } if (Config_getBool("COMPACT_LATEX")) { @@ -1274,8 +1276,6 @@ void LatexGenerator::startTitleHead(const char *fileName) void LatexGenerator::endTitleHead(const char *fileName,const char *name) { - static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); - static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); t << "}" << endl; if (name) { @@ -1285,10 +1285,6 @@ void LatexGenerator::endTitleHead(const char *fileName,const char *name) escapeMakeIndexChars(name); t << "}}" << endl; } - if (usePDFLatex && pdfHyperlinks && fileName) - { - t << "}" << endl; - } } void LatexGenerator::startTitle() @@ -1428,18 +1424,12 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *, t << "\\hypertarget{"; if (fName) t << stripPath(fName); if (anchor) t << "_" << anchor; - t << "}{"; + t << "}{}"; } } void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor) { - static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); - static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); - if (usePDFLatex && pdfHyperlinks) - { - t << "}"; - } t << "\\label{"; if (fName) t << stripPath(fName); if (anchor) t << "_" << anchor; diff --git a/src/lodepng.cpp b/src/lodepng.cpp index b237d5a..46011a8 100644 --- a/src/lodepng.cpp +++ b/src/lodepng.cpp @@ -3535,20 +3535,11 @@ static void filterScanline(unsigned char* out, const unsigned char* scanline, co switch(filterType) { case 0: - if(prevline) for(i = 0; i < length; i++) out[i] = scanline[i]; - else for(i = 0; i < length; i++) out[i] = scanline[i]; + for(i = 0; i < length; i++) out[i] = scanline[i]; break; case 1: - if(prevline) - { - for(i = 0; i < bytewidth; i++) out[i] = scanline[i]; - for(i = bytewidth; i < length ; i++) out[i] = scanline[i] - scanline[i - bytewidth]; - } - else - { - for(i = 0; i < bytewidth; i++) out[i] = scanline[i]; - for(i = bytewidth; i < length; i++) out[i] = scanline[i] - scanline[i - bytewidth]; - } + for(i = 0; i < bytewidth; i++) out[i] = scanline[i]; + for(i = bytewidth; i < length; i++) out[i] = scanline[i] - scanline[i - bytewidth]; break; case 2: if(prevline) for(i = 0; i < length; i++) out[i] = scanline[i] - prevline[i]; @@ -4134,9 +4125,12 @@ unsigned LodePNG_loadFile(unsigned char** out, size_t* outsize, const char* file rewind(file); /*read contents of the file into the vector*/ - *outsize = 0; - *out = (unsigned char*)malloc((size_t)size); - if(size && (*out)) (*outsize) = fread(*out, 1, (size_t)size, file); + if (size>0) + { + *outsize = 0; + *out = (unsigned char*)malloc((size_t)size); + if(size && (*out)) (*outsize) = fread(*out, 1, (size_t)size, file); + } fclose(file); if(!(*out) && size) return 80; /*the above malloc failed*/ diff --git a/src/mangen.cpp b/src/mangen.cpp index 352ef15..dc02ccf 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -194,6 +194,7 @@ void ManGenerator::endTitleHead(const char *,const char *name) t << ".SH NAME" << endl; t << name << " \\- "; firstCol=FALSE; + paragraph=TRUE; inHeader=TRUE; } @@ -340,7 +341,7 @@ void ManGenerator::codify(const char *str) break; case '\n': t << "\n"; firstCol=TRUE; col=0; break; case '\\': t << "\\"; col++; break; - case '\"': c = '\''; // no break! + case '\"': // no break! default: p=writeUtf8Char(t,p-1); firstCol=FALSE; col++; break; } } @@ -828,10 +829,4 @@ void ManGenerator::endLabels() void ManGenerator::endHeaderSection() { - if (!firstCol) - { - t<< endl; firstCol=TRUE; - } } - - diff --git a/src/markdown.cpp b/src/markdown.cpp index cc86af4..12d72ff 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1540,7 +1540,7 @@ static bool isTableBlock(const char *data,int size) i+=ret; // goto next line int cc2; - ret = findTableColumns(data+i,size-i,start,end,cc2); + findTableColumns(data+i,size-i,start,end,cc2); //printf("isTableBlock: %d\n",cc1==cc2); return cc1==cc2; diff --git a/src/memberdef.cpp b/src/memberdef.cpp index a25528a..66814a6 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -194,7 +194,7 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, } else if (cd->templateArguments()) { - cName=tempArgListToString(cd->templateArguments()); + cName=tempArgListToString(cd->templateArguments(),cd->getLanguage()); //printf("2. cName=%s\n",cName.data()); } else // no template specifier @@ -270,8 +270,11 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, //{ // ol.docify(" "); //} - ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Latex); + ol.disable(OutputGenerator::Html); + ol.docify(" "); /* man page */ + if (htmlOn) ol.enable(OutputGenerator::Html); + ol.disable(OutputGenerator::Man); ol.startEmphasis(); ol.enable(OutputGenerator::Man); if (latexOn) ol.enable(OutputGenerator::Latex); @@ -573,8 +576,6 @@ class MemberDefImpl // FALSE => block is put before declaration. ClassDef *category; MemberDef *categoryRelation; - - unsigned tagDataWritten; }; MemberDefImpl::MemberDefImpl() : @@ -704,7 +705,6 @@ void MemberDefImpl::init(Definition *def, hasDocumentedReturnType = FALSE; docProvider = 0; isDMember = def->getDefFileName().right(2).lower()==".d"; - tagDataWritten = 0; // save separate written status for file, group, class, etc. } @@ -1410,8 +1410,7 @@ QCString MemberDef::getDeclType() const void MemberDef::writeDeclaration(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - bool inGroup, const DefType compoundType, - ClassDef *inheritedFrom,const char *inheritId) + bool inGroup, ClassDef *inheritedFrom,const char *inheritId) { //printf("%s MemberDef::writeDeclaration() inGroup=%d\n",qualifiedName().data(),inGroup); @@ -1423,7 +1422,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; - _writeTagData(compoundType); + //_writeTagData(compoundType); _addToSearchIndex(); QCString cname = d->name(); @@ -1531,9 +1530,9 @@ void MemberDef::writeDeclaration(OutputList &ol, getBodyDef(), // fileScope this, // self ltype.left(i), // text - TRUE // autoBreak + FALSE // autoBreak ); - getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd,compoundType); + getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd); //ol+=*getAnonymousEnumType()->enumDecl(); linkifyText(TextGeneratorOLImpl(ol),d,m_impl->fileDef,this,ltype.right(ltype.length()-i-l),TRUE); } @@ -1545,7 +1544,7 @@ void MemberDef::writeDeclaration(OutputList &ol, getBodyDef(), // fileScope this, // self ltype, // text - TRUE // autoBreak + FALSE // autoBreak ); } } @@ -1566,7 +1565,7 @@ void MemberDef::writeDeclaration(OutputList &ol, getBodyDef(), // fileScope this, // self ltype, // text - TRUE // autoBreak + FALSE // autoBreak ); } bool htmlOn = ol.isEnabled(OutputGenerator::Html); @@ -1666,12 +1665,16 @@ void MemberDef::writeDeclaration(OutputList &ol, // *** write arguments if (argsString() && !isObjCMethod()) { - if (!isDefine()) ol.writeString(" "); + if (!isDefine() && !isTypedef()) ol.writeString(" "); linkifyText(TextGeneratorOLImpl(ol), // out d, // scope getBodyDef(), // fileScope this, // self - argsString(), // text + isDefine() ? + (const char*)substitute(argsString(),",",", ") : + isTypedef() ? + (const char*)substitute(argsString(),")(",") (") : + argsString(), // text m_impl->annMemb, // autoBreak TRUE, // external FALSE, // keepSpaces @@ -2611,7 +2614,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs); ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.left(i)); - vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef(),definitionType()); + vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef()); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-i-l)); found=TRUE; @@ -3547,89 +3550,83 @@ Specifier MemberDef::virtualness(int count) const return v; } -void MemberDef::_writeTagData(const DefType compoundType) +void MemberDef::writeTagFile(FTextStream &tagFile) { - unsigned typeMask = 1 << compoundType; - if ((m_impl->tagDataWritten) & typeMask) return; // member already written for this type - if (m_impl->mtype==MemberType_EnumValue && m_impl->enumScope && - m_impl->enumScope->isStrong()) return; // enum value is part of enum - static bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty(); - // write tag file information of this member - if (generateTagFile && isLinkableInProject()) + if (!isLinkableInProject()) return; + tagFile << " <member kind=\""; + switch (m_impl->mtype) { - Doxygen::tagFile << " <member kind=\""; - switch (m_impl->mtype) - { - case MemberType_Define: Doxygen::tagFile << "define"; break; - case MemberType_EnumValue: Doxygen::tagFile << "enumvalue"; break; - case MemberType_Property: Doxygen::tagFile << "property"; break; - case MemberType_Event: Doxygen::tagFile << "event"; break; - case MemberType_Variable: Doxygen::tagFile << "variable"; break; - case MemberType_Typedef: Doxygen::tagFile << "typedef"; break; - case MemberType_Enumeration: Doxygen::tagFile << "enumeration"; break; - case MemberType_Function: Doxygen::tagFile << "function"; break; - case MemberType_Signal: Doxygen::tagFile << "signal"; break; - case MemberType_Friend: Doxygen::tagFile << "friend"; break; - case MemberType_DCOP: Doxygen::tagFile << "dcop"; break; - case MemberType_Slot: Doxygen::tagFile << "slot"; break; - case MemberType_Interface: Doxygen::tagFile << "interface"; break; - case MemberType_Service: Doxygen::tagFile << "service"; break; - } - if (m_impl->prot!=Public) - { - Doxygen::tagFile << "\" protection=\""; - if (m_impl->prot==Protected) Doxygen::tagFile << "protected"; - else if (m_impl->prot==Package) Doxygen::tagFile << "package"; - else /* Private */ Doxygen::tagFile << "private"; - } - if (m_impl->virt!=Normal) - { - Doxygen::tagFile << "\" virtualness=\""; - if (m_impl->virt==Virtual) Doxygen::tagFile << "virtual"; - else /* Pure */ Doxygen::tagFile << "pure"; - } - if (isStatic()) - { - Doxygen::tagFile << "\" static=\"yes"; - } - Doxygen::tagFile << "\">" << endl; - Doxygen::tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl; - Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; - Doxygen::tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl; - Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl; - QCString idStr = id(); - if (!idStr.isEmpty()) - { - Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl; - } - Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl; - if (isStrong()) + case MemberType_Define: tagFile << "define"; break; + case MemberType_EnumValue: tagFile << "enumvalue"; break; + case MemberType_Property: tagFile << "property"; break; + case MemberType_Event: tagFile << "event"; break; + case MemberType_Variable: tagFile << "variable"; break; + case MemberType_Typedef: tagFile << "typedef"; break; + case MemberType_Enumeration: tagFile << "enumeration"; break; + case MemberType_Function: tagFile << "function"; break; + case MemberType_Signal: tagFile << "signal"; break; + case MemberType_Friend: tagFile << "friend"; break; + case MemberType_DCOP: tagFile << "dcop"; break; + case MemberType_Slot: tagFile << "slot"; break; + case MemberType_Interface: tagFile << "interface"; break; + case MemberType_Service: tagFile << "service"; break; + } + if (m_impl->prot!=Public) + { + tagFile << "\" protection=\""; + if (m_impl->prot==Protected) tagFile << "protected"; + else if (m_impl->prot==Package) tagFile << "package"; + else /* Private */ tagFile << "private"; + } + if (m_impl->virt!=Normal) + { + tagFile << "\" virtualness=\""; + if (m_impl->virt==Virtual) tagFile << "virtual"; + else /* Pure */ tagFile << "pure"; + } + if (isStatic()) + { + tagFile << "\" static=\"yes"; + } + tagFile << "\">" << endl; + if (typeString()!=QCString("@")) + { + tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl; + } + tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; + tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl; + tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl; + QCString idStr = id(); + if (!idStr.isEmpty()) + { + tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl; + } + tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl; + if (isStrong()) + { + MemberList *fmdl=m_impl->enumFields; + if (fmdl) { - MemberList *fmdl=m_impl->enumFields; - if (fmdl) + MemberListIterator mli(*fmdl); + MemberDef *fmd; + for (mli.toFirst();(fmd=mli.current());++mli) { - MemberListIterator mli(*fmdl); - MemberDef *fmd; - for (mli.toFirst();(fmd=mli.current());++mli) + if (!fmd->isReference()) { - if (!fmd->isReference()) + tagFile << " <enumvalue file=\"" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension); + tagFile << "\" anchor=\"" << convertToXML(fmd->anchor()); + QCString idStr = fmd->id(); + if (!idStr.isEmpty()) { - Doxygen::tagFile << " <enumvalue file=\"" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension); - Doxygen::tagFile << "\" anchor=\"" << convertToXML(fmd->anchor()); - QCString idStr = fmd->id(); - if (!idStr.isEmpty()) - { - Doxygen::tagFile << "\" clangid=\"" << convertToXML(idStr); - } - Doxygen::tagFile << "\">" << convertToXML(fmd->name()) << "</enumvalue>" << endl; + tagFile << "\" clangid=\"" << convertToXML(idStr); } + tagFile << "\">" << convertToXML(fmd->name()) << "</enumvalue>" << endl; } } } - writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </member>" << endl; } - m_impl->tagDataWritten |= typeMask; + writeDocAnchorsToTagFile(tagFile); + tagFile << " </member>" << endl; } void MemberDef::_computeIsConstructor() @@ -3728,8 +3725,7 @@ bool MemberDef::isDestructor() const } void MemberDef::writeEnumDeclaration(OutputList &typeDecl, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - const DefType compoundType) + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd) { int enumMemCount=0; @@ -3756,7 +3752,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl, { if (isLinkableInProject() || hasDocumentedEnumValues()) { - _writeTagData(compoundType); + //_writeTagData(compoundType); _addToSearchIndex(); writeLink(typeDecl,cd,nd,fd,gd); } @@ -3784,7 +3780,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl, { MemberListIterator mli(*fmdl); MemberDef *fmd=mli.current(); - bool fmdVisible = fmd->isBriefSectionVisible(); + bool fmdVisible = fmd ? fmd->isBriefSectionVisible() : TRUE; while (fmd) { if (fmdVisible) @@ -3805,7 +3801,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl, if (fmd->hasDocumentation()) // enum value has docs { - fmd->_writeTagData(compoundType); + //fmd->_writeTagData(compoundType); fmd->_addToSearchIndex(); fmd->writeLink(typeDecl,cd,nd,fd,gd); } diff --git a/src/memberdef.h b/src/memberdef.h index 4f6028a..a669d68 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -376,16 +376,15 @@ class MemberDef : public Definition // output generation void writeDeclaration(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - bool inGroup, const DefType compoundType, - ClassDef *inheritFrom=0,const char *inheritId=0); + bool inGroup, ClassDef *inheritFrom=0,const char *inheritId=0); void writeDocumentation(MemberList *ml,OutputList &ol, const char *scopeName,Definition *container, bool inGroup,bool showEnumValues=FALSE,bool showInline=FALSE); void writeMemberDocSimple(OutputList &ol,Definition *container); void writeEnumDeclaration(OutputList &typeDecl, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - const DefType compoundType); + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); + void writeTagFile(FTextStream &); void warnIfUndocumented(); MemberDef *createTemplateInstanceMember(ArgumentList *formalArgs, diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 84567e2..51eb4a1 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -112,7 +112,7 @@ void MemberGroup::writeDeclarations(OutputList &ol, //printf("MemberGroup::writeDeclarations() %s\n",grpHeader.data()); QCString ldoc = doc; if (!ldoc.isEmpty()) ldoc.prepend("<a name=\""+anchor()+"\" id=\""+anchor()+"\"></a>"); - memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,DefinitionIntf::TypeGroup,FALSE,showInline); + memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,FALSE,showInline); } void MemberGroup::writePlainDeclarations(OutputList &ol, @@ -121,7 +121,7 @@ void MemberGroup::writePlainDeclarations(OutputList &ol, ) { //printf("MemberGroup::writePlainDeclarations() memberList->count()=%d\n",memberList->count()); - memberList->writePlainDeclarations(ol,cd,nd,fd,gd,DefinitionIntf::TypeGroup,inheritedFrom,inheritId); + memberList->writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId); } void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName, @@ -150,7 +150,7 @@ void MemberGroup::addGroupedInheritedMembers(OutputList &ol,ClassDef *cd, { MemberList ml(lt); ml.append(md); - ml.writePlainDeclarations(ol,cd,0,0,0,DefinitionIntf::TypeGroup,inheritedFrom,inheritId); + ml.writePlainDeclarations(ol,cd,0,0,0,inheritedFrom,inheritId); } } } @@ -388,6 +388,12 @@ void MemberGroup::setRefItems(const QList<ListItemInfo> *sli) } } } + +void MemberGroup::writeTagFile(FTextStream &tagFile) +{ + memberList->writeTagFile(tagFile); +} + //-------------------------------------------------------------------------- void MemberGroupInfo::setRefItems(const QList<ListItemInfo> *sli) diff --git a/src/membergroup.h b/src/membergroup.h index 42e60c5..e3f6c0f 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -33,6 +33,7 @@ class GroupDef; class OutputList; class Definition; class StorageIntf; +class FTextStream; struct ListItemInfo; /** A class representing a group of members. */ @@ -57,6 +58,7 @@ class MemberGroup Definition *container,bool showEnumValues,bool showInline); void writeDocumentationPage(OutputList &ol,const char *scopeName, Definition *container); + void writeTagFile(FTextStream &); void addGroupedInheritedMembers(OutputList &ol,ClassDef *cd, MemberListType lt, ClassDef *inheritedFrom,const QCString &inheritId); diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 28ed37e..68b3bcb 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -301,8 +301,7 @@ bool MemberList::declVisible() const void MemberList::writePlainDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd, - GroupDef *gd, const DefinitionIntf::DefType compoundType, - ClassDef *inheritedFrom,const char *inheritId + GroupDef *gd,ClassDef *inheritedFrom,const char *inheritId ) { //printf("----- writePlainDeclaration() ----\n"); @@ -344,7 +343,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, case MemberType_Event: { if (first) ol.startMemberList(),first=FALSE; - md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId); + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); break; } case MemberType_Enumeration: @@ -386,7 +385,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, } ol.writeString("enum "); ol.insertMemberAlign(); - md->writeEnumDeclaration(ol,cd,nd,fd,gd,compoundType); + md->writeEnumDeclaration(ol,cd,nd,fd,gd); if (!detailsLinkable) { ol.endDoxyAnchor(md->getOutputFileBase(),md->anchor()); @@ -431,7 +430,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ol.startMemberList(); first=FALSE; } - md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId); + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); break; } case MemberType_EnumValue: @@ -440,7 +439,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, { //printf("EnumValue!\n"); if (first) ol.startMemberList(),first=FALSE; - md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId); + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId); } } break; @@ -466,7 +465,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ol.startMemberList(); first=FALSE; } - md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType); + md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); } md->setFromAnonymousScope(TRUE); } @@ -490,7 +489,6 @@ void MemberList::writePlainDeclarations(OutputList &ol, * @param gd non-null if this list is part of group documentation. * @param title Title to use for the member list. * @param subtitle Sub title to use for the member list. - * @param compoundType Container type for this member list. * @param showEnumValues Obsolete, always set to FALSE. * @param showInline if set to TRUE if title is rendered differently * @param inheritedFrom if not 0, the list is shown inside the @@ -500,8 +498,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, */ void MemberList::writeDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - const char *title,const char *subtitle, - const DefinitionIntf::DefType compoundType,bool showEnumValues, + const char *title,const char *subtitle, bool showEnumValues, bool showInline,ClassDef *inheritedFrom,MemberListType lt) { (void)showEnumValues; // unused @@ -587,7 +584,7 @@ void MemberList::writeDeclarations(OutputList &ol, } else { - writePlainDeclarations(ol,cd,nd,fd,gd,compoundType,inheritedFrom,inheritId); + writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId); } //printf("memberGroupList=%p\n",memberGroupList); @@ -943,6 +940,31 @@ QCString MemberList::listTypeAsString(MemberListType type) return ""; } +void MemberList::writeTagFile(FTextStream &tagFile) +{ + MemberListIterator mli(*this); + MemberDef *md; + for ( ; (md=mli.current()) ; ++mli) + { + if (md->getLanguage()!=SrcLangExt_VHDL) + { + md->writeTagFile(tagFile); + } + else + { + VhdlDocGen::writeTagFile(md,tagFile); + } + } + if (memberGroupList) + { + MemberGroupListIterator mgli(*memberGroupList); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->writeTagFile(tagFile); + } + } +} //-------------------------------------------------------------------------- diff --git a/src/memberlist.h b/src/memberlist.h index 607eb01..4cccadc 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -55,12 +55,11 @@ class MemberList : public QList<MemberDef> void countDocMembers(bool countEnumValues=FALSE); int countInheritableMembers(ClassDef *inheritedFrom) const; void writePlainDeclarations(OutputList &ol, - ClassDef *cd,NamespaceDef *nd,FileDef *fd, - GroupDef *gd,const DefinitionIntf::DefType compoundType, + ClassDef *cd,NamespaceDef *nd,FileDef *fd, GroupDef *gd, ClassDef *inheritedFrom,const char *inheritId); void writeDeclarations(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, - const char *title,const char *subtitle,const DefinitionIntf::DefType compoundType, + const char *title,const char *subtitle, bool showEnumValues=FALSE,bool showInline=FALSE, ClassDef *inheritedFrom=0,MemberListType lt=MemberListType_pubMethods); void writeDocumentation(OutputList &ol,const char *scopeName, @@ -68,6 +67,7 @@ class MemberList : public QList<MemberDef> void writeSimpleDocumentation(OutputList &ol,Definition *container); void writeDocumentationPage(OutputList &ol, const char *scopeName, Definition *container); + void writeTagFile(FTextStream &); bool declVisible() const; void addMemberGroup(MemberGroup *mg); void setInGroup(bool inGroup) { m_inGroup=inGroup; } diff --git a/src/msc.cpp b/src/msc.cpp index ebbba0f..f9e919c 100644 --- a/src/msc.cpp +++ b/src/msc.cpp @@ -74,6 +74,7 @@ static bool convertMapFile(FTextStream &t,const char *mapName,const QCString rel t << externalRef(relPath,df->ref(),TRUE); if (!df->file().isEmpty()) t << df->file() << Doxygen::htmlFileExtension; if (!df->anchor().isEmpty()) t << "#" << df->anchor(); + delete df; } else { diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 2aa5728..8580a2e 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -259,6 +259,85 @@ bool NamespaceDef::hasDetailedDescription() const !documentation().isEmpty()); } +void NamespaceDef::writeTagFile(FTextStream &tagFile) +{ + tagFile << " <compound kind=\"namespace\">" << endl; + tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; + tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; + QCString idStr = id(); + if (!idStr.isEmpty()) + { + tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl; + } + QListIterator<LayoutDocEntry> eli( + LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace)); + LayoutDocEntry *lde; + for (eli.toFirst();(lde=eli.current());++eli) + { + switch (lde->kind()) + { + case LayoutDocEntry::NamespaceNestedNamespaces: + { + if (namespaceSDict) + { + SDict<NamespaceDef>::Iterator ni(*namespaceSDict); + NamespaceDef *nd; + for (ni.toFirst();(nd=ni.current());++ni) + { + if (nd->isLinkableInProject()) + { + tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl; + } + } + } + } + break; + case LayoutDocEntry::NamespaceClasses: + { + if (classSDict) + { + SDict<ClassDef>::Iterator ci(*classSDict); + ClassDef *cd; + for (ci.toFirst();(cd=ci.current());++ci) + { + if (cd->isLinkableInProject()) + { + tagFile << " <class kind=\"" << cd->compoundTypeString() + << "\">" << convertToXML(cd->name()) << "</class>" << endl; + } + } + } + } + case LayoutDocEntry::MemberDecl: + { + LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde; + MemberList * ml = getMemberList(lmd->type); + if (ml) + { + ml->writeTagFile(tagFile); + } + } + break; + case LayoutDocEntry::MemberGroups: + { + if (memberGroupSDict) + { + MemberGroupSDict::Iterator mgli(*memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->writeTagFile(tagFile); + } + } + } + break; + default: + break; + } + } + writeDocAnchorsToTagFile(tagFile); + tagFile << " </compound>" << endl; +} void NamespaceDef::writeDetailedDescription(OutputList &ol,const QCString &title) { @@ -496,19 +575,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol) Doxygen::searchIndex->addWord(localName(),TRUE); } - bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty(); - if (generateTagFile) - { - Doxygen::tagFile << " <compound kind=\"namespace\">" << endl; - Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; - Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl; - QCString idStr = id(); - if (!idStr.isEmpty()) - { - Doxygen::tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl; - } - } - Doxygen::indexList->addIndexItem(this,0); //---------------------------------------- start flexible part ------------------------------- @@ -619,12 +685,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol) endFileWithNavPath(this,ol); - if (generateTagFile) - { - writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </compound>" << endl; - } - if (Config_getBool("SEPARATE_MEMBER_PAGES")) { MemberList *allMemberList = getMemberList(MemberListType_allMembersList); @@ -939,10 +999,6 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title, name = nd->displayName(); } ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name); - if (!Config_getString("GENERATE_TAGFILE").isEmpty() && nd->isLinkableInProject()) - { - Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl; - } ol.endMemberItem(); if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { diff --git a/src/namespacedef.h b/src/namespacedef.h index ceb3bd7..800f639 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -33,6 +33,7 @@ class MemberDef; class NamespaceList; class MemberGroupSDict; class NamespaceSDict; +class FTextStream; /** A model of a namespace symbol. */ class NamespaceDef : public Definition @@ -51,6 +52,7 @@ class NamespaceDef : public Definition void writeDocumentation(OutputList &ol); void writeMemberPages(OutputList &ol); void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const; + void writeTagFile(FTextStream &); void insertClass(ClassDef *cd); void insertNamespace(NamespaceDef *nd); diff --git a/src/pagedef.cpp b/src/pagedef.cpp index e75327c..919a2d7 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -99,6 +99,30 @@ bool PageDef::hasParentPage() const getOuterScope()->definitionType()==Definition::TypePage; } +void PageDef::writeTagFile(FTextStream &tagFile) +{ + bool found = name()=="citelist"; + QDictIterator<RefList> rli(*Doxygen::xrefLists); + RefList *rl; + for (rli.toFirst();(rl=rli.current()) && !found;++rli) + { + if (rl->listName()==name()) + { + found=TRUE; + break; + } + } + if (!found) // not one of the generated related pages + { + tagFile << " <compound kind=\"page\">" << endl; + tagFile << " <name>" << name() << "</name>" << endl; + tagFile << " <title>" << convertToXML(title()) << "</title>" << endl; + tagFile << " <filename>" << convertToXML(getOutputFileBase()) << "</filename>" << endl; + writeDocAnchorsToTagFile(tagFile); + tagFile << " </compound>" << endl; + } +} + void PageDef::writeDocumentation(OutputList &ol) { static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); @@ -200,30 +224,6 @@ void PageDef::writeDocumentation(OutputList &ol) ol.popGeneratorState(); //1.} - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - bool found = name()=="citelist"; - QDictIterator<RefList> rli(*Doxygen::xrefLists); - RefList *rl; - for (rli.toFirst();(rl=rli.current()) && !found;++rli) - { - if (rl->listName()==name()) - { - found=TRUE; - break; - } - } - if (!found) // not one of the generated related pages - { - Doxygen::tagFile << " <compound kind=\"page\">" << endl; - Doxygen::tagFile << " <name>" << name() << "</name>" << endl; - Doxygen::tagFile << " <title>" << convertToXML(title()) << "</title>" << endl; - Doxygen::tagFile << " <filename>" << getOutputFileBase() << "</filename>" << endl; - writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </compound>" << endl; - } - } - Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title())); } diff --git a/src/pagedef.h b/src/pagedef.h index 890829e..694d081 100644 --- a/src/pagedef.h +++ b/src/pagedef.h @@ -23,6 +23,7 @@ class PageSDict; class OutputList; +class FTextStream; /** @brief A model of a page symbol. */ class PageDef : public Definition @@ -64,6 +65,7 @@ class PageDef : public Definition QCString displayName(bool=TRUE) const { return !m_title.isEmpty() ? m_title : Definition::name(); } void writeDocumentation(OutputList &ol); + void writeTagFile(FTextStream &); private: void setNestingLevel(int l); diff --git a/src/plantuml.cpp b/src/plantuml.cpp index 18f028b..5e5bd98 100644 --- a/src/plantuml.cpp +++ b/src/plantuml.cpp @@ -20,7 +20,7 @@ #include <qdir.h> -//static const int maxCmdLine = 40960; +static const int maxCmdLine = 40960; QCString writePlantUMLSource(const QCString &outDir,const QCString &fileName,const QCString &content) { @@ -56,7 +56,24 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp static QCString plantumlJarPath = Config_getString("PLANTUML_JAR_PATH"); QCString pumlExe = "java"; - QCString pumlArgs = "-Djava.awt.headless=true -jar \""+plantumlJarPath+"plantuml.jar\" "; + QCString pumlArgs = ""; + + QStrList &pumlIncludePathList = Config_getList("PLANTUML_INCLUDE_PATH"); + char *s=pumlIncludePathList.first(); + if (s) + { + pumlArgs += "-Dplantuml.include.path=\""; + pumlArgs += s; + s = pumlIncludePathList.next(); + } + while (s) + { + pumlArgs += portable_pathListSeparator(); + pumlArgs += s; + s = pumlIncludePathList.next(); + } + if (pumlIncludePathList.first()) pumlArgs += "\" "; + pumlArgs += "-Djava.awt.headless=true -jar \""+plantumlJarPath+"plantuml.jar\" "; pumlArgs+="-o \""; pumlArgs+=outDir; pumlArgs+="\" "; @@ -79,19 +96,31 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp pumlArgs+=" \""; pumlArgs+=baseName; pumlArgs+=".pu\" "; + pumlArgs+="-charset " + Config_getString("INPUT_ENCODING") + " "; int exitCode; //printf("*** running: %s %s outDir:%s %s\n",pumlExe.data(),pumlArgs.data(),outDir,outFile); msg("Running PlantUML on generated file %s.pu\n",baseName); portable_sysTimerStart(); if ((exitCode=portable_system(pumlExe,pumlArgs,FALSE))!=0) { - err("Problems running PlantUML. Verify that the command 'java -jar \"%splantuml.jar\" -h' works from the command line\n", - plantumlJarPath.data()); + err("Problems running PlantUML. Verify that the command 'java -jar \"%splantuml.jar\" -h' works from the command line. Exit code: %d\n", + plantumlJarPath.data(),exitCode); } else if (Config_getBool("DOT_CLEANUP")) { QFile(QCString(baseName)+".pu").remove(); } portable_sysTimerStop(); + if ( (format==PUML_EPS) && (Config_getBool("USE_PDFLATEX")) ) + { + QCString epstopdfArgs(maxCmdLine); + epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",baseName,baseName); + portable_sysTimerStart(); + if (exitCode=portable_system("epstopdf",epstopdfArgs)!=0) + { + err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode); + } + portable_sysTimerStop(); + } } diff --git a/src/portable.cpp b/src/portable.cpp index 258c50f..7f6be6e 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -169,10 +169,16 @@ int portable_system(const char *command,const char *args,bool commandHasConsole) else if (sInfo.hProcess) /* executable was launched, wait for it to finish */ { WaitForSingleObject(sInfo.hProcess,INFINITE); + /* get process exit code */ + DWORD exitCode; + if (!GetExitCodeProcess(sInfo.hProcess,&exitCode)) + { + exitCode = -1; + } CloseHandle(sInfo.hProcess); + return exitCode; } } - return 0; #endif } @@ -207,6 +207,7 @@ class DefineManager if (dpf==0) { dpf = new DefinesPerFile; + m_fileMap.insert(fileName,dpf); } dpf->addDefine(def); } @@ -223,6 +224,7 @@ class DefineManager if (dpf==0) { dpf = new DefinesPerFile; + m_fileMap.insert(fromFileName,dpf); } dpf->addInclude(toFileName); } @@ -2283,6 +2285,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } <DefName>{ID}/("\\\n")*"(" { // define with argument //printf("Define() `%s'\n",yytext); + delete g_argDict; g_argDict = new QDict<int>(31); g_argDict->setAutoDelete(TRUE); g_defArgs = 0; diff --git a/src/qhp.cpp b/src/qhp.cpp index 9e6cc5d..757f547 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -53,7 +53,7 @@ static QCString makeRef(const char * withoutExtension, const char * anchor) return result+"#"+anchor; } -Qhp::Qhp() : m_prevSectionLevel(0), m_sectionLevel(0) +Qhp::Qhp() : m_prevSectionLevel(0), m_sectionLevel(0), m_skipMainPageSection(FALSE) { m_doc.setIndentLevel(0); m_toc.setIndentLevel(2); @@ -177,14 +177,13 @@ void Qhp::finalize() void Qhp::incContentsDepth() { m_sectionLevel++; - //printf("Qhp::incContentsDepth() %d->%d\n",m_sectionLevel-1,m_sectionLevel); } void Qhp::decContentsDepth() { - //printf("Qhp::decContentsDepth() %d->%d\n",m_sectionLevel,m_sectionLevel-1); - if (m_sectionLevel <= 0) + if (m_sectionLevel<=0 || (m_sectionLevel==1 && m_skipMainPageSection)) { + m_skipMainPageSection=FALSE; return; } m_sectionLevel--; @@ -208,6 +207,7 @@ void Qhp::addContentsItem(bool /*isDir*/, const char * name, setPrevSection(name, f, anchor, m_sectionLevel); // Close sections as needed + //printf("Qhp::addContentsItem() closing %d sections\n",diff); for (; diff > 0; diff--) { m_toc.close("section"); @@ -331,6 +331,10 @@ void Qhp::handlePrevSection() m_toc.openClose("section", attributes); } } + else + { + m_skipMainPageSection=TRUE; + } clearPrevSection(); } @@ -64,8 +64,7 @@ class Qhp : public IndexIntf int m_prevSectionLevel; int m_sectionLevel; - //QCString m_prevIdName; - //QCString m_prevIdRef; + bool m_skipMainPageSection; }; #endif // DOXYGEN_QHP_H diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 5e27137..a11e42f 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -299,11 +299,12 @@ void RTFDocVisitor::visit(DocVerbatim *s) static int mscindex = 1; QCString baseName(4096); - baseName.sprintf("%s%d", + baseName.sprintf("%s%d%s", (Config_getString("RTF_OUTPUT")+"/inline_mscgraph_").data(), - mscindex++ + mscindex++, + ".msc" ); - QFile file(baseName+".msc"); + QFile file(baseName); if (!file.open(IO_WriteOnly)) { err("Could not open file %s for writing\n",baseName.data()); @@ -1685,7 +1686,7 @@ void RTFDocVisitor::writeMscFile(const QCString &fileName) baseName=baseName.right(baseName.length()-i-1); } QCString outDir = Config_getString("RTF_OUTPUT"); - writeMscGraphFromFile(fileName+".msc",outDir,baseName,MSC_BITMAP); + writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP); if (!m_lastIsPara) m_t << "\\par" << endl; m_t << "{" << endl; m_t << rtf_Style_Reset; @@ -1705,7 +1706,7 @@ void RTFDocVisitor::writeDiaFile(const QCString &fileName) baseName=baseName.right(baseName.length()-i-1); } QCString outDir = Config_getString("RTF_OUTPUT"); - writeDiaGraphFromFile(fileName+".dia",outDir,baseName,DIA_BITMAP); + writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP); if (!m_lastIsPara) m_t << "\\par" << endl; m_t << "{" << endl; m_t << rtf_Style_Reset; diff --git a/src/scanner.l b/src/scanner.l index 8370f13..716dc6a 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2245,7 +2245,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) <FindMembers>"Q_OBJECT" { // Qt object macro } <FindMembers>"Q_PROPERTY" { // Qt property declaration - //current->protection = protection = Public ; // see bug734245 + current->protection = Public ; // see bug734245 & bug735462 current->mtype = mtype = Property; current->type.resize(0); BEGIN(QtPropType); @@ -2444,7 +2444,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } <StaticAssert>"(" { lastSkipRoundContext = FindMembers; - roundCount=1; + roundCount=0; BEGIN(SkipRound); } <StaticAssert>{BN}+ { lineCount(); } diff --git a/src/searchindex.cpp b/src/searchindex.cpp index a550eb1..27674c2 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -444,7 +444,7 @@ SearchIndexExternal::~SearchIndexExternal() static QCString definitionToName(Definition *ctx) { - if (ctx->definitionType()==Definition::TypeMember) + if (ctx && ctx->definitionType()==Definition::TypeMember) { MemberDef *md = (MemberDef*)ctx; if (md->isFunction()) diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 23b8f13..4b21047 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -95,7 +95,7 @@ class TagMemberInfo class TagClassInfo { public: - enum Kind { Class, Struct, Union, Interface, Exception, Protocol, Category }; + enum Kind { Class, Struct, Union, Interface, Exception, Protocol, Category, Enum, Service, Singleton }; TagClassInfo() { bases=0, templateArguments=0; members.setAutoDelete(TRUE); isObjC=FALSE; } ~TagClassInfo() { delete bases; delete templateArguments; } QCString name; @@ -301,6 +301,12 @@ class TagFileParser : public QXmlDefaultHandler m_curClass->kind = TagClassInfo::Interface; m_state = InClass; } + else if (kind=="enum") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Enum; + m_state = InClass; + } else if (kind=="exception") { m_curClass = new TagClassInfo; @@ -319,6 +325,18 @@ class TagFileParser : public QXmlDefaultHandler m_curClass->kind = TagClassInfo::Category; m_state = InClass; } + else if (kind=="service") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Service; + m_state = InClass; + } + else if (kind=="singleton") + { + m_curClass = new TagClassInfo; + m_curClass->kind = TagClassInfo::Singleton; + m_state = InClass; + } else if (kind=="file") { m_curFile = new TagFileInfo; @@ -1286,9 +1304,12 @@ void TagFileParser::buildLists(Entry *root) case TagClassInfo::Struct: ce->spec = Entry::Struct; break; case TagClassInfo::Union: ce->spec = Entry::Union; break; case TagClassInfo::Interface: ce->spec = Entry::Interface; break; + case TagClassInfo::Enum: ce->spec = Entry::Enum; break; case TagClassInfo::Exception: ce->spec = Entry::Exception; break; case TagClassInfo::Protocol: ce->spec = Entry::Protocol; break; case TagClassInfo::Category: ce->spec = Entry::Category; break; + case TagClassInfo::Service: ce->spec = Entry::Service; break; + case TagClassInfo::Singleton: ce->spec = Entry::Singleton; break; } ce->name = tci->name; if (tci->kind==TagClassInfo::Protocol) diff --git a/src/template.cpp b/src/template.cpp index ec8554b..942d833 100644 --- a/src/template.cpp +++ b/src/template.cpp @@ -1165,7 +1165,7 @@ class FilterAlphaIndex } static QCString keyToLabel(uint startLetter) { - char s[10]; + char s[11]; // 0x12345678 + '\0' if (startLetter>0x20 && startLetter<=0x7f) // printable ASCII character { s[0]=tolower((char)startLetter); @@ -1319,7 +1319,15 @@ class FilterDivisibleBy } if (v.type()==TemplateVariant::Integer && n.type()==TemplateVariant::Integer) { - return TemplateVariant((v.toInt()%n.toInt())==0); + int ni = n.toInt(); + if (ni>0) + { + return TemplateVariant((v.toInt()%ni)==0); + } + else + { + return TemplateVariant(FALSE); + } } else { @@ -2395,7 +2403,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const warn(m_templateName,m_line,"using . on an object '%s' is not an struct or list",objName.data()); return TemplateVariant(); } - } while (i!=-1); + } return v; } } @@ -2852,7 +2860,7 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange> { public: TemplateNodeRange(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) - : TemplateNodeCreator<TemplateNodeRange>(parser,parent,line) + : TemplateNodeCreator<TemplateNodeRange>(parser,parent,line), m_down(FALSE) { TRACE(("{TemplateNodeRange(%s)\n",data.data())); QCString start,end; @@ -3022,7 +3030,7 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor> { public: TemplateNodeFor(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) - : TemplateNodeCreator<TemplateNodeFor>(parser,parent,line) + : TemplateNodeCreator<TemplateNodeFor>(parser,parent,line), m_reversed(FALSE) { TRACE(("{TemplateNodeFor(%s)\n",data.data())); QCString exprStr; @@ -3430,7 +3438,7 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate> { public: TemplateNodeCreate(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) - : TemplateNodeCreator<TemplateNodeCreate>(parser,parent,line) + : TemplateNodeCreator<TemplateNodeCreate>(parser,parent,line), m_templateExpr(0), m_fileExpr(0) { TRACE(("TemplateNodeCreate(%s)\n",data.data())); ExpressionParser ep(parser,line); @@ -4005,7 +4013,7 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers> { public: TemplateNodeMarkers(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) - : TemplateNodeCreator<TemplateNodeMarkers>(parser,parent,line) + : TemplateNodeCreator<TemplateNodeMarkers>(parser,parent,line), m_listExpr(0), m_patternExpr(0) { TRACE(("{TemplateNodeMarkers(%s)\n",data.data())); int i = data.find(" in "); diff --git a/src/translator_br.h b/src/translator_br.h index b381495..b7bd604 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -15,26 +15,30 @@ * Thanks to Jorge Ramos, Fernando Carijo and others for their contributions. * * History: - * 20110628: - * - Updated to 1.7.5; - * 20100531: - * - Updated to 1.6.3; - * 20091218: - * - Updated to 1.6.1; - * - Copyright year updated; - * - Translation updates suggested by Fernando Carijó added; - * 20080709: + * 20131129: + * - Updated to 1.8.5; + * - Translation in the method trFileMembers() fixed; + * - Translation in the method trEnumerationValues() fixed; + * 20110628: + * - Updated to 1.7.5; + * 20100531: + * - Updated to 1.6.3; + * 20091218: + * - Updated to 1.6.1; + * - Copyright year updated; + * - Translation updates suggested by Fernando Carijó added; + * 20080709: * - References to MAX_DOT_GRAPH_HEIGHT removed from trLegendDocs(). - * 20080206: - * - Method trTypeContraints() renamed to trTypeConstraints(). - * 20071216: + * 20080206: + * - Method trTypeContraints() renamed to trTypeConstraints(). + * 20071216: * - New methods since 1.5.4 updated. - * Previous history removed from this version. + * Previous history removed from this version. */ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian : public TranslatorAdapter_1_8_0 +class TranslatorBrazilian : public Translator { public: @@ -194,7 +198,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_8_0 } else { - return "Arquivos Membros"; + return "Membros dos Arquivos"; } } @@ -432,7 +436,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_8_0 * list of (global) variables */ virtual QCString trEnumerationValues() - { return "Valores enumerados"; } + { return "Valores de enumerações"; } /*! This is used in the documentation of a file before the list of * documentation blocks for defines @@ -1834,5 +1838,185 @@ class TranslatorBrazilian : public TranslatorAdapter_1_8_0 /*! Header for the graph showing the directory dependencies */ virtual QCString trDirDepGraph(const char *name) { return QCString("Grafo de dependências do diretório ")+name+":"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.8.0 +////////////////////////////////////////////////////////////////////////// + + /*! Detail level selector shown for hierarchical indices */ + virtual QCString trDetailLevel() + { return "nível de detalhes"; } + + /*! Section header for list of template parameters */ + virtual QCString trTemplateParameters() + { return "Parâmetros de template"; } + + /*! Used in dot graph when UML_LOOK is enabled and there are many fields */ + virtual QCString trAndMore(const QCString &number) + { return "e "+number+" mais..."; } + + /*! Used file list for a Java enum */ + virtual QCString trEnumGeneratedFromFiles(bool single) + { QCString result = "A documentação para esta enumeração foi gerada a partir"; + if (single) { + result += "do seguinte arquivo:"; + } else { + result += "dos seguintes arquivos:"; + } + return result; + } + + /*! Header of a Java enum page (Java enums are represented as classes). */ + virtual QCString trEnumReference(const char *name) + { + QCString result = "Referência da enumeração "; + return result + name; + } + + /*! Used for a section containing inherited members */ + virtual QCString trInheritedFrom(const char *members,const char *what) + { return QCString(members)+" herdados de "+what; } + + /*! Header of the sections with inherited members specific for the + * base class(es) + */ + virtual QCString trAdditionalInheritedMembers() + { return "Outros membros herdados"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.8.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a tooltip for the toggle button that appears in the + * navigation tree in the HTML output when GENERATE_TREEVIEW is + * enabled. This tooltip explains the meaning of the button. + */ + virtual QCString trPanelSynchronisationTooltip(bool enable) + { + QCString opt = enable ? "ativar" : "desativar"; + return "clique para "+opt+" a sincronização do painel"; + } + + /*! Used in a method of an Objective-C class that is declared in a + * a category. Note that the @1 marker is required and is replaced + * by a link. + */ + virtual QCString trProvidedByCategory() + { + return "Provido pela categoria @1."; + } + + /*! Used in a method of an Objective-C category that extends a class. + * Note that the @1 marker is required and is replaced by a link to + * the class method. + */ + virtual QCString trExtendsClass() + { + return "estende a classe @1."; + } + + /*! Used as the header of a list of class methods in Objective-C. + * These are similar to static public member functions in C++. + */ + virtual QCString trClassMethods() + { + return "Métodos de classe"; + } + + /*! Used as the header of a list of instance methods in Objective-C. + * These are similar to public member functions in C++. + */ + virtual QCString trInstanceMethods() + { + return "Métodos de instância"; + } + + /*! Used as the header of the member functions of an Objective-C class. + */ + virtual QCString trMethodDocumentation() + { + return "Documentação do método"; + } + + /*! Used as the title of the design overview picture created for the + * VHDL output. + */ + virtual QCString trDesignOverview() + { + // I'm not sure how to accurately translate it + return "Visão geral do design"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.8.4 +////////////////////////////////////////////////////////////////////////// + + /** old style UNO IDL services: implemented interfaces */ + virtual QCString trInterfaces() + { return "Interfaces Exportadas"; } + + /** old style UNO IDL services: inherited services */ + virtual QCString trServices() + { return "Serviços Incluídos"; } + + /** UNO IDL constant groups */ + virtual QCString trConstantGroups() + { return "Grupos de Constantes"; } + + /** UNO IDL constant groups */ + virtual QCString trConstantGroupReference(const char *namespaceName) + { + QCString result = "Referência do grupo de constantes "; + result += namespaceName; + return result; + } + + /** UNO IDL service page title */ + virtual QCString trServiceReference(const char *sName) + { + QCString result = "Referência do serviço "; + result += sName; + return result; + } + + /** UNO IDL singleton page title */ + virtual QCString trSingletonReference(const char *sName) + { + QCString result = "Referência do Singleton "; + result += sName; + return result; + } + + /** UNO IDL service page */ + virtual QCString trServiceGeneratedFromFiles(bool single) + { + // single is true implies a single file + QCString result=(QCString)"A documentação para este serviço " + "foi gerada a partir "; + if (single) { + result+="do seguinte arquivo:"; + } else { + result+="dos: seguintes arquivos:"; + } + return result; + } + + /** UNO IDL singleton page */ + virtual QCString trSingletonGeneratedFromFiles(bool single) + { + // single is true implies a single file + QCString result=(QCString)"A documentação para este singleton " + "foi gerada a partir "; + if (single) { + result+="do seguinte arquivo:"; + } else { + result+="dos: seguintes arquivos:"; + } + + return result; + } + +////////////////////////////////////////////////////////////////////////// }; #endif + diff --git a/src/translator_kr.h b/src/translator_kr.h index 6919763..18337a5 100644 --- a/src/translator_kr.h +++ b/src/translator_kr.h @@ -677,10 +677,10 @@ class TranslatorKorean : public Translator if (i!=numEntries-1) // not the last entry, so we need a separator { - if (i<numEntries-2) // not the fore last entry - result+=", "; - else // the fore last entry + //if (i<numEntries-2) // not the fore last entry result+=", "; + //else // the fore last entry + // result+=", "; // TODO: does the 'and' need to be translated here? } } return result; @@ -1203,9 +1203,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trClass(bool first_capital, bool singular) + virtual QCString trClass(bool, bool singular) { - QCString result((first_capital ? "클래스" : "클래스")); + QCString result("클래스"); if (!singular) result+="들"; return result; } @@ -1214,9 +1214,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trFile(bool first_capital, bool singular) + virtual QCString trFile(bool, bool singular) { - QCString result((first_capital ? "파일" : "파일")); + QCString result("파일"); if (!singular) result+="들"; return result; } @@ -1225,9 +1225,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trNamespace(bool first_capital, bool singular) + virtual QCString trNamespace(bool, bool singular) { - QCString result((first_capital ? "네임스페이스" : "네임스페이스")); + QCString result("네임스페이스"); if (!singular) result+="들"; return result; } @@ -1236,9 +1236,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trGroup(bool first_capital, bool singular) + virtual QCString trGroup(bool, bool singular) { - QCString result((first_capital ? "그룹" : "그룹")); + QCString result("그룹"); if (!singular) result+="들"; return result; } @@ -1247,9 +1247,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trPage(bool first_capital, bool singular) + virtual QCString trPage(bool, bool singular) { - QCString result((first_capital ? "페이지" : "페이지")); + QCString result("페이지"); if (!singular) result+="들"; return result; } @@ -1258,9 +1258,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trMember(bool first_capital, bool singular) + virtual QCString trMember(bool, bool singular) { - QCString result((first_capital ? "멤버" : "멤버")); + QCString result("멤버"); if (!singular) result+="들"; return result; } @@ -1269,9 +1269,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trGlobal(bool first_capital, bool singular) + virtual QCString trGlobal(bool, bool singular) { - QCString result((first_capital ? "전역" : "전역")); + QCString result("전역"); if (!singular) result+=""; return result; } @@ -1282,9 +1282,9 @@ class TranslatorKorean : public Translator /*! This text is generated when the \\author command is used and * for the author section in man pages. */ - virtual QCString trAuthor(bool first_capital, bool singular) + virtual QCString trAuthor(bool, bool singular) { - QCString result((first_capital ? "작성자" : "작성자")); + QCString result("작성자"); if (!singular) result+="들"; return result; } @@ -1509,9 +1509,9 @@ class TranslatorKorean : public Translator /*! This returns the word directory with or without starting capital * (\a first_capital) and in sigular or plural form (\a singular). */ - virtual QCString trDir(bool first_capital, bool singular) + virtual QCString trDir(bool, bool singular) { - QCString result((first_capital ? "디렉토리" : "디렉토리")); + QCString result("디렉토리"); if (singular) result+=""; else result+="들"; return result; } @@ -1690,9 +1690,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trModule(bool first_capital, bool singular) + virtual QCString trModule(bool, bool singular) { - QCString result((first_capital ? "모듈" : "모듈")); + QCString result("모듈"); if (!singular) result+="들"; return result; } @@ -1725,9 +1725,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trType(bool first_capital, bool singular) + virtual QCString trType(bool, bool singular) { - QCString result((first_capital ? "타입" : "타입")); + QCString result("타입"); if (!singular) result+="들"; return result; } @@ -1735,9 +1735,9 @@ class TranslatorKorean : public Translator * be followed by a single name or by a list of names * of the category. */ - virtual QCString trSubprogram(bool first_capital, bool singular) + virtual QCString trSubprogram(bool, bool singular) { - QCString result((first_capital ? "서브프로그램" : "서브프로그램")); + QCString result("서브프로그램"); if (!singular) result+="들"; return result; } diff --git a/src/translator_lt.h b/src/translator_lt.h index 000dc6e..174170e 100644 --- a/src/translator_lt.h +++ b/src/translator_lt.h @@ -197,7 +197,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6 } else { - return "Globalūs Nariai"; + return "Failų Nariai"; } } diff --git a/src/translator_pt.h b/src/translator_pt.h index 95a62b0..13422f6 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2014 by Dimitri van Heesch. + * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -24,6 +24,9 @@ * VERSION HISTORY * --------------- * History: + * 20131129: + * - Updated to 1.8.5; + * - Translation in the method trFileMembers() fixed; * 20110628: * - Updated to 1.7.5; * - All obsolete methods have been removed; @@ -52,7 +55,7 @@ #define TRANSLATOR_PT_H -class TranslatorPortuguese : public TranslatorAdapter_1_8_0 +class TranslatorPortuguese : public Translator { public: @@ -216,7 +219,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_8_0 } else { - return "Ficheiros membro"; + return "Membros dos Ficheiros"; } } @@ -442,7 +445,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_8_0 * list of (global) variables */ QCString trEnumerationValues() - { return "Valores da enumeração"; } + { return "Valores de enumerações"; } /*! This is used in the documentation of a file before the list of * documentation blocks for defines @@ -1835,6 +1838,185 @@ class TranslatorPortuguese : public TranslatorAdapter_1_8_0 /*! Header for the graph showing the directory dependencies */ virtual QCString trDirDepGraph(const char *name) { return QCString("Grafo de dependências do directório ")+name+":"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.8.0 +////////////////////////////////////////////////////////////////////////// + + /*! Detail level selector shown for hierarchical indices */ + virtual QCString trDetailLevel() + { return "nível de detalhes"; } + + /*! Section header for list of template parameters */ + virtual QCString trTemplateParameters() + { return "Parâmetros de template"; } + + /*! Used in dot graph when UML_LOOK is enabled and there are many fields */ + virtual QCString trAndMore(const QCString &number) + { return "e "+number+" mais..."; } + + /*! Used file list for a Java enum */ + virtual QCString trEnumGeneratedFromFiles(bool single) + { QCString result = "A documentação para esta enumeração foi gerada a partir"; + if (single) { + result += "do seguinte ficheiro:"; + } else { + result += "dos seguintes ficheiros:"; + } + return result; + } + + /*! Header of a Java enum page (Java enums are represented as classes). */ + virtual QCString trEnumReference(const char *name) + { + QCString result = "Referência da enumeração "; + return result + name; + } + + /*! Used for a section containing inherited members */ + virtual QCString trInheritedFrom(const char *members,const char *what) + { return QCString(members)+" herdados de "+what; } + + /*! Header of the sections with inherited members specific for the + * base class(es) + */ + virtual QCString trAdditionalInheritedMembers() + { return "Outros membros herdados"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.8.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a tooltip for the toggle button that appears in the + * navigation tree in the HTML output when GENERATE_TREEVIEW is + * enabled. This tooltip explains the meaning of the button. + */ + virtual QCString trPanelSynchronisationTooltip(bool enable) + { + QCString opt = enable ? "ativar" : "desativar"; + return "clique para "+opt+" a sincronização do painel"; + } + + /*! Used in a method of an Objective-C class that is declared in a + * a category. Note that the @1 marker is required and is replaced + * by a link. + */ + virtual QCString trProvidedByCategory() + { + return "Provido pela categoria @1."; + } + + /*! Used in a method of an Objective-C category that extends a class. + * Note that the @1 marker is required and is replaced by a link to + * the class method. + */ + virtual QCString trExtendsClass() + { + return "estende a classe @1."; + } + + /*! Used as the header of a list of class methods in Objective-C. + * These are similar to static public member functions in C++. + */ + virtual QCString trClassMethods() + { + return "Métodos de classe"; + } + + /*! Used as the header of a list of instance methods in Objective-C. + * These are similar to public member functions in C++. + */ + virtual QCString trInstanceMethods() + { + return "Métodos de instância"; + } + + /*! Used as the header of the member functions of an Objective-C class. + */ + virtual QCString trMethodDocumentation() + { + return "Documentação do método"; + } + + /*! Used as the title of the design overview picture created for the + * VHDL output. + */ + virtual QCString trDesignOverview() + { + // I'm not sure how to accurately translate it + return "Visão geral do design"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.8.4 +////////////////////////////////////////////////////////////////////////// + + /** old style UNO IDL services: implemented interfaces */ + virtual QCString trInterfaces() + { return "Interfaces Exportadas"; } + + /** old style UNO IDL services: inherited services */ + virtual QCString trServices() + { return "Serviços Incluídos"; } + + /** UNO IDL constant groups */ + virtual QCString trConstantGroups() + { return "Grupos de Constantes"; } + + /** UNO IDL constant groups */ + virtual QCString trConstantGroupReference(const char *namespaceName) + { + QCString result = "Referência do grupo de constantes "; + result += namespaceName; + return result; + } + + /** UNO IDL service page title */ + virtual QCString trServiceReference(const char *sName) + { + QCString result = "Referência do serviço "; + result += sName; + return result; + } + + /** UNO IDL singleton page title */ + virtual QCString trSingletonReference(const char *sName) + { + QCString result = "Referência do Singleton "; + result += sName; + return result; + } + + /** UNO IDL service page */ + virtual QCString trServiceGeneratedFromFiles(bool single) + { + // single is true implies a single file + QCString result=(QCString)"A documentação para este serviço " + "foi gerada a partir "; + if (single) { + result+="do seguinte ficheiro:"; + } else { + result+="dos: seguintes ficheiros:"; + } + return result; + } + + /** UNO IDL singleton page */ + virtual QCString trSingletonGeneratedFromFiles(bool single) + { + // single is true implies a single file + QCString result=(QCString)"A documentação para este singleton " + "foi gerada a partir "; + if (single) { + result+="do seguinte ficheiro:"; + } else { + result+="dos: seguintes ficheiros:"; + } + + return result; + } + +////////////////////////////////////////////////////////////////////////// }; #endif diff --git a/src/translator_ru.h b/src/translator_ru.h index 54174d7..c06d911 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -1605,7 +1605,7 @@ class TranslatorRussian : public Translator } else { - if (isTemplate) result+=" Шаблон "; + result+=" Шаблон "; switch(compType) { case ClassDef::Class: result+="модуля"; break; diff --git a/src/translator_sr.h b/src/translator_sr.h index f58ac13..09b6534 100644 --- a/src/translator_sr.h +++ b/src/translator_sr.h @@ -188,14 +188,14 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0 /*! This is put above each page as a link to all members of files. */ virtual QCString trFileMembers() { - if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) - { - return "Članovi datoteke"; - } - else - { - return "Članovi datoteke"; - } + //if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + //{ + // return "Članovi datoteke"; // TODO: translate me + //} + //else + //{ + return "Članovi datoteke"; + //} } /*! This is put above each page as a link to all related pages. */ diff --git a/src/translator_tw.h b/src/translator_tw.h index 581d7fe..9da3365 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -749,8 +749,7 @@ class TranslatorChinesetraditional : public Translator /*! This is put at the bottom of a class documentation page and is * followed by a list of files that were used to generate the page. */ - virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, - bool single) + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,bool) { // here s is one of " Class", " Struct" or " Union" // single is true implies a single file QCString result=(QCString)"此"; @@ -766,7 +765,7 @@ class TranslatorChinesetraditional : public Translator default: break; } result+=" 文件是由下列檔案中產生"; - if (single) result+=":"; else result+=":"; + result+=":"; return result; } @@ -1948,21 +1947,21 @@ class TranslatorChinesetraditional : public Translator return result; } /** UNO IDL service page */ - virtual QCString trServiceGeneratedFromFiles(bool single) + virtual QCString trServiceGeneratedFromFiles(bool) { // single is true implies a single file QCString result=(QCString)"本服務的文件由以下的檔案" "所產生"; - if (single) result+=":"; else result+=":"; + result+=":"; return result; } /** UNO IDL singleton page */ - virtual QCString trSingletonGeneratedFromFiles(bool single) + virtual QCString trSingletonGeneratedFromFiles(bool) { // single is true implies a single file QCString result=(QCString)"本singleton的文件由下面的檔案" "所產生"; - if (single) result+=":"; else result+=":"; + result+=":"; return result; } diff --git a/src/translator_ua.h b/src/translator_ua.h index b7ca86a..45efd6e 100644 --- a/src/translator_ua.h +++ b/src/translator_ua.h @@ -1596,7 +1596,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4 } else { - if (isTemplate) result+=" Шаблон "; + result+=" Шаблон "; switch(compType) { case ClassDef::Class: result+="модуля"; break; diff --git a/src/translator_vi.h b/src/translator_vi.h index 54c68b8..dd0a8f1 100644 --- a/src/translator_vi.h +++ b/src/translator_vi.h @@ -749,8 +749,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0 /*! This is put at the bottom of a class documentation page and is * followed by a list of files that were used to generate the page. */ - virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, - bool single) + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,bool) { // here s is one of " Class", " Struct" or " Union" // single is true implies a single file QCString result=(QCString)"Thông tin cho "; @@ -766,7 +765,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0 default: break; } result+=" được biên soạn từ các file sau đây"; - if (single) result+=":"; else result+=":"; + result+=":"; return result; } @@ -1501,10 +1500,9 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0 /*! This returns the word directory with or without starting capital * (\a first_capital) and in sigular or plural form (\a singular). */ - virtual QCString trDir(bool first_capital, bool singular) + virtual QCString trDir(bool first_capital, bool) { QCString result((first_capital ? "Thư mục" : "thư mục")); - if (singular) result+=""; else result+=""; return result; } diff --git a/src/util.cpp b/src/util.cpp index a524922..b313b86 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2190,7 +2190,7 @@ QCString argListToString(ArgumentList *al,bool useCanonicalType,bool showDefVals return removeRedundantWhiteSpace(result); } -QCString tempArgListToString(ArgumentList *al) +QCString tempArgListToString(ArgumentList *al,SrcLangExt lang) { QCString result; if (al==0) return result; @@ -2209,6 +2209,10 @@ QCString tempArgListToString(ArgumentList *al) { result+="in "; } + if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp) + { + result+=a->type+" "; + } result+=a->name; } else // extract name from type @@ -3232,7 +3236,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, // all arguments. ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl); Argument *srcA,*dstA; - for (;(srcA=srcAli.current(),dstA=dstAli.current());++srcAli,++dstAli) + for (;(srcA=srcAli.current()) && (dstA=dstAli.current());++srcAli,++dstAli) { if (!matchArgument(srcA,dstA,className,namespaceName, usingNamespaces,usingClasses)) @@ -3665,7 +3669,7 @@ bool matchArguments2(Definition *srcScope,FileDef *srcFileScope,ArgumentList *sr // all arguments. ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl); Argument *srcA,*dstA; - for (;(srcA=srcAli.current(),dstA=dstAli.current());++srcAli,++dstAli) + for (;(srcA=srcAli.current()) && (dstA=dstAli.current());++srcAli,++dstAli) { if (!matchArgument2(srcScope,srcFileScope,srcA, dstScope,dstFileScope,dstA) @@ -229,7 +229,7 @@ QCString removeRedundantWhiteSpace(const QCString &s); QCString argListToString(ArgumentList *al,bool useCanonicalType=FALSE,bool showDefVals=TRUE); -QCString tempArgListToString(ArgumentList *al); +QCString tempArgListToString(ArgumentList *al,SrcLangExt lang); QCString generateMarker(int id); diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 0617ea6..ad95fd1 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -479,7 +479,11 @@ static QList<MemberDef>* getPorts(ClassDef *cd) QList<MemberDef> *portList=new QList<MemberDef>; MemberList *ml=cd->getMemberList(MemberListType_variableMembers); - if (ml==0) return NULL; + if (ml==0) + { + delete portList; + return 0; + } MemberListIterator fmni(*ml); @@ -937,9 +941,8 @@ MemberDef* VhdlDocGen::findFunction(const QList<Argument> &ql, Argument *arg,*arg1; int equ=0; - for (;(arg=ali.current());++ali) + for (;(arg=ali.current()) && (arg1=ali1.current());++ali,++ali1) { - arg1=ali1.current(); ++ali1; equ+=abs(compareString(arg->type,arg1->type)); QCString s1=arg->type; @@ -1946,6 +1949,48 @@ bool VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit return hasParams; } +void VhdlDocGen::writeTagFile(MemberDef *mdef,FTextStream &tagFile) +{ + tagFile << " <member kind=\""; + if (VhdlDocGen::isGeneric(mdef)) tagFile << "generic"; + if (VhdlDocGen::isPort(mdef)) tagFile << "port"; + if (VhdlDocGen::isEntity(mdef)) tagFile << "entity"; + if (VhdlDocGen::isComponent(mdef)) tagFile << "component"; + if (VhdlDocGen::isVType(mdef)) tagFile << "type"; + if (VhdlDocGen::isConstant(mdef)) tagFile << "constant"; + if (VhdlDocGen::isSubType(mdef)) tagFile << "subtype"; + if (VhdlDocGen::isVhdlFunction(mdef)) tagFile << "function"; + if (VhdlDocGen::isProcedure(mdef)) tagFile << "procedure"; + if (VhdlDocGen::isProcess(mdef)) tagFile << "process"; + if (VhdlDocGen::isSignals(mdef)) tagFile << "signal"; + if (VhdlDocGen::isAttribute(mdef)) tagFile << "attribute"; + if (VhdlDocGen::isRecord(mdef)) tagFile << "record"; + if (VhdlDocGen::isLibrary(mdef)) tagFile << "library"; + if (VhdlDocGen::isPackage(mdef)) tagFile << "package"; + if (VhdlDocGen::isVariable(mdef)) tagFile << "shared variable"; + if (VhdlDocGen::isFile(mdef)) tagFile << "file"; + if (VhdlDocGen::isGroup(mdef)) tagFile << "group"; + if (VhdlDocGen::isCompInst(mdef)) tagFile << "instantiation"; + if (VhdlDocGen::isAlias(mdef)) tagFile << "alias"; + if (VhdlDocGen::isCompInst(mdef)) tagFile << "configuration"; + + tagFile << "\">" << endl; + tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>" << endl; + tagFile << " <name>" << convertToXML(mdef->name()) << "</name>" << endl; + tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl; + tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>" << endl; + + if (VhdlDocGen::isVhdlFunction(mdef)) + tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>" << endl; + else if (VhdlDocGen::isProcedure(mdef)) + tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>" << endl; + else + tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>" << endl; + + mdef->writeDocAnchorsToTagFile(tagFile); + tagFile << " </member>" << endl; +} + /* writes a vhdl type declaration */ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, @@ -1967,50 +2012,6 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol, else if (gd) d=gd; else d=(Definition*)mdef; - // write tag file information of this member - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) - { - Doxygen::tagFile << " <member kind=\""; - if (VhdlDocGen::isGeneric(mdef)) Doxygen::tagFile << "generic"; - if (VhdlDocGen::isPort(mdef)) Doxygen::tagFile << "port"; - if (VhdlDocGen::isEntity(mdef)) Doxygen::tagFile << "entity"; - if (VhdlDocGen::isComponent(mdef)) Doxygen::tagFile << "component"; - if (VhdlDocGen::isVType(mdef)) Doxygen::tagFile << "type"; - if (VhdlDocGen::isConstant(mdef)) Doxygen::tagFile << "constant"; - if (VhdlDocGen::isSubType(mdef)) Doxygen::tagFile << "subtype"; - if (VhdlDocGen::isVhdlFunction(mdef)) Doxygen::tagFile << "function"; - if (VhdlDocGen::isProcedure(mdef)) Doxygen::tagFile << "procedure"; - if (VhdlDocGen::isProcess(mdef)) Doxygen::tagFile << "process"; - if (VhdlDocGen::isSignals(mdef)) Doxygen::tagFile << "signal"; - if (VhdlDocGen::isAttribute(mdef)) Doxygen::tagFile << "attribute"; - if (VhdlDocGen::isRecord(mdef)) Doxygen::tagFile << "record"; - if (VhdlDocGen::isLibrary(mdef)) Doxygen::tagFile << "library"; - if (VhdlDocGen::isPackage(mdef)) Doxygen::tagFile << "package"; - if (VhdlDocGen::isVariable(mdef)) Doxygen::tagFile << "shared variable"; - if (VhdlDocGen::isFile(mdef)) Doxygen::tagFile << "file"; - if (VhdlDocGen::isGroup(mdef)) Doxygen::tagFile << "group"; - if (VhdlDocGen::isCompInst(mdef)) Doxygen::tagFile << " instantiation"; - if (VhdlDocGen::isAlias(mdef)) Doxygen::tagFile << "alias"; - if (VhdlDocGen::isCompInst(mdef)) Doxygen::tagFile << "configuration"; - - Doxygen::tagFile << "\">" << endl; - Doxygen::tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>" << endl; - Doxygen::tagFile << " <name>" << convertToXML(mdef->name()) << "</name>" << endl; - Doxygen::tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl; - Doxygen::tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>" << endl; - - if (VhdlDocGen::isVhdlFunction(mdef)) - Doxygen::tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>" << endl; - else if (VhdlDocGen::isProcedure(mdef)) - Doxygen::tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>" << endl; - else - Doxygen::tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>" << endl; - - mdef->writeDocAnchorsToTagFile(); - Doxygen::tagFile << " </member>" << endl; - - } - // write search index info if (Doxygen::searchIndex) { diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index b9f9afb..7f87ce5 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -119,6 +119,7 @@ class VhdlDocGen static QCString getClassTitle(const ClassDef*); static void writeInlineClassLink(const ClassDef*, OutputList &ol); + static void writeTagFile(MemberDef *mdef,FTextStream &tagFile); static bool isConstraint(const MemberDef *mdef); static bool isConfig(const MemberDef *mdef); diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc index 47ecf49..f158ffb 100644 --- a/vhdlparser/VhdlParser.cc +++ b/vhdlparser/VhdlParser.cc @@ -5579,7 +5579,7 @@ if(tok) s5=tok->image.c_str(); if(tok1) - s3=tok->image.data(); + s3=tok1->image.data(); if(tok2) s3+=":="; diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj index 7a4283f..40fbd17 100644 --- a/vhdlparser/vhdlparser.jj +++ b/vhdlparser/vhdlparser.jj @@ -1402,7 +1402,7 @@ QCString interface_variable_declaration() : {Token *tok=0;Token *tok1=0;Token * s5=tok->image.c_str(); if(tok1) - s3=tok->image.data(); + s3=tok1->image.data(); if(tok2) s3+=":="; diff --git a/vhdlparser/vhdlstring.h b/vhdlparser/vhdlstring.h index ec13907..1980cf5 100644 --- a/vhdlparser/vhdlstring.h +++ b/vhdlparser/vhdlstring.h @@ -49,7 +49,7 @@ class VhdlString } ~VhdlString() { - delete[] m_str; + free(m_str); } VhdlString& append(const char *s,int size) { |