diff options
-rw-r--r-- | INSTALL | 4 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | packages/rpm/doxygen.spec | 2 | ||||
-rw-r--r-- | qtools/qfile_unix.cpp | 11 | ||||
-rw-r--r-- | qtools/qfile_win32.cpp | 11 | ||||
-rw-r--r-- | src/classdef.cpp | 14 | ||||
-rw-r--r-- | src/code.l | 36 | ||||
-rw-r--r-- | src/compound.xsd | 2 | ||||
-rw-r--r-- | src/compound_xsd.h | 2 | ||||
-rw-r--r-- | src/config.l | 4 | ||||
-rw-r--r-- | src/defgen.cpp | 2 | ||||
-rw-r--r-- | src/definition.cpp | 12 | ||||
-rw-r--r-- | src/definition.h | 5 | ||||
-rw-r--r-- | src/docparser.cpp | 4 | ||||
-rw-r--r-- | src/dot.cpp | 33 | ||||
-rw-r--r-- | src/doxygen.cpp | 88 | ||||
-rw-r--r-- | src/entry.cpp | 8 | ||||
-rw-r--r-- | src/entry.h | 3 | ||||
-rw-r--r-- | src/filedef.cpp | 2 | ||||
-rw-r--r-- | src/groupdef.cpp | 6 | ||||
-rw-r--r-- | src/htmlgen.cpp | 5 | ||||
-rw-r--r-- | src/index.cpp | 23 | ||||
-rw-r--r-- | src/memberdef.cpp | 249 | ||||
-rw-r--r-- | src/memberdef.h | 28 | ||||
-rw-r--r-- | src/membergroup.cpp | 9 | ||||
-rw-r--r-- | src/memberlist.cpp | 4 | ||||
-rw-r--r-- | src/namespacedef.cpp | 2 | ||||
-rw-r--r-- | src/scanner.l | 20 | ||||
-rw-r--r-- | src/translator_de.h | 20 | ||||
-rw-r--r-- | src/translator_dk.h | 294 | ||||
-rw-r--r-- | src/translator_ru.h | 1 | ||||
-rw-r--r-- | src/translator_tw.h | 53 | ||||
-rw-r--r-- | src/util.cpp | 38 | ||||
-rw-r--r-- | src/xmlgen.cpp | 18 |
35 files changed, 641 insertions, 378 deletions
@@ -1,7 +1,7 @@ -DOXYGEN Version 1.3.4 +DOXYGEN Version 1.3.4-20031005 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (22 September 2003) +Dimitri van Heesch (05 October 2003) @@ -1,4 +1,4 @@ -DOXYGEN Version 1.3.4 +DOXYGEN Version 1.3.4_20031005 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (22 September 2003) +Dimitri van Heesch (dimitri@stack.nl) (05 October 2003) @@ -1 +1 @@ -1.3.4 +1.3.4-20031005 diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 221396f..5ecefb9 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,6 +1,6 @@ Summary: A documentation system for C/C++. Name: doxygen -Version: 1.3.4 +Version: 1.3.4_20031005 Release: 1 Epoch: 1 Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz diff --git a/qtools/qfile_unix.cpp b/qtools/qfile_unix.cpp index e074eed..74b73d2 100644 --- a/qtools/qfile_unix.cpp +++ b/qtools/qfile_unix.cpp @@ -40,6 +40,17 @@ #include "qfile.h" #include "qfiledefs_p.h" +#if defined(_OS_MAC_) || defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_) +# define HAS_TEXT_FILEMODE // has translate/text filemode +#endif +#if defined(O_NONBLOCK) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NONBLOCK +#elif defined(O_NDELAY) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NDELAY +#endif + bool qt_file_access( const QString& fn, int t ) { if ( fn.isEmpty() ) diff --git a/qtools/qfile_win32.cpp b/qtools/qfile_win32.cpp index fd28d43..39b1fa5 100644 --- a/qtools/qfile_win32.cpp +++ b/qtools/qfile_win32.cpp @@ -23,6 +23,17 @@ #include "qfile.h" #include "qfiledefs_p.h" +#if defined(_OS_MAC_) || defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_) +# define HAS_TEXT_FILEMODE // has translate/text filemode +#endif +#if defined(O_NONBLOCK) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NONBLOCK +#elif defined(O_NDELAY) +# define HAS_ASYNC_FILEMODE +# define OPEN_ASYNC O_NDELAY +#endif + bool qt_file_access( const QString& fn, int t ) { if ( fn.isEmpty() ) diff --git a/src/classdef.cpp b/src/classdef.cpp index 8ea85c2..150ad3f 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -853,7 +853,7 @@ void ClassDef::writeDocumentation(OutputList &ol) if (Config_getBool("SEARCHENGINE")) { - Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); + Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()+Config_getString("HTML_FILE_EXTENSION")); Doxygen::searchIndex->addWord(localName().lower()); } @@ -1428,10 +1428,11 @@ void ClassDef::writeMemberList(OutputList &ol) QCString name=mi->ambiguityResolutionScope+md->name(); //ol.writeListItem(); ol.writeString(" <tr class=\"memlist\"><td>"); - Definition *bd = md->getGroupDef(); - if (bd==0) bd=cd; - ol.writeObjectLink(bd->getReference(),bd->getOutputFileBase(), - md->anchor(),name); + //Definition *bd = md->getGroupDef(); + //if (bd==0) bd=cd; + ol.writeObjectLink(md->getReference(), + md->getOutputFileBase(), + md->anchor(),name); if ( md->isFunction() || md->isSignal() || md->isSlot() || (md->isFriend() && md->argsString())) @@ -2430,8 +2431,6 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName, Debug::print(Debug::Classes,0," New template instance class %s%s\n",name().data(),templSpec.data()); templateClass = new ClassDef( fileName,startLine,name()+templSpec,ClassDef::Class); - //templateClass->setBriefDescription(briefDescription()); - //templateClass->setDocumentation(documentation()); templateClass->setTemplateMaster(this); templateClass->setOuterScope(getOuterScope()); m_templateInstances->insert(templSpec,templateClass); @@ -2486,6 +2485,7 @@ void ClassDef::addMembersToTemplateInstance(ClassDef *cd,const char *templSpec) imd->setTemplateMaster(md); imd->setDocumentation(md->documentation(),md->docFile(),md->docLine()); imd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine()); + imd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine()); imd->setMemberSpecifiers(md->getMemberSpecifiers()); insertMember(imd); //printf("Adding member=%s %s%s to class %s templSpec %s\n", @@ -355,15 +355,23 @@ static void startCodeLine() { g_currentDefinition = d; g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr); - QCString anchor; g_insideBody = FALSE; g_searchingForBody = TRUE; g_realScope = d->name().copy(); //printf("Real scope: `%s'\n",g_realScope.data()); g_bodyCurlyCount = 0; - if (g_currentMemberDef) anchor=g_currentMemberDef->getBodyAnchor(); - g_code->writeLineNumber(d->getReference(),d->getOutputFileBase(), - anchor,g_yyLineNr); + if (g_currentMemberDef) + { + g_code->writeLineNumber(g_currentMemberDef->getReference(), + g_currentMemberDef->getOutputFileBase(), + g_currentMemberDef->anchor(),g_yyLineNr); + } + else + { + g_code->writeLineNumber(d->getReference(), + d->getOutputFileBase(), + 0,g_yyLineNr); + } } else { @@ -702,13 +710,13 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, if (md) { //printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>"); - Definition *d = md->getOuterScope()==Doxygen::globalScope ? - md->getBodyDef() : md->getOuterScope(); + //Definition *d = md->getOuterScope()==Doxygen::globalScope ? + // md->getBodyDef() : md->getOuterScope(); //printf("definition %s\n",d?d->name().data():"<none>"); - if (md->getGroupDef()) d = md->getGroupDef(); - if (d && d->isLinkable() && md->isLinkable()) + //if (md->getGroupDef()) d = md->getGroupDef(); + if (md->isLinkable()) { - writeMultiLineCodeLink(ol,d->getReference(),d->getOutputFileBase(),md->getBodyAnchor(),clName); + writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName); if (g_currentMemberDef) { addDocCrossReference(g_currentMemberDef,md); @@ -770,8 +778,10 @@ static bool getLink(const char *className, } //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data()); - writeMultiLineCodeLink(ol,d->getReference(),d->getOutputFileBase(), - md->getBodyAnchor(),text ? text : memberName); + writeMultiLineCodeLink(ol,md->getReference(), + md->getOutputFileBase(), + md->anchor(), + text ? text : memberName); return TRUE; } } @@ -822,8 +832,8 @@ static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const } // write the actual link - writeMultiLineCodeLink(ol,xd->getReference(), - xd->getOutputFileBase(),xmd->getBodyAnchor(),memName); + writeMultiLineCodeLink(ol,xmd->getReference(), + xmd->getOutputFileBase(),xmd->anchor(),memName); return TRUE; } diff --git a/src/compound.xsd b/src/compound.xsd index 925f29e..f445278 100644 --- a/src/compound.xsd +++ b/src/compound.xsd @@ -38,6 +38,7 @@ </xsd:sequence> <xsd:attribute name="id" /> <xsd:attribute name="kind" type="DoxCompoundKind" /> + <xsd:attribute name="prot" type="DoxProtectionKind" /> </xsd:complexType> <xsd:complexType name="listofallmembersType"> @@ -104,6 +105,7 @@ <xsd:element name="exceptions" type="linkedTextType" minOccurs="0" /> <xsd:element name="briefdescription" type="descriptionType" minOccurs="0" /> <xsd:element name="detaileddescription" type="descriptionType" minOccurs="0" /> + <xsd:element name="inbodydescription" type="descriptionType" minOccurs="0" /> <xsd:element name="location" type="locationType" /> <xsd:element name="references" type="referenceType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="referencedby" type="referenceType" minOccurs="0" maxOccurs="unbounded" /> diff --git a/src/compound_xsd.h b/src/compound_xsd.h index f434aad..085e0a8 100644 --- a/src/compound_xsd.h +++ b/src/compound_xsd.h @@ -38,6 +38,7 @@ " </xsd:sequence>\n" " <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"kind\" type=\"DoxCompoundKind\" />\n" +" <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n" " </xsd:complexType>\n" "\n" " <xsd:complexType name=\"listofallmembersType\">\n" @@ -104,6 +105,7 @@ " <xsd:element name=\"exceptions\" type=\"linkedTextType\" minOccurs=\"0\" />\n" " <xsd:element name=\"briefdescription\" type=\"descriptionType\" minOccurs=\"0\" />\n" " <xsd:element name=\"detaileddescription\" type=\"descriptionType\" minOccurs=\"0\" />\n" +" <xsd:element name=\"inbodydescription\" type=\"descriptionType\" minOccurs=\"0\" />\n" " <xsd:element name=\"location\" type=\"locationType\" />\n" " <xsd:element name=\"references\" type=\"referenceType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"referencedby\" type=\"referenceType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" diff --git a/src/config.l b/src/config.l index b42f20d..9283238 100644 --- a/src/config.l +++ b/src/config.l @@ -1841,7 +1841,9 @@ void Config::create() cb = addBool( "SOURCE_BROWSER", "If the SOURCE_BROWSER tag is set to YES then a list of source files will \n" - "be generated. Documented entities will be cross-referenced with these sources. \n", + "be generated. Documented entities will be cross-referenced with these sources. \n" + "Note: To get rid of all source code in the generated output, make sure also \n" + "VERBATIM_HEADERS is set to NO. \n", FALSE ); cb = addBool( diff --git a/src/defgen.cpp b/src/defgen.cpp index 91a8bc6..2439b8f 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -103,7 +103,7 @@ void generateDEFForMember(MemberDef *md, t << memPrefix << "kind = '" << memType << "';" << endl; t << memPrefix << "id = '" - << def->getOutputFileBase() << "_1" << md->anchor() + << md->getOutputFileBase() << "_1" << md->anchor() << "';" << endl; t << memPrefix << "virt = "; diff --git a/src/definition.cpp b/src/definition.cpp index e0841ef..1e4f287 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -51,12 +51,13 @@ static void addToMap(const char *name,Definition *d) } //printf("******* adding symbol `%s'\n",symbolName.data()); dl->append(d); + d->setSymbolName(symbolName); } } static void removeFromMap(Definition *d) { - QCString symbolName = d->name(); + QCString symbolName = d->symbolName(); int index=symbolName.findRev("::"); if (index!=-1) symbolName=symbolName.mid(index+2); if (!symbolName.isEmpty()) @@ -510,8 +511,8 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, if (md->isFunction() || md->isSlot() || md->isPrototype() || md->isSignal() ) name+="()"; - Definition *d = md->getOuterScope(); - if (d==Doxygen::globalScope) d=md->getBodyDef(); + //Definition *d = md->getOutputFileBase(); + //if (d==Doxygen::globalScope) d=md->getBodyDef(); if (md->getStartBodyLine()!=-1 && md->getBodyDef()) { //printf("md->getBodyDef()=%p global=%p\n",md->getBodyDef(),Doxygen::globalScope); @@ -530,12 +531,13 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, ol.docify(name); ol.popGeneratorState(); } - else if (md->isLinkable() && d && d->isLinkable()) + else if (md->isLinkable() /*&& d && d->isLinkable()*/) { // for HTML write a real link ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - ol.writeObjectLink(d->getReference(),d->getOutputFileBase(), + ol.writeObjectLink(md->getReference(), + md->getOutputFileBase(), md->anchor(),name); ol.popGeneratorState(); diff --git a/src/definition.h b/src/definition.h index f74123e..04f18e6 100644 --- a/src/definition.h +++ b/src/definition.h @@ -84,6 +84,10 @@ class Definition virtual bool isLinkable() const = 0; virtual QCString getReference() const { return m_ref; } + // symbols + QCString symbolName() const { return m_symbolName; } + void setSymbolName(const QCString &name) { m_symbolName=name; } + virtual bool isReference() const { return !m_ref.isEmpty(); } void setReference(const char *r) { m_ref=r; } @@ -174,6 +178,7 @@ class Definition int m_briefLine; QCString m_briefFile; QList<ListItemInfo> *m_xrefListItems; + QCString m_symbolName; }; class DefinitionList : public QList<Definition> diff --git a/src/docparser.cpp b/src/docparser.cpp index 048448d..9347279 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -705,8 +705,8 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) { children.append(new DocLinkedWord(parent,name, - compound->getReference(), - compound->getOutputFileBase(), + member->getReference(), + member->getOutputFileBase(), member->anchor() ) ); diff --git a/src/dot.cpp b/src/dot.cpp index d2f852a..79c1320 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1886,25 +1886,10 @@ DotCallGraph::DotCallGraph(MemberDef *md,int maxRecursionDepth) { m_maxDistance = 0; m_recDepth = maxRecursionDepth; - if (md->getGroupDef()) - { - m_diskName = md->getGroupDef()->getOutputFileBase()+"_"+md->getBodyAnchor(); - } - else - { - m_diskName = md->getOutputFileBase()+"_"+md->anchor(); - } + m_diskName = md->getOutputFileBase()+"_"+md->anchor(); QCString uniqueId; - if (md->getGroupDef()) // member is in a group - { - uniqueId = md->getReference()+"$"+ - md->getGroupDef()->getOutputFileBase()+"#"+md->getBodyAnchor(); - } - else // ungrouped member - { - uniqueId = md->getReference()+"$"+ - md->getOutputFileBase()+"#"+md->anchor(); - } + uniqueId = md->getReference()+"$"+ + md->getOutputFileBase()+"#"+md->anchor(); m_startNode = new DotNode(m_curNodeNumber++, md->qualifiedName(), uniqueId.data(), @@ -2049,16 +2034,8 @@ void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance) if (rmd->isFunction()) { QCString uniqueId; - if (rmd->getGroupDef()) // member is in a group - { - uniqueId = rmd->getReference()+"$"+ - rmd->getGroupDef()->getOutputFileBase()+"#"+rmd->getBodyAnchor(); - } - else // ungrouped member - { - uniqueId=rmd->getReference()+"$"+ - rmd->getOutputFileBase()+"#"+rmd->anchor(); - } + uniqueId=rmd->getReference()+"$"+ + rmd->getOutputFileBase()+"#"+rmd->anchor(); DotNode *bn = m_usedNodes->find(uniqueId); if (bn) // file is already a node in the graph { diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 19aadee..1165c51 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1298,11 +1298,13 @@ static void findUsingDeclImports(Entry *root) { newMd->setDocumentation(root->doc,root->docFile,root->docLine); newMd->setBriefDescription(root->brief,root->briefFile,root->briefLine); + newMd->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); } else { newMd->setDocumentation(md->documentation(),md->docFile(),md->docLine()); newMd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine()); + newMd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine()); } newMd->setDefinition(md->definition()); newMd->enableCallGraph(root->callGraph); @@ -1453,6 +1455,7 @@ static MemberDef *addVariableToClass( //md->setDefLine(root->startLine); md->setDocumentation(root->doc,root->docFile,root->docLine); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDefinition(def); md->setBitfields(root->bitfields); md->addSectionsToDefinition(root->anchors); @@ -1599,8 +1602,9 @@ static MemberDef *addVariableToFile( // merge ingroup specifiers if (md->getGroupDef()==0 && root->groups->first()) { - GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()]; - md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty()); + //GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()]; + //md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty()); + addMemberToGroups(root,md); } else if (md->getGroupDef()!=0 && root->groups->count()==0) { @@ -1624,6 +1628,7 @@ static MemberDef *addVariableToFile( //md->setDefLine(root->startLine); md->setDocumentation(root->doc,root->docFile,root->docLine); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->addSectionsToDefinition(root->anchors); md->setFromAnonymousScope(fromAnnScope); md->setFromAnonymousMember(fromAnnMemb); @@ -2041,6 +2046,7 @@ static void addMethodToClass(Entry *root,ClassDef *cd, md->setDocumentation(root->doc,root->docFile,root->docLine); md->setDocsForDefinition(!root->proto); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine); md->setMemberSpecifiers(root->memSpec); md->setMemberGroupId(root->mGrpId); @@ -2289,6 +2295,7 @@ static void buildFunctionList(Entry *root) if (md->documentation().isEmpty() && !root->doc.isEmpty()) { md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); ArgumentList *argList = new ArgumentList; stringToArgumentList(root->args,argList); @@ -2346,14 +2353,15 @@ static void buildFunctionList(Entry *root) // the documented implementation below it from being added //addMemberToGroups(root,md); //GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()]; - if (gd) - { - bool success = gd->insertMember(md); - if (success) - { - md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty()); - } - } + //if (gd) + //{ + // bool success = gd->insertMember(md); + // if (success) + // { + // md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty()); + // } + //} + addMemberToGroups(root,md); } else if (md->getGroupDef()!=0 && root->groups->count()==0) { @@ -2391,6 +2399,7 @@ static void buildFunctionList(Entry *root) //md->setDefLine(root->startLine); md->setDocumentation(root->doc,root->docFile,root->docLine); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setPrototype(root->proto); md->setDocsForDefinition(!root->proto); //md->setBody(root->body); @@ -2565,18 +2574,26 @@ static void findFriends() { fmd->setBriefDescription(mmd->briefDescription(),mmd->briefFile(),mmd->briefLine()); } + if (!fmd->inbodyDocumentation().isEmpty()) + { + mmd->setInbodyDocumentation(fmd->inbodyDocumentation(),fmd->inbodyFile(),fmd->inbodyLine()); + } + else if (!mmd->inbodyDocumentation().isEmpty()) + { + fmd->setInbodyDocumentation(mmd->inbodyDocumentation(),mmd->inbodyFile(),mmd->inbodyLine()); + } //printf("body mmd %d fmd %d\n",mmd->getStartBodyLine(),fmd->getStartBodyLine()); if (mmd->getStartBodyLine()==-1 && fmd->getStartBodyLine()!=-1) { mmd->setBodySegment(fmd->getStartBodyLine(),fmd->getEndBodyLine()); mmd->setBodyDef(fmd->getBodyDef()); - mmd->setBodyMember(fmd); + //mmd->setBodyMember(fmd); } else if (mmd->getStartBodyLine()!=-1 && fmd->getStartBodyLine()==-1) { fmd->setBodySegment(mmd->getStartBodyLine(),mmd->getEndBodyLine()); fmd->setBodyDef(mmd->getBodyDef()); - fmd->setBodyMember(mmd); + //fmd->setBodyMember(mmd); } mmd->setDocsForDefinition(fmd->isDocsForDefinition()); @@ -2696,19 +2713,27 @@ static void transferFunctionDocumentation() mdef->setDeclArgumentList(mdecAl); } } + if (!mdef->inbodyDocumentation().isEmpty()) + { + mdec->setInbodyDocumentation(mdef->inbodyDocumentation(),mdef->inbodyFile(),mdef->inbodyLine()); + } + else if (!mdec->inbodyDocumentation().isEmpty()) + { + mdef->setInbodyDocumentation(mdec->inbodyDocumentation(),mdec->inbodyFile(),mdec->inbodyLine()); + } if (mdec->getStartBodyLine()!=-1 && mdef->getStartBodyLine()==-1) { //printf("body mdec->mdef %d-%d\n",mdec->getStartBodyLine(),mdef->getEndBodyLine()); mdef->setBodySegment(mdec->getStartBodyLine(),mdec->getEndBodyLine()); mdef->setBodyDef(mdec->getBodyDef()); - mdef->setBodyMember(mdec); + //mdef->setBodyMember(mdec); } else if (mdef->getStartBodyLine()!=-1 && mdec->getStartBodyLine()==-1) { //printf("body mdef->mdec %d-%d\n",mdef->getStartBodyLine(),mdec->getEndBodyLine()); mdec->setBodySegment(mdef->getStartBodyLine(),mdef->getEndBodyLine()); mdec->setBodyDef(mdef->getBodyDef()); - mdec->setBodyMember(mdef); + //mdec->setBodyMember(mdef); } mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers()); mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers()); @@ -3902,6 +3927,7 @@ static void addMemberDocs(Entry *root, doc+=root->doc; } md->setDocumentation(doc,root->docFile,root->docLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); } else @@ -3937,6 +3963,15 @@ static void addMemberDocs(Entry *root, //printf("overwrite!\n"); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); } + + if ( + (md->inbodyDocumentation().isEmpty() || + !root->parent->name.isEmpty() + ) && !root->inbodyDocs.isEmpty() + ) + { + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); + } } if (md->initializer().isEmpty() && !root->initializer.isEmpty()) @@ -4815,6 +4850,7 @@ static void findMember(Entry *root, doc+="<p>"; doc+=root->doc; md->setDocumentation(doc,root->docFile,root->docLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); md->setPrototype(root->proto); md->addSectionsToDefinition(root->anchors); @@ -4946,7 +4982,7 @@ static void findMember(Entry *root, { md->setBodySegment(rmd->getStartBodyLine(),rmd->getEndBodyLine()); md->setBodyDef(rmd->getBodyDef()); - md->setBodyMember(rmd); + //md->setBodyMember(rmd); } } } @@ -4968,6 +5004,7 @@ static void findMember(Entry *root, md->setDefinition(funcDecl); md->enableCallGraph(root->callGraph); md->setDocumentation(root->doc,root->docFile,root->docLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->setDocsForDefinition(!root->proto); md->setPrototype(root->proto); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); @@ -5275,6 +5312,7 @@ static void findEnums(Entry *root) md->setDocumentation(root->doc,root->docFile,root->docLine); md->setDocsForDefinition(!root->proto); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); //printf("Adding member=%s\n",md->name().data()); MemberName *mn; @@ -5417,6 +5455,11 @@ static void findEnumDocumentation(Entry *root) md->setBriefDescription(root->brief,root->briefFile,root->briefLine); } + if (!md->inbodyDocumentation() || !root->parent->name.isEmpty()) + { + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); + } + if (root->mGrpId!=-1 && md->getMemberGroupId()==-1) { md->setMemberGroupId(root->mGrpId); @@ -5441,6 +5484,7 @@ static void findEnumDocumentation(Entry *root) md->setDocumentation(root->doc,root->docFile,root->docLine); md->setDocsForDefinition(!root->proto); md->setBriefDescription(root->brief,root->briefFile,root->briefLine); + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); md->addSectionsToDefinition(root->anchors); md->setMemberGroupId(root->mGrpId); found=TRUE; @@ -5858,6 +5902,7 @@ static void inheritDocumentation() md->setDocumentation(bmd->documentation(),bmd->docFile(),bmd->docLine()); md->setDocsForDefinition(bmd->isDocsForDefinition()); md->setBriefDescription(bmd->briefDescription(),bmd->briefFile(),bmd->briefLine()); + md->setInbodyDocumentation(bmd->inbodyDocumentation(),bmd->inbodyFile(),bmd->inbodyLine()); } } } @@ -6089,7 +6134,13 @@ static void findDefineDocumentation(Entry *root) md->setDocsForDefinition(!root->proto); } if (md->briefDescription().isEmpty()) + { md->setBriefDescription(root->brief,root->briefFile,root->briefLine); + } + if (md->inbodyDocumentation().isEmpty()) + { + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); + } md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig)); @@ -6126,7 +6177,13 @@ static void findDefineDocumentation(Entry *root) md->setDocsForDefinition(!root->proto); } if (md->briefDescription().isEmpty()) + { md->setBriefDescription(root->brief,root->briefFile,root->briefLine); + } + if (md->inbodyDocumentation().isEmpty()) + { + md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine); + } md->setBodySegment(root->bodyLine,root->endBodyLine); bool ambig; md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig)); @@ -8101,7 +8158,6 @@ void parseInput() msg("Adding source references...\n"); addSourceReferences(); - msg("Adding todo/test/bug list items...\n"); addListReferences(); diff --git a/src/entry.cpp b/src/entry.cpp index 21489c5..3cb431a 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -74,6 +74,9 @@ Entry::Entry(const Entry &e) brief = e.brief.copy(); briefLine = e.briefLine; briefFile = e.briefFile.copy(); + inbodyDocs = e.inbodyDocs.copy(); + inbodyLine = e.inbodyLine; + inbodyFile = e.inbodyFile.copy(); inside = e.inside.copy(); fileName = e.fileName.copy(); startLine = e.startLine; @@ -233,6 +236,9 @@ void Entry::reset() brief.resize(0); briefFile.resize(0); briefLine=-1; + inbodyDocs.resize(0); + inbodyFile.resize(0); + inbodyLine=-1; inside.resize(0); fileName.resize(0); //scopeSpec.resize(0); @@ -285,6 +291,8 @@ int Entry::getSize() size+=relates.length()+1; size+=brief.length()+1; size+=briefFile.length()+1; + size+=inbodyDocs.length()+1; + size+=inbodyFile.length()+1; size+=inside.length()+1; size+=fileName.length()+1; size+=initializer.length()+1; diff --git a/src/entry.h b/src/entry.h index 16d00fb..b796b4e 100644 --- a/src/entry.h +++ b/src/entry.h @@ -274,6 +274,9 @@ class Entry QCString brief; //!< brief description (doc block) int briefLine; //!< line number at which the brief desc. was found QCString briefFile; //!< file in which the brief desc. was found + QCString inbodyDocs; //!< documentation inside the body of a function + int inbodyLine; //!< line number at which the body doc was found + QCString inbodyFile; //!< file in which the body doc was found QCString relates; //!< related class (doc block) bool relatesDup; //!< keep duplicate doc in original file also QCString inside; //!< name of the class in which documents are found diff --git a/src/filedef.cpp b/src/filedef.cpp index 161d1fc..9f86c2a 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -223,7 +223,7 @@ void FileDef::writeDocumentation(OutputList &ol) if (Config_getBool("SEARCHENGINE")) { - Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); + Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()+Config_getString("HTML_FILE_EXTENSION")); Doxygen::searchIndex->addWord(localName().lower()); } diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 999f032..0f87ab8 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -208,6 +208,7 @@ bool GroupDef::insertMember(MemberDef *md,bool docOnly) sameScope ) { + md->setGroupAlias(srcMd); return FALSE; // member already added } } @@ -364,9 +365,10 @@ int GroupDef::countMembers() const exampleDict->count(); } -/*! Compute the HTML anchor names for all members in the class */ +/*! Compute the HTML anchor names for all members in the group */ void GroupDef::computeAnchors() { + //printf("GroupDef::computeAnchors()\n"); setAnchors(0,'a',allMemberList); } @@ -416,7 +418,7 @@ void GroupDef::writeDocumentation(OutputList &ol) if (Config_getBool("SEARCHENGINE")) { - Doxygen::searchIndex->setCurrentDoc(title,getOutputFileBase()); + Doxygen::searchIndex->setCurrentDoc(title,getOutputFileBase()+Config_getString("HTML_FILE_EXTENSION")); Doxygen::searchIndex->addWord(localName().lower()); } diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 0f65f07..1489e94 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1407,7 +1407,10 @@ void HtmlGenerator::writeSearchPage() } t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " << versionString << " -->" << endl; - writeDefaultQuickLinks(t,TRUE,HLI_Search); + if (!Config_getBool("DISABLE_INDEX")) + { + writeDefaultQuickLinks(t,TRUE,HLI_Search); + } t << "<?php \n\n"; t << "function search_results()\n"; diff --git a/src/index.cpp b/src/index.cpp index e4fe138..e908836 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -1678,15 +1678,15 @@ void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter ClassDef *cd=md->getClassDef(); if ( md->isLinkableInProject() && - prevName!=cd->displayName() && - cd->isLinkableInProject() && cd->templateMaster()==0 + prevName!=cd->displayName() && + cd->templateMaster()==0 ) { if (count==0) ol.docify(": "); else ol.docify(", "); - ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),md->anchor(), + ol.writeObjectLink(md->getReference(),md->getOutputFileBase(),md->anchor(), cd->displayName()); count++; prevName=cd->displayName(); @@ -1965,9 +1965,7 @@ static void writeFileMemberList(OutputList &ol, while (md) { FileDef *fd=md->getFileDef(); - bool hasDocs = md->getFileDef() && - md->getFileDef()->isLinkableInProject(); - if (fd && hasDocs && + if (fd && fd->isLinkableInProject() && md->isLinkableInProject() && prevName!=fd->name()) { @@ -1975,9 +1973,9 @@ static void writeFileMemberList(OutputList &ol, ol.docify(": "); else ol.docify(", "); - QCString baseName=fd->name().copy(); - ol.writeObjectLink(fd->getReference(), - fd->getOutputFileBase(),md->anchor(), baseName); + QCString baseName=fd->name(); + ol.writeObjectLink(md->getReference(), + md->getOutputFileBase(),md->anchor(), baseName); count++; prevName=fd->name(); } @@ -2064,7 +2062,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections, ol.docify(": "); else ol.docify(", "); - ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(), + ol.writeObjectLink(md->getReference(),md->getOutputFileBase(), md->anchor(),nd->name()); count++; prevName=nd->name(); @@ -2734,14 +2732,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) ftvHelp->incContentsDepth(); } } - GroupDef *gd=md->getGroupDef(); if(htmlHelp) { - htmlHelp->addContentsItem(FALSE,md->name(),gd->getOutputFileBase(),md->anchor()); + htmlHelp->addContentsItem(FALSE,md->name(),md->getOutputFileBase(),md->anchor()); } if(ftvHelp) { - ftvHelp->addContentsItem(FALSE,gd->getReference(),gd->getOutputFileBase(),md->anchor(),md->name()); + ftvHelp->addContentsItem(FALSE,md->getReference(),md->getOutputFileBase(),md->anchor(),md->name()); } } md=members->next(); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 92e9024..3d02cb4 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -316,7 +316,7 @@ MemberDef::MemberDef(const char *df,int dl, annEnumType=0; //indDepth=0; section=0; - bodyMemb=0; + groupAlias=0; explExt=FALSE; cachedAnonymousType=0; maxInitLines=Config_getInt("MAX_INITIALIZER_LINES"); @@ -377,6 +377,7 @@ MemberDef::MemberDef(const char *df,int dl, docsForDefinition = TRUE; m_isTypedefValCached = FALSE; m_cachedTypedefValue = 0; + m_inbodyLine = -1; } /*! Destroys the member definition. */ @@ -461,6 +462,10 @@ QCString MemberDef::getOutputFileBase() const { return m_templateMaster->getOutputFileBase(); } + else if (group) + { + return group->getOutputFileBase(); + } else if (classDef) { return classDef->getOutputFileBase(); @@ -469,10 +474,6 @@ QCString MemberDef::getOutputFileBase() const { return nspace->getOutputFileBase(); } - //else if (group) - //{ - // return group->getOutputFileBase(); - //} else if (fileDef) { return fileDef->getOutputFileBase(); @@ -484,6 +485,105 @@ QCString MemberDef::getOutputFileBase() const return "dummy"; } +QCString MemberDef::getReference() const +{ + if (m_templateMaster) + { + return m_templateMaster->getReference(); + } + else if (group) + { + return group->getReference(); + } + else if (classDef) + { + return classDef->getReference(); + } + else if (nspace) + { + return nspace->getReference(); + } + else if (fileDef) + { + return fileDef->getReference(); + } + return ""; +} + +QCString MemberDef::anchor() const +{ + QCString result=anc; + if (groupAlias) return groupAlias->anchor(); + if (m_templateMaster) return m_templateMaster->anchor(); + if (enumScope) result.prepend(enumScope->anchor()); + if (group) result.prepend("g"); + return result; +} + +bool MemberDef::isLinkableInProject() const +{ + //printf("MemberDef::isLinkableInProject()\n"); + if (m_templateMaster) + { + return m_templateMaster->isLinkableInProject(); + } + if (name().isEmpty() || name().at(0)=='@') + { + //printf("name invalid\n"); + return FALSE; // not a valid or a dummy name + } + if (!hasDocumentation() && !isReference()) + { + //printf("no docs or reference\n"); + return FALSE; // no documentation + } + if (group && !group->isLinkableInProject()) + { + //printf("group but group not linkable!\n"); + return FALSE; // group but group not linkable + } + if (!group && classDef && !classDef->isLinkableInProject()) + { + //printf("in a class but class not linkable!\n"); + return FALSE; // in class but class not linkable + } + if (!group && nspace && !nspace->isLinkableInProject()) + { + //printf("in a namespace but namespace not linkable!\n"); + return FALSE; // in namespace but namespace not linkable + } + if (!group && fileDef && !fileDef->isLinkableInProject()) + { + //printf("in a file but file not linkable!\n"); + return FALSE; // in file but file not linkable + } + if (prot==Private && !Config_getBool("EXTRACT_PRIVATE") && mtype!=Friend) + { + //printf("private and invisible!\n"); + return FALSE; // hidden due to protection + } + if (isStatic() && classDef==0 && !Config_getBool("EXTRACT_STATIC")) + { + //printf("static and invisible!\n"); + return FALSE; // hidden due to staticness + } + //printf("linkable!\n"); + return TRUE; // linkable! +} + +bool MemberDef::isLinkable() const +{ + if (m_templateMaster) + { + return m_templateMaster->isLinkable(); + } + else + { + return isLinkableInProject() || isReference(); + } +} + + void MemberDef::setDefinitionTemplateParameterLists(QList<ArgumentList> *lists) { if (lists) @@ -493,24 +593,24 @@ void MemberDef::setDefinitionTemplateParameterLists(QList<ArgumentList> *lists) } } -void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd, - FileDef *fd,GroupDef *gd) +void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *, + FileDef *,GroupDef *gd) { - Definition *d=0; - if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else if (gd) d=gd; - if (d==0) { err("Member %s without definition! Please report this bug!\n",name().data()); return; } - if (group!=0 && gd==0) // forward link to the group - { - ol.writeObjectLink(group->getReference(),group->getOutputFileBase(),anchor(),name()); - } - else // local link - { + //Definition *d=0; + //if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else if (gd) d=gd; + //if (d==0) { err("Member %s without definition! Please report this bug!\n",name().data()); return; } + //if (group!=0 && gd==0) // forward link to the group + //{ + // ol.writeObjectLink(group->getReference(),group->getOutputFileBase(),anchor(),name()); + //} + //else // local link + //{ QCString sep = Config_getBool("OPTIMIZE_OUTPUT_JAVA") ? "." : "::"; QCString n = name(); if (classDef && gd) n.prepend(classDef->name()+sep); else if (nspace && gd) n.prepend(nspace->name()+sep); - ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),anchor(),n); - } + ol.writeObjectLink(getReference(),getOutputFileBase(),anchor(),n); + //} } /*! If this member has an anonymous class/struct/union as its type, then @@ -714,23 +814,23 @@ void MemberDef::writeDeclaration(OutputList &ol, Doxygen::tagFile << " </member>" << endl; } + // write search index info + if (Config_getBool("SEARCHENGINE")) + { + Doxygen::searchIndex->setCurrentDoc(qualifiedName(),getOutputFileBase()+Config_getString("HTML_FILE_EXTENSION")+"#"+anchor()); + Doxygen::searchIndex->addWord(localName().lower()); + Doxygen::searchIndex->addWord(qualifiedName().lower()); + } + Definition *d=0; 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; QCString cname = d->name(); - QCString cfname = d->getOutputFileBase(); + QCString cfname = getOutputFileBase(); QCString osname = cname; // in case of class members that are put in a group the name of the outerscope // differs from the cname. if (getOuterScope()) osname=getOuterScope()->name(); - - if (Config_getBool("SEARCHENGINE")) - { - Doxygen::searchIndex->setCurrentDoc(qualifiedName(),getOutputFileBase()+Config_getString("HTML_FILE_EXTENSION")+"#"+anchor()); - Doxygen::searchIndex->addWord(localName().lower()); - Doxygen::searchIndex->addWord(qualifiedName().lower()); - } - HtmlHelp *htmlHelp=0; @@ -951,18 +1051,18 @@ void MemberDef::writeDeclaration(OutputList &ol, { ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - ol.endEmphasis(); + //ol.endEmphasis(); ol.docify(" "); if (group!=0 && gd==0) // forward link to the group { - ol.startTextLink(group->getOutputFileBase(),anchor()); + ol.startTextLink(getOutputFileBase(),anchor()); } - else + else // local link { ol.startTextLink(0,anchor()); } ol.endTextLink(); - ol.startEmphasis(); + //ol.startEmphasis(); ol.popGeneratorState(); } //ol.newParagraph(); @@ -979,6 +1079,8 @@ bool MemberDef::isDetailedSectionLinkable() const Config_getBool("EXTRACT_ALL") || // has detailed docs !documentation().isEmpty() || + // has inbody docs + !inbodyDocumentation().isEmpty() || // is an enum with values that are documented (mtype==Enumeration && docEnumValues) || // is documented enum value @@ -1047,7 +1149,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, } QCString cname = container->name(); - QCString cfname = container->getOutputFileBase(); + QCString cfname = getOutputFileBase(); //ol.addIndexItem(name(),cname); //ol.addIndexItem(cname,name()); @@ -1313,6 +1415,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE); ol.pushGeneratorState(); + if (!m_inbodyDocs.isEmpty()) + { + ol.newParagraph(); + ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_inbodyDocs+"\n",TRUE,FALSE); + } ol.disableAllBut(OutputGenerator::RTF); ol.newParagraph(); ol.popGeneratorState(); @@ -1320,6 +1427,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, else if(!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") || !Config_getBool("BRIEF_MEMBER_DESC"))) { + if (!m_inbodyDocs.isEmpty()) + { + ol.newParagraph(); + ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_inbodyDocs+"\n",TRUE,FALSE); + } ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::RTF); ol.newParagraph(); @@ -1449,16 +1561,16 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.parseText(reimplFromLine.left(markerPos)); //text left from marker if (bmd->isLinkable()) // replace marker with link { - Definition *bd=bmd->group; - if (bd==0) bd=bcd; - ol.writeObjectLink(bd->getReference(),bd->getOutputFileBase(), + //Definition *bd=bmd->group; + //if (bd==0) bd=bcd; + ol.writeObjectLink(bmd->getReference(),bmd->getOutputFileBase(), bmd->anchor(),bcd->displayName()); //ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), // bmd->anchor(),bcd->name()); - if ( bd->isLinkableInProject() ) + if ( bmd->isLinkableInProject() ) { - writePageRef(ol,bd->getOutputFileBase(),bmd->anchor()); + writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor()); } } else @@ -1544,15 +1656,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { //ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), // bmd->anchor(),bcd->name()); - Definition* bd; - if (bmd->group) bd=bmd->group; else bd=bcd; - - ol.writeObjectLink(bd->getReference(),bd->getOutputFileBase(), + ol.writeObjectLink(bmd->getReference(),bmd->getOutputFileBase(), bmd->anchor(),bcd->displayName()); - if (bd->isLinkableInProject() ) + if (bmd->isLinkableInProject() ) { - writePageRef(ol,bd->getOutputFileBase(),bmd->anchor()); + writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor()); } } ++mli; @@ -1630,7 +1739,7 @@ void MemberDef::warnIfUndocumented() // "isDocumentedFriendClass()=%d name()=%s prot=%d\n", // d->isLinkable(),isLinkable(),isDocumentedFriendClass(), // name().data(),prot); - if (d && d->isLinkable() && !isLinkable() && + if (/*d && d->isLinkable() &&*/ !isLinkable() && !isDocumentedFriendClass() && name().find('@')==-1 && (prot!=Private || Config_getBool("EXTRACT_PRIVATE")) @@ -1642,35 +1751,6 @@ void MemberDef::warnIfUndocumented() } -bool MemberDef::isLinkableInProject() const -{ - if (m_templateMaster) - { - return m_templateMaster->isLinkableInProject(); - } - else - { - return !name().isEmpty() && name().at(0)!='@' && - (hasDocumentation() && !isReference()) && - (prot!=Private || Config_getBool("EXTRACT_PRIVATE") || - mtype==Friend) && // not a hidden member due to protection - (classDef!=0 || Config_getBool("EXTRACT_STATIC") || - !isStatic()); // not a static file/namespace member - } -} - -bool MemberDef::isLinkable() const -{ - if (m_templateMaster) - { - return m_templateMaster->isLinkable(); - } - else - { - return isLinkableInProject() || isReference(); - } -} - //void MemberDef::setEnumDecl(OutputList &ed) //{ // enumDeclList=new OutputList(&ed); @@ -1689,6 +1769,7 @@ bool MemberDef::isDocumentedFriendClass() const bool MemberDef::hasDocumentation() const { return Definition::hasDocumentation() || + !m_inbodyDocs.isEmpty() || (mtype==Enumeration && docEnumValues) || // has enum values (defArgList!=0 && defArgList->hasDocumentation()); // has doc arguments } @@ -1717,13 +1798,6 @@ void MemberDef::setAnchor(const char *a) anc=a; } -QCString MemberDef::anchor() const -{ - if (m_templateMaster) return m_templateMaster->anchor(); - if (enumScope) return enumScope->anchor()+anc; - return anc; -} - void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs) { //printf("%s MemberDef::setGroupDef(%s)\n",name().data(),gd->name().data()); @@ -1792,7 +1866,7 @@ MemberDef *MemberDef::createTemplateInstanceMember( imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs); imd->setBodyDef(getBodyDef()); imd->setBodySegment(getStartBodyLine(),getEndBodyLine()); - imd->setBodyMember(this); + //imd->setBodyMember(this); // TODO: init other member variables (if needed). // TODO: reimplemented info @@ -1824,7 +1898,7 @@ void MemberDef::setInitializer(const char *initializer) initLines=init.contains('\n'); } -void MemberDef::addListReference(Definition *d) +void MemberDef::addListReference(Definition *) { visited=TRUE; if (!isLinkableInProject()) return; @@ -1855,7 +1929,7 @@ void MemberDef::addListReference(Definition *d) } //printf("*** addListReference %s todo=%d test=%d bug=%d\n",name().data(),todoId(),testId(),bugId()); addRefItem(xrefListItems(),memLabel, - d->getOutputFileBase()+"#"+anchor(),memName,argsString()); + getOutputFileBase()+"#"+anchor(),memName,argsString()); } MemberList *MemberDef::getSectionList(Definition *d) const @@ -2044,3 +2118,12 @@ bool MemberDef::protectionVisible() const (prot==Package && Config_getBool("EXTRACT_PACKAGE")); } +void MemberDef::setInbodyDocumentation(const char *docs, + const char *docFile,int docLine) +{ + m_inbodyDocs = docs; + m_inbodyDocs = m_inbodyDocs.stripWhiteSpace(); + m_inbodyLine = docLine; + m_inbodyFile = docFile; +} + diff --git a/src/memberdef.h b/src/memberdef.h index cba40d1..4898a89 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -74,13 +74,14 @@ class MemberDef : public Definition DefType definitionType() { return TypeMember; } QCString getOutputFileBase() const; + QCString getReference() const; + QCString anchor() const; const char *declaration() const { return decl; } const char *definition() const { return def; } const char *typeString() const { return type; } const char *argsString() const { return args; } const char *excpString() const { return exception; } const char *bitfieldString() const { return bitfields; } - QCString anchor() const; const QCString &initializer() const { return init; } int initializerLines() const { return initLines; } int getMemberSpecifiers() const { return memSpec; } @@ -175,6 +176,12 @@ class MemberDef : public Definition MemberDef *reimplements() const; MemberList *reimplementedBy() const; + // in-body documentation + void setInbodyDocumentation(const char *docs,const char *file,int line); + int inbodyLine() const { return m_inbodyLine; } + QCString inbodyFile() const { return m_inbodyFile; } + const QCString &inbodyDocumentation() const { return m_inbodyDocs; } + // For function documentation that can also be found in a class's related func section. void setRelatedAlso(ClassDef *cd) { m_relatedAlso=cd; } ClassDef *relatedAlso() const { return m_relatedAlso; } @@ -245,12 +252,13 @@ class MemberDef : public Definition void setTemplateMaster(MemberDef *mt) { m_templateMaster=mt; } void addListReference(Definition *d); - QCString getBodyAnchor() const - { - return bodyMemb ? bodyMemb->anchor() : anchor(); - } - void setBodyMember(MemberDef *md) { bodyMemb = md; } + //QCString getBodyAnchor() const + //{ + // return bodyMemb ? bodyMemb->anchor() : anchor(); + //} + //void setBodyMember(MemberDef *md) { bodyMemb = md; } void setDocsForDefinition(bool b) { docsForDefinition = b; } + void setGroupAlias(MemberDef *md) { groupAlias = md; } // cached typedef functions bool isTypedefValCached() const { return m_isTypedefValCached; } @@ -295,7 +303,7 @@ class MemberDef : public Definition QCString decl; // member declaration in class QCString def; // member definition in code (fully qualified name) QCString anc; // HTML anchor name - MemberDef *bodyMemb; // Member containing the definition + MemberDef *groupAlias; // Member containing the definition Specifier virt; // normal/virtual/pure virtual Protection prot; // protection type [Public/Protected/Private] bool related; // is this a member that is only related to a class @@ -345,7 +353,11 @@ class MemberDef : public Definition bool m_isTypedefValCached; ClassDef *m_cachedTypedefValue; - + + // inbody documentation + int m_inbodyLine; + QCString m_inbodyFile; + QCString m_inbodyDocs; }; #endif diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 7eb708c..a48be4a 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -138,17 +138,22 @@ void MemberGroup::distributeMemberGroupDocumentation() { //printf("MemberGroup::distributeMemberGroupDocumentation() %s\n",grpHeader.data()); MemberDef *md=memberList->first(); - if (md && !(md->documentation().isEmpty() && md->briefDescription().isEmpty())) + if (md && !(md->documentation().isEmpty() && + md->briefDescription().isEmpty() && + md->inbodyDocumentation().isEmpty() + ) + ) { //printf("First member %s has documentation!\n",md->name().data()); MemberDef *omd=memberList->next(); while (omd) { - if (omd->documentation().isEmpty() && omd->briefDescription().isEmpty()) + if (omd->documentation().isEmpty() && omd->briefDescription().isEmpty() && omd->inbodyDocumentation().isEmpty()) { //printf("Copying documentation to member %s\n",omd->name().data()); omd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine()); omd->setDocumentation(md->documentation(),md->docFile(),md->docLine()); + omd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine()); } omd=memberList->next(); } diff --git a/src/memberlist.cpp b/src/memberlist.cpp index dfb9842..e943f17 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -247,8 +247,8 @@ void MemberList::writePlainDeclarations(OutputList &ol, ol.docify(" "); if (md->getGroupDef()!=0 && gd==0) // forward link to group { - ol.startTextLink(md->getGroupDef()->getOutputFileBase(), - md->anchor()); + ol.startTextLink(md->getOutputFileBase(), + md->anchor()); } else { diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index c2aa94a..9ca4e89 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -263,7 +263,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) if (Config_getBool("SEARCHENGINE")) { - Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()); + Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase()+Config_getString("HTML_FILE_EXTENSION")); Doxygen::searchIndex->addWord(localName().lower()); } diff --git a/src/scanner.l b/src/scanner.l index 1d519bc..1a4661b 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2740,7 +2740,12 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] { // copy documentation found inside the body // to the previous item - previous->doc += current->doc; + if (previous->inbodyLine==-1) + { + previous->inbodyLine = current->docLine; + previous->inbodyFile = current->docFile; + } + previous->inbodyDocs += current->doc; current->doc.resize(0); } if (current->sli) // copy special list items @@ -3159,6 +3164,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] <FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases>("//"{B}*)?"/**"/[^/*] { removeSlashes=(yytext[1]=='/'); lastDocContext = YY_START; + printf("Found comment block at %s:%d\n",yyFileName,yyLineNr); if (current_root->section & Entry::SCOPE_MASK) { current->inside = current_root->name+"::"; @@ -3169,6 +3175,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] } if (!Config_getBool("JAVADOC_AUTOBRIEF")) // use the Qt style { + current->docLine = yyLineNr; + current->docFile = yyFileName; tmpDocType=-1; if (!Config_getBool("HIDE_IN_BODY_DOCS") && YY_START==SkipCurly) // inside body @@ -3178,13 +3186,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] else { current->doc.resize(0); - current->docLine = yyLineNr; - current->docFile = yyFileName; } BEGIN( Doc ); } else // Use the javadoc style { + current->docLine = yyLineNr; + current->docFile = yyFileName; + current->briefLine = yyLineNr; + current->briefFile = yyFileName; if (!Config_getBool("HIDE_IN_BODY_DOCS") && YY_START==SkipCurly) // inside body { @@ -3198,10 +3208,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] tmpDocType=Doc; current->doc.resize(0); current->brief.resize(0); - current->docLine = yyLineNr; - current->docFile = yyFileName; - current->briefLine = yyLineNr; - current->briefFile = yyFileName; BEGIN( JavaDoc ); } } diff --git a/src/translator_de.h b/src/translator_de.h index 3a7880f..32bf83f 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -79,7 +79,11 @@ // // 2003/09/11 Jens Seidel (jensseidel@users.sourceforge.net) // - Updated for "new since 1.3.1" version -// +// +// 2003/09/24 Jens Seidel (jensseidel@users.sourceforge.net) +// - Updated a few strings which changed in CVS revision 1.22 +// ("compound" vs. "class") +// // Todo: // - see FIXME @@ -213,7 +217,7 @@ class TranslatorGerman : public Translator } else { - return "Übersicht"; + return "Auflistung der Klassen"; } } @@ -223,7 +227,7 @@ class TranslatorGerman : public Translator /*! This is put above each page as a link to the list of all verbatim headers */ virtual QCString trHeaderFiles() - { return "Auflistung der Header-Dateien"; } + { return "Header-Dateien"; } /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() @@ -234,7 +238,7 @@ class TranslatorGerman : public Translator } else { - return "Datenstruktur-Elemente"; + return "Klassen-Elemente"; } } @@ -392,9 +396,11 @@ class TranslatorGerman : public Translator * annotated compound index. */ virtual QCString trCompoundIndex() - /* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */ { - return "Datenstruktur-Verzeichnis"; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + return "Datenstruktur-Verzeichnis"; + else + return "Klassen-Verzeichnis"; } /*! This is used in LaTeX as the title of the chapter with the @@ -541,7 +547,7 @@ class TranslatorGerman : public Translator } else { - return "Übersicht"; + return "Klassen"; } } diff --git a/src/translator_dk.h b/src/translator_dk.h index 4657bc6..7c4041f 100644 --- a/src/translator_dk.h +++ b/src/translator_dk.h @@ -1,4 +1,4 @@ -/*-*- c-basic-offset: 2 -*-*/ +/*-*- c-basic-offset: 2; tab-width: 8 -*-*/ /****************************************************************************** * * @@ -22,6 +22,7 @@ * * First version (not complete) for Doxygen 1.2.7 * Extended and revised for Doxygen 1.3 + * Extended and revised for Doxygen 1.3.4 */ /* Translator's notes: @@ -71,7 +72,7 @@ #ifndef TRANSLATOR_DK_H #define TRANSLATOR_DK_H -class TranslatorDanish : public TranslatorAdapter_1_3 +class TranslatorDanish : public Translator { public: @@ -99,10 +100,10 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString latexLanguageSupportCommand() { - return - "\\usepackage[danish]{babel}\n" - "\\usepackage[latin1]{inputenc}\n" - "\\usepackage[T1]{fontenc}\n"; + return + "\\usepackage[danish]{babel}\n" + "\\usepackage[latin1]{inputenc}\n" + "\\usepackage[T1]{fontenc}\n"; } /*! return the language charset. This will be used for the HTML output */ @@ -145,8 +146,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { return "Felt-dokumentation"; } else { - return "Dokumentation af feltvariable"; - //medlems-data"; + return "Dokumentation af feltvariable"; } } @@ -225,12 +225,9 @@ class TranslatorDanish : public TranslatorAdapter_1_3 /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() { - if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) - { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { return "Data-felter"; - } - else - { + } else { return "Felter i sammensatte typer"; } } @@ -241,8 +238,8 @@ class TranslatorDanish : public TranslatorAdapter_1_3 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { return "Globale symboler"; } else { - return "Placering i filer"; // Fil-medlemmer"; //TODO - //"Globale definitioner" ? + return "Placering i filer"; // Fil-medlemmer"; //TODO + //"Globale definitioner" ? } } @@ -542,9 +539,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 /*! This is part of the sentence used in the standard footer of each page. */ virtual QCString trWrittenBy() - { - return "skrevet af"; - } + { return "skrevet af"; } /*! this text is put before a class diagram */ virtual QCString trClassDiagram(const char *clName) @@ -628,7 +623,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 * related classes */ virtual QCString trRelatedFunctionDocumentation() - { return "Dokumentation af friends og af relaterede funktioner"; } + { return "Dokumentation af friends og af relaterede funktioner"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 @@ -803,8 +798,8 @@ class TranslatorDanish : public TranslatorAdapter_1_3 case ClassDef::Interface: result+="grænseflade"; break; case ClassDef::Exception: result+="exception"; break; } - result+=" blev genereret ud fra følgende fil"; - if (single) result+=":"; else result+="er:"; + result+=" blev genereret ud fra fil"; + if (single) result+="en:"; else result+="erne:"; return result; } @@ -838,13 +833,13 @@ class TranslatorDanish : public TranslatorAdapter_1_3 ////////////////////////////////////////////////////////////////////////// virtual QCString trSources() - { - return "Kilder"; //?? - } + { return "Kilder"; /* Tranlation?? */ } + virtual QCString trDefinedAtLineInSourceFile() { return "Defineret på linje @0 i filen @1."; } + virtual QCString trDefinedInSourceFile() { return "Defineret i filen @0."; @@ -877,73 +872,52 @@ class TranslatorDanish : public TranslatorAdapter_1_3 /*! header that is put before the list of constructor/destructors. */ virtual QCString trConstructorDocumentation() { - return "Dokumentation af konstruktører og destruktører"; - // "Constructor & Destructor dokumentation"; + return "Dokumentation af konstruktører og destruktører"; + // "Constructor & Destructor dokumentation"; } + /*! Used in the file documentation to point to the corresponding sources. */ virtual QCString trGotoSourceCode() - { - return "Hop til denne fils kildekode."; - } + { return "Hop til denne fils kildekode."; } /*! Used in the file sources to point to the corresponding documentation. */ virtual QCString trGotoDocumentation() - { - return "Hop til denne fils dokumentation."; - } + { return "Hop til denne fils dokumentation."; } + /*! Text for the \\pre command */ virtual QCString trPrecondition() - { - return "Forudsætninger (precondition)"; - } + { return "Forudsætninger (precondition)"; } /*! Text for the \\post command */ virtual QCString trPostcondition() - { - return "Resultat (postcondition)"; - } + { return "Resultat (postcondition)"; } /*! Text for the \\invariant command */ virtual QCString trInvariant() - { - return "Invariant"; - } + { return "Invariant"; } + /*! Text shown before a multi-line variable/enum initialization */ virtual QCString trInitialValue() - { - return "Startværdi:"; - } + { return "Startværdi:"; } + /*! Text used the source code in the file index */ virtual QCString trCode() - { - return "kildekode"; - } + { return "kildekode"; } virtual QCString trGraphicalHierarchy() - { - return "Grafisk klassehierarki"; - } + { return "Grafisk klassehierarki"; } virtual QCString trGotoGraphicalHierarchy() - { - return "Hop til det grafiske klassehierarki"; - } + { return "Hop til det grafiske klassehierarki"; } virtual QCString trGotoTextualHierarchy() - { - return "Hop til det tekstuelle klassehierarki"; - } + { return "Hop til det tekstuelle klassehierarki"; } virtual QCString trPageIndex() - { - return "Sideindeks"; - } + { return "Sideindeks"; } ////////////////////////////////////////////////////////////////////////// // new since 1.1.0 ////////////////////////////////////////////////////////////////////////// virtual QCString trNote() - { - return "Note"; - } + { return "Note"; } virtual QCString trPublicTypes() - { - return "Offentlige typer"; - } + { return "Offentlige typer"; } + virtual QCString trPublicAttribs() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { @@ -952,34 +926,21 @@ class TranslatorDanish : public TranslatorAdapter_1_3 return "Offentlige attributter"; } } + virtual QCString trStaticPublicAttribs() - { - return "Statiske, offentlige attributter"; - } + { return "Statiske, offentlige attributter"; } virtual QCString trProtectedTypes() - { - return "Beskyttede typer"; - } + { return "Beskyttede typer"; } virtual QCString trProtectedAttribs() - { - return "Beskyttede attributter"; - } + { return "Beskyttede attributter"; } virtual QCString trStaticProtectedAttribs() - { - return "Statiske, beskyttede attributter"; - } + { return "Statiske, beskyttede attributter"; } virtual QCString trPrivateTypes() - { - return "Private typer"; - } + { return "Private typer"; } virtual QCString trPrivateAttribs() - { - return "Private attributter"; - } + { return "Private attributter"; } virtual QCString trStaticPrivateAttribs() - { - return "Statiske, private attributter"; - } + { return "Statiske, private attributter"; } ////////////////////////////////////////////////////////////////////////// // new since 1.1.3 @@ -1015,8 +976,8 @@ class TranslatorDanish : public TranslatorAdapter_1_3 virtual QCString trInclByDepGraph() { return - "Denne graf viser, hvilke filer der direkte eller " - "indirekte inkluderer denne fil:"; + "Denne graf viser, hvilke filer der direkte eller " + "indirekte inkluderer denne fil:"; } virtual QCString trSince() { @@ -1138,7 +1099,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 /*! Used as a section header for IDL properties */ virtual QCString trProperties() { - return "Egenskaber"; + return "Egenskaber"; } /*! Used as a section header for IDL property documentation */ virtual QCString trPropertyDocumentation() @@ -1177,9 +1138,9 @@ class TranslatorDanish : public TranslatorAdapter_1_3 /*! The description of the package index page */ virtual QCString trPackageListDescription() { - return - "Her er en liste over pakkerne, med korte beskrivelser " - "(hvor en sådan findes):"; + return + "Her er en liste over pakkerne, med korte beskrivelser " + "(hvor en sådan findes):"; } /*! The link name in the Quick links header for each page */ virtual QCString trPackages() @@ -1247,11 +1208,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trClass(bool first_capital, bool singular) { - //QCString result(first_capital ? "Klasse" : "klasse"); - //if (first_capital) result.at(0) = toupper(result.at(0)); - //if (!singular) result+="r"; - //return result; - return createNoun(first_capital, singular, "klasse", "r"); + return createNoun(first_capital, singular, "klasse", "r"); } /*! This is used for translation of the word that will possibly @@ -1260,10 +1217,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trFile(bool first_capital, bool singular) { - //QCString result((first_capital ? "Fil" : "fil")); - //if (!singular) result+="er"; - //return result; - return createNoun(first_capital, singular, "fil", "er"); + return createNoun(first_capital, singular, "fil", "er"); } /*! This is used for translation of the word that will possibly @@ -1272,10 +1226,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trNamespace(bool first_capital, bool singular) { - //QCString result((first_capital ? "Namespace" : "namespace")); - //if (!singular) result+="s"; - //return result; - return createNoun(first_capital, singular, "namespace", "s"); + return createNoun(first_capital, singular, "namespace", "s"); } /*! This is used for translation of the word that will possibly @@ -1284,10 +1235,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trGroup(bool first_capital, bool singular) { - //QCString result((first_capital ? "Gruppe" : "gruppe")); - //if (!singular) result+="r"; - //return result; - return createNoun(first_capital, singular, "gruppe", "r"); + return createNoun(first_capital, singular, "gruppe", "r"); } /*! This is used for translation of the word that will possibly @@ -1296,10 +1244,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trPage(bool first_capital, bool singular) { - //QCString result((first_capital ? "Side" : "side")); - //if (!singular) result+="r"; - //return result; - return createNoun(first_capital, singular, "side", "r"); + return createNoun(first_capital, singular, "side", "r"); } /*! This is used for translation of the word that will possibly @@ -1308,10 +1253,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trMember(bool first_capital, bool singular) { - //QCString result((first_capital ? "Medlem" : "medlem")); - //if (!singular) result+="mer"; - //return result; - return createNoun(first_capital, singular, "medlem", "mer"); + return createNoun(first_capital, singular, "medlem", "mer"); } /*! This is used for translation of the word that will possibly @@ -1320,10 +1262,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trField(bool first_capital, bool singular) { - //QCString result((first_capital ? "Felt" : "felt")); - //if (!singular) result+="er"; - //return result; - return createNoun(first_capital, singular, "felt", "er"); + return createNoun(first_capital, singular, "felt", "er"); } /*! This is used for translation of the word that will possibly @@ -1332,10 +1271,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trGlobal(bool first_capital, bool singular) { - //QCString result((first_capital ? "Global" : "global")); - //if (!singular) result+="e"; - //return result; - return createNoun(first_capital, singular, "global", "e"); + return createNoun(first_capital, singular, "global", "e"); } ////////////////////////////////////////////////////////////////////////// @@ -1346,10 +1282,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 * for the author section in man pages. */ virtual QCString trAuthor(bool first_capital, bool singular) { - //QCString result((first_capital ? "Forfatter" : "forfatter")); - //if (!singular) result+="e"; - //return result; - return createNoun(first_capital, singular, "forfatter", "e"); + return createNoun(first_capital, singular, "forfatter", "e"); } ////////////////////////////////////////////////////////////////////////// @@ -1392,7 +1325,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trRTFTableOfContents() { - return "Indholdsfortegnelse"; + return "Indholdsfortegnelse"; } ////////////////////////////////////////////////////////////////////////// @@ -1404,7 +1337,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trDeprecatedList() { - return "Liste over fortidslevn, hvis brug frarådes"; + return "Liste over fortidslevn, hvis brug frarådes"; } ////////////////////////////////////////////////////////////////////////// @@ -1416,7 +1349,7 @@ class TranslatorDanish : public TranslatorAdapter_1_3 */ virtual QCString trEvents() { - return "Begivenheder"; + return "Begivenheder"; } /*! Header used for the documentation section of a class' events. */ virtual QCString trEventDocumentation() @@ -1424,6 +1357,89 @@ class TranslatorDanish : public TranslatorAdapter_1_3 return "Begivenhedsdokumentation"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /* Java: Entities with package scope... */ + virtual QCString trPackageTypes() + { return "Typer med pakke-scope"; } + virtual QCString trPackageMembers() + { return "Metoder med pakke-scope"; } + virtual QCString trStaticPackageMembers() + { return "Statiske metoder med pakke-scope"; } + virtual QCString trPackageAttribs() + { return "Attributter med pakke-scope"; } + virtual QCString trStaticPackageAttribs() + { return "Statiske attributter med pakke-scope"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Alle"; + } + + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Her er kald-grafen for denne funktion:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return "Søg efter"; + } + + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Søgeresultater"; + } + + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) { + return "Beklager - ingen dokumenter passede til din forespørgsel."; + } else if (numDocuments==1) { + return "Fandt <b>1</b> dokument, der passer til din forespørgsel."; + } else { + return + "Fandt <b>$num</b> dokumenter, der passer til din forespørgsel. " + "De, der passer bedst, vises først."; + } + } + + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Fundne ord:"; //translation? + } /*---------- For internal use: ----------------------------------------*/ protected: @@ -1431,13 +1447,13 @@ class TranslatorDanish : public TranslatorAdapter_1_3 * \internal */ QCString createNoun(bool first_capital, bool singular, - const char* base, const char* plurSuffix) - { - QCString result(base); - if (first_capital) result.at(0) = toupper(result.at(0)); - if (!singular) result+=plurSuffix; - return result; - } + const char* base, const char* plurSuffix) + { + QCString result(base); + if (first_capital) result.at(0) = toupper(result.at(0)); + if (!singular) result+=plurSuffix; + return result; + } }; #endif diff --git a/src/translator_ru.h b/src/translator_ru.h index a7ef03c..f97a008 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -1554,6 +1554,7 @@ class TranslatorRussian : public Translator return decode( "îÁÊÄÅÎÏ:" ); } +private: QCString as_documents( int num ) { if( num % 10 == 1 ) return ""; diff --git a/src/translator_tw.h b/src/translator_tw.h index 646d992..f5e6104 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -41,7 +41,7 @@ // Translator class (by the local maintainer) when the localized // translator is made up-to-date again. -class TranslatorChinesetraditional : public TranslatorAdapter_1_3_3 +class TranslatorChinesetraditional : public Translator { public: @@ -1472,6 +1472,57 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_3_3 return "³o¬O¦¹¨ç¼Æªº¤Þ¥Î¨ç¼Æ¹Ï:"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return "·j´M¯Á¤Þ"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "·j´Mµ²ªG"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "§ä¤£¨ì²Å¦Xªº¸ê®Æ."; + } + else if (numDocuments==1) + { + return "§ä¨ì <b>1</b> µ§²Å¦Xªº¸ê®Æ."; + } + else + { + return "§ä¨ì <b>$num</b> µ§²Å¦Xªº¸ê®Æ. " + "¶V²Å¦Xªºµ²ªGÅã¥Ü¦b¶V«e±."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "²Å¦X:"; + } + }; #endif diff --git a/src/util.cpp b/src/util.cpp index 3cd0c80..4147bcd 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1030,7 +1030,7 @@ QCString removeRedundantWhiteSpace(const QCString &s) result+=' '; result+=s.at(i); } - else if (c=='t' && csp==5 && !isId(s.at(i+1))) // prevent const ::A from being converted to const::A + else if (c=='t' && csp==5 && !(isId(s.at(i+1)) || s.at(i+1)==' ')) // prevent const ::A from being converted to const::A { result+="t "; csp=0; @@ -1208,14 +1208,12 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,FileDef *fileSco (external ? md->isLinkable() : md->isLinkableInProject()) ) { - Definition *d=0; - if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; //printf("Found ref scope=%s\n",d?d->name().data():"<global>"); - if (d && (external ? d->isLinkable() : d->isLinkableInProject())) + if ((external ? md->isLinkable() : md->isLinkableInProject())) { //ol.writeObjectLink(d->getReference(),d->getOutputFileBase(), // md->anchor(),word); - out.writeLink(d->getReference(),d->getOutputFileBase(), + out.writeLink(md->getReference(),md->getOutputFileBase(), md->anchor(),word); found=TRUE; } @@ -1356,8 +1354,9 @@ void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId) else anchor.sprintf("%c%d_%d",id,groupId,count++); if (cd) anchor.prepend(escapeCharsInString(cd->name(),FALSE)); - //printf("Member %s anchor %s\n",md->name().data(),anchor.data()); md->setAnchor(anchor); + //printf("setAnchors(): Member %s outputFileBase=%s anchor %s result %s\n", + // md->name().data(),md->getOutputFileBase().data(),anchor.data(),md->anchor().data()); } } } @@ -2881,8 +2880,8 @@ bool resolveRef(/* in */ const char *scName, ) { //printf("after getDefs md=%p cd=%p fd=%p nd=%p gd=%p\n",md,cd,fd,nd,gd); - *resMember=md; - if (cd) *resContext=cd; + if (md) { *resMember=md; *resContext=md; } + else if (cd) *resContext=cd; else if (nd) *resContext=nd; else if (fd) *resContext=fd; else if (gd) *resContext=gd; @@ -2966,14 +2965,13 @@ bool generateRef(OutputDocInterface &od,const char *scName, { if (md) // link to member { - od.writeObjectLink(compound->getReference(), - compound->getOutputFileBase(), + od.writeObjectLink(md->getReference(), + md->getOutputFileBase(), md->anchor(),linkText); // generate the page reference (for LaTeX) - if (!compound->isReference() && !md->anchor().isEmpty() && - md->isLinkableInProject()) + if (md->isLinkableInProject()) { - writePageRef(od,compound->getOutputFileBase(),md->anchor()); + writePageRef(od,md->getOutputFileBase(),md->anchor()); } } else // link to compound @@ -3007,12 +3005,10 @@ bool resolveLink(/* in */ const char *scName, /* in */ const char *lr, /* in */ bool inSeeBlock, /* out */ Definition **resContext, - /* out PageInfo **resPageInfo,*/ /* out */ QCString &resAnchor ) { *resContext=0; - //*resPageInfo=0; QCString linkRef=lr; FileDef *fd; @@ -3094,16 +3090,6 @@ bool generateLink(OutputDocInterface &od,const char *clName, //printf("generateLink linkText=%s\n",linkText.data()); if (resolveLink(clName,lr,inSeeBlock,&compound,anchor)) { - //if (pageInfo) // link to page - //{ - // od.writeObjectLink(pageInfo->getReference(), - // pageInfo->getOutputFileBase(),anchor,linkText); - // if (!pageInfo->isReference()) - // { - // writePageRef(od,pageInfo->getOutputFileBase(),anchor); - // } - //} - //else if (compound) // link to compound { if (lt==0 && anchor.isEmpty() && /* compound link */ @@ -4022,9 +4008,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, pageName=pd->name(); else pageName=pd->name().lower(); - //setFileNameForSections(anchors,pageName,pi); pd->setFileName(pageName); - //pi->addSections(anchors); //printf("Appending page `%s'\n",baseName.data()); Doxygen::pageSDict->append(baseName,pd); diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 1ba6fe1..9498cdb 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -736,6 +736,9 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De t << " <detaileddescription>" << endl; writeXMLDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation()); t << " </detaileddescription>" << endl; + t << " <inbodydescription>" << endl; + writeXMLDocBlock(t,md->docFile(),md->inbodyLine(),md->getOuterScope(),md,md->inbodyDocumentation()); + t << " </inbodydescription>" << endl; if (md->getDefLine()!=-1) { t << " <location file=\"" @@ -803,12 +806,9 @@ static void writeListOfAllMembers(ClassDef *cd,QTextStream &t) for (mii.toFirst();(mi=mii.current());++mii) { MemberDef *md=mi->memberDef; - ClassDef *cd=md->getClassDef(); - Definition *d=md->getGroupDef(); - if (d==0) d = cd; Protection prot = mi->prot; Specifier virt=md->virtualness(); - t << " <member refid=\"" << d->getOutputFileBase() << "_1" << + t << " <member refid=\"" << md->getOutputFileBase() << "_1" << md->anchor() << "\" prot=\""; switch (prot) { @@ -876,7 +876,15 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) writeXMLHeader(t); t << " <compounddef id=\"" << cd->getOutputFileBase() << "\" kind=\"" - << cd->compoundTypeString() << "\">" << endl; + << cd->compoundTypeString() << "\" prot=\""; + switch (cd->protection()) + { + case Public: t << "public"; break; + case Protected: t << "protected"; break; + case Private: t << "private"; break; + case Package: t << "package"; break; + } + t << "\">" << endl; t << " <compoundname>"; writeXMLString(t,cd->name()); t << "</compoundname>" << endl; |