summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp37
-rw-r--r--src/code.l8
-rw-r--r--src/commentscan.l16
-rw-r--r--src/config.l12
-rw-r--r--src/definition.cpp9
-rw-r--r--src/docparser.cpp22
-rw-r--r--src/doctokenizer.l2
-rw-r--r--src/doxygen.cpp178
-rw-r--r--src/doxygen.h2
-rw-r--r--src/doxytag.l257
-rw-r--r--src/entry.h1
-rw-r--r--src/filedef.cpp30
-rw-r--r--src/filedef.h6
-rw-r--r--src/groupdef.cpp12
-rw-r--r--src/htags.cpp176
-rw-r--r--src/htags.h28
-rw-r--r--src/htmlgen.cpp8
-rw-r--r--src/htmlgen.h3
-rw-r--r--src/index.cpp277
-rw-r--r--src/language.cpp6
-rw-r--r--src/latexgen.cpp3
-rw-r--r--src/latexgen.h2
-rw-r--r--src/libdoxygen.pro.in2
-rw-r--r--src/mangen.cpp3
-rw-r--r--src/mangen.h2
-rw-r--r--src/memberdef.cpp47
-rw-r--r--src/memberdef.h1
-rw-r--r--src/namespacedef.cpp3
-rw-r--r--src/outputgen.h3
-rw-r--r--src/outputlist.cpp13
-rw-r--r--src/outputlist.h8
-rw-r--r--src/pagedef.cpp29
-rw-r--r--src/pagedef.h3
-rw-r--r--src/rtfgen.cpp4
-rw-r--r--src/rtfgen.h2
-rw-r--r--src/scanner.l6
-rw-r--r--src/search.php32
-rw-r--r--src/search_php.h32
-rw-r--r--src/searchindex.cpp28
-rw-r--r--src/translator_en.h4
-rw-r--r--src/translator_hu.h2
-rw-r--r--src/translator_za.h129
-rw-r--r--src/util.cpp103
-rw-r--r--src/util.h3
-rw-r--r--src/xmlgen.cpp6
45 files changed, 1149 insertions, 411 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 35b976a..4aed1ee 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1034,6 +1034,30 @@ void ClassDef::writeDocumentation(OutputList &ol)
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),name());
+ {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.writeString("<!-- doxytag: class=<");
+ ol.docify(name());
+ ol.writeString("> -->");
+ if (m_inherits->count()>0)
+ {
+ BaseClassListIterator bli(*m_inherits);
+ ol.writeString("<!-- doxytag: inherits=<");
+ BaseClassDef *bcd=0;
+ bool first=TRUE;
+ for (bli.toFirst();(bcd=bli.current());++bli)
+ {
+ if (!first) ol.writeString(",");
+ ol.docify(bcd->classDef->name());
+ first=FALSE;
+ }
+ ol.writeString("> -->");
+ }
+ ol.popGeneratorState();
+ }
+
+
if (Config_getBool("SEARCHENGINE"))
{
Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase());
@@ -1543,6 +1567,8 @@ void ClassDef::writeMemberPages(OutputList &ol)
void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
+ static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
+
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
@@ -1569,6 +1595,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
+ if (createSubDirs) ol.writeString("../../");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->name());
@@ -2141,8 +2168,16 @@ void ClassDef::mergeMembers()
if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE))
// member is in the same or a base class
{
+#ifdef NEWMATCH
+ found=matchArguments2(
+ srcMd->getOuterScope(),srcMd->getFileDef(),srcMd->argumentList(),
+ dstMd->getOuterScope(),dstMd->getFileDef(),dstMd->argumentList(),
+ TRUE
+ );
+#else
found=matchArguments(srcMd->argumentList(),
- dstMd->argumentList());
+ dstMd->argumentList());
+#endif
//printf(" Yes, matching (%s<->%s): %d\n",
// argListToString(srcMd->argumentList()).data(),
// argListToString(dstMd->argumentList()).data(),
diff --git a/src/code.l b/src/code.l
index 3b272cd..d0e0902 100644
--- a/src/code.l
+++ b/src/code.l
@@ -461,6 +461,11 @@ static void startCodeLine()
g_insideBody = FALSE;
g_searchingForBody = TRUE;
g_realScope = d->name().copy();
+ g_type.resize(0);
+ g_name.resize(0);
+ g_args.resize(0);
+ g_parmType.resize(0);
+ g_parmName.resize(0);
//printf("Real scope: `%s'\n",g_realScope.data());
g_bodyCurlyCount = 0;
QCString lineAnchor;
@@ -2260,6 +2265,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_theCallContext.pushScope();
}
g_args.resize(0);
+ g_parmType.resize(0);
+ g_parmName.resize(0);
}
}
/*
@@ -2427,6 +2434,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<MemberCall2,FuncCall>{OPERATOR} { // operator
if (strcmp(yytext,"*") && strcmp(yytext,"&")) // typically a pointer or reference
{
+ // not a * or &
g_parmType.resize(0);g_parmName.resize(0);
}
g_code->codify(yytext);
diff --git a/src/commentscan.l b/src/commentscan.l
index bbb0ab6..e8f3725 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -545,6 +545,19 @@ static void addSection()
//-----------------------------------------------------------------------------
+// strip trailing whitespace (excluding newlines) from string s
+static void stripTrailingWhiteSpace(QCString &s)
+{
+ uint len = s.length();
+ int i = (int)len-1;
+ char c;
+ while (i>=0 && ((c = s.at(i))==' ' || c=='\t' || c=='\r')) i--;
+ if (i!=(int)len-1)
+ {
+ s.resize(i+2); // string upto and including char at pos i and \0 terminator
+ }
+}
+
// selects the output to write to
static inline void setOutput(OutputContext ctx)
{
@@ -610,6 +623,7 @@ static inline void setOutput(OutputContext ctx)
switch(inContext)
{
case OutputDoc:
+ stripTrailingWhiteSpace(current->doc);
if (current->docFile.isEmpty())
{
current->docFile = yyFileName;
@@ -842,7 +856,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
addOutput(yytext[2]);
}
<Comment>(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command)
- if (inContext)
+ if (inContext==OutputBrief)
{
setOutput(OutputDoc);
}
diff --git a/src/config.l b/src/config.l
index 4750d59..43bfb32 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1936,12 +1936,22 @@ void Config::create()
);
cb->addDependency("SOURCE_BROWSER");
cb = addBool(
+ "USE_HTAGS",
+ "If the USE_HTAGS tag is set to YES then the references to source code \n"
+ "will point to the HTML generated by the htags(1) tool instead of doxygen \n"
+ "built-in source browser. The htags tool is part of GNU's global source \n"
+ "tagging system (see http://www.gnu.org/software/global/global.html) \n",
+ FALSE
+ );
+ cb->addDependency("SOURCE_BROWSER");
+ cb = addBool(
"VERBATIM_HEADERS",
"If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n"
"will generate a verbatim copy of the header file for each class for \n"
"which an include is specified. Set to NO to disable this. \n",
TRUE
- );
+ );
+
//-----------------------------------------------------------------------------------------------
addInfo( "Index","configuration options related to the alphabetical class index");
//-----------------------------------------------------------------------------------------------
diff --git a/src/definition.cpp b/src/definition.cpp
index ad35e26..635302d 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -31,6 +31,7 @@
#include "groupdef.h"
#include "pagedef.h"
#include "section.h"
+#include "htags.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
@@ -368,7 +369,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
{
QCString lineStr,anchorStr;
lineStr.sprintf("%d",m_startBodyLine);
- anchorStr.sprintf("l%05d",m_startBodyLine);
+ anchorStr.sprintf(Htags::useHtags ? "%d" : "l%05d",m_startBodyLine);
ol.newParagraph();
if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{
@@ -584,9 +585,11 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
bool Definition::hasDocumentation() const
{
static bool extractAll = Config_getBool("EXTRACT_ALL");
+ static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
return !m_doc.isEmpty() || // has detailed docs
!m_brief.isEmpty() || // has brief description
- extractAll; // extract everything
+ extractAll || // extract everything
+ (sourceBrowser && m_startBodyLine!=-1 && m_bodyDef); // link to definition
}
void Definition::addSourceReferencedBy(MemberDef *md)
@@ -783,7 +786,7 @@ void Definition::writePathFragment(OutputList &ol) const
else
{
ol.writeString("&nbsp;");
- ol.writeString("/");
+ ol.writeString("&raquo");
ol.writeString("&nbsp;");
}
}
diff --git a/src/docparser.cpp b/src/docparser.cpp
index d69f6a9..99def6e 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -866,6 +866,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
//printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE);
if (member && member->isLinkable()) // member link
{
+ if (member->isObjCMethod())
+ {
+ bool localLink = g_memberDef ? member->getClassDef()==g_memberDef->getClassDef() : FALSE;
+ name = member->objCMethodName(localLink,g_inSeeBlock);
+ }
children.append(new
DocLinkedWord(parent,name,
member->getReference(),
@@ -929,7 +934,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
}
else // normal non-linkable word
{
- children.append(new DocWord(parent,g_token->name));
+ if (g_token->name.at(0)=='#')
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: explicit link request to '%s' could not be resolved",name.data());
+ }
+ children.append(new DocWord(parent,name));
}
}
@@ -1914,7 +1923,6 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
ASSERT(!target.isEmpty());
m_relPath = g_relPath;
SectionInfo *sec = Doxygen::sectionDict[target];
- //printf("DocRef::DocRef(target=%s) sec=%p\n",target.data(),sec);
if (sec) // ref to section or anchor
{
m_text = sec->title;
@@ -1943,7 +1951,15 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
((GroupDef *)compound)->groupTitle() /* with title */
)
{
- m_text=((GroupDef *)compound)->groupTitle(); // use group's title as l
+ m_text=((GroupDef *)compound)->groupTitle(); // use group's title as link
+ }
+ else if (compound->definitionType()==Definition::TypeMember &&
+ ((MemberDef*)compound)->isObjCMethod())
+ {
+ // Objective C Method
+ MemberDef *member = (MemberDef*)compound;
+ bool localLink = g_memberDef ? member->getClassDef()==g_memberDef->getClassDef() : FALSE;
+ m_text = member->objCMethodName(localLink,g_inSeeBlock);
}
m_file = compound->getOutputFileBase();
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 2834b6c..8810ba4 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -331,7 +331,7 @@ HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
-REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}?
+REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*({ID}(":")?){FUNCARG}?
%option noyywrap
%option yylineno
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 9e0d500..d49e706 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -66,6 +66,7 @@
#include "cmdmapper.h"
#include "searchindex.h"
#include "parserintf.h"
+#include "htags.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
@@ -231,6 +232,7 @@ static void addRelatedPage(Entry *root)
);
if (pd)
{
+#if 0
Definition *ctx = 0;
// find the page's context
@@ -255,6 +257,7 @@ static void addRelatedPage(Entry *root)
ctx=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
}
pd->setOuterScope(ctx);
+#endif
pd->addSectionsToDefinition(root->anchors);
//pi->context = ctx;
}
@@ -1454,7 +1457,7 @@ static MemberDef *addVariableToClass(
def=qualScope+scopeSeparator+name+root->args;
}
}
- if (def.left(7)=="static ") def=def.right(def.length()-7);
+ def.stripPrefix("static ");
// see if the member is already found in the same scope
// (this may be the case for a static member that is initialized
@@ -1600,7 +1603,7 @@ static MemberDef *addVariableToFile(
def=name+root->args;
}
}
- if (def.left(7)=="static ") def=def.right(def.length()-7);
+ def.stripPrefix("static ");
MemberName *mn=Doxygen::functionNameSDict[name];
if (mn)
@@ -2085,7 +2088,9 @@ static void addMethodToClass(Entry *root,ClassDef *cd,
md->setMemberSpecifiers(root->memSpec);
md->setMemberGroupId(root->mGrpId);
bool ambig;
- md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
+ FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+ md->setBodyDef(fd);
+ md->setFileDef(fd);
//md->setScopeTemplateArguments(root->tArgList);
md->addSectionsToDefinition(root->anchors);
QCString def;
@@ -2306,12 +2311,23 @@ static void buildFunctionList(Entry *root)
QCString nsName,rnsName;
if (mnd) nsName = mnd->name().copy();
if (rnd) rnsName = rnd->name().copy();
+#ifdef NEWMATCH
+ bool ambig;
+ FileDef *rfd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+#else
NamespaceSDict *unl = mfd ? mfd->getUsedNamespaces() : 0;
SDict<Definition> *ucl = mfd ? mfd->getUsedClasses() : 0;
+#endif
//printf("matching arguments for %s%s %s%s\n",
// md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data());
if (
+#ifdef NEWMATCH
+ matchArguments2(md->getOuterScope(),mfd,md->argumentList(),
+ rnd ? rnd : Doxygen::globalScope,rfd,root->argList,
+ FALSE)
+#else
matchArguments(md->argumentList(),root->argList,0,nsName,FALSE,unl,ucl)
+#endif
)
{
GroupDef *gd=0;
@@ -2361,6 +2377,7 @@ static void buildFunctionList(Entry *root)
else if (!md->documentation().isEmpty() && !root->doc.isEmpty() && mnd==rnd)
{
warn(root->docFile,root->docLine,"Warning: member %s: ignoring the detailed description found here, since another one was found at line %d of file %s!",md->name().data(),md->docLine(),md->docFile().data());
+ //printf("md->docs=[%s] root->docs=[%s]\n",md->documentation().data(),root->doc.data());
}
if (md->briefDescription().isEmpty() && !root->brief.isEmpty())
@@ -2583,13 +2600,23 @@ static void findFriends()
//printf("Checking for matching arguments
// mmd->isRelated()=%d mmd->isFriend()=%d mmd->isFunction()=%d\n",
// mmd->isRelated(),mmd->isFriend(),mmd->isFunction());
+#ifndef NEWMATCH
NamespaceDef *nd=mmd->getNamespaceDef();
+#endif
if ((mmd->isFriend() || (mmd->isRelated() && mmd->isFunction())) &&
+#ifdef NEWMATCH
+ matchArguments2(mmd->getOuterScope(), mmd->getFileDef(), mmd->argumentList(),
+ fmd->getOuterScope(), fmd->getFileDef(), fmd->argumentList(),
+ TRUE
+ )
+
+#else
matchArguments(mmd->argumentList(),
fmd->argumentList(),
mmd->getClassDef()->name(),
nd ? nd->name().data() : 0
)
+#endif
) // if the member is related and the arguments match then the
// function is actually a friend.
{
@@ -2702,7 +2729,14 @@ static void transferFunctionDocumentation()
// mdef, mdef ? mdef->name().data() : "",
// mdec, mdec ? mdec->name().data() : "");
if (mdef && mdec &&
+#ifdef NEWMATCH
+ matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),mdef->argumentList(),
+ mdec->getOuterScope(),mdec->getFileDef(),mdec->argumentList(),
+ TRUE
+ )
+#else
matchArguments(mdef->argumentList(),mdec->argumentList())
+#endif
) /* match found */
{
//printf("Found member %s: definition in %s (doc=`%s') and declaration in %s (doc=`%s')\n",
@@ -2837,7 +2871,14 @@ static void transferFunctionReferences()
mdef=md;
}
if (mdef && mdec &&
+#ifdef NEWMATCH
+ matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),mdef->argumentList(),
+ mdec->getOuterScope(),mdec->getFileDef(),mdec->argumentList(),
+ TRUE
+ )
+#else
matchArguments(mdef->argumentList(),mdec->argumentList())
+#endif
) /* match found */
{
MemberSDict *defDict = mdef->getReferencesMembers();
@@ -2923,7 +2964,14 @@ static void transferRelatedFunctionDocumentation()
{
//printf(" Member found: related=`%d'\n",rmd->isRelated());
if (rmd->isRelated() && // related function
+#ifdef NEWMATCH
+ matchArguments2( md->getOuterScope(), md->getFileDef(), md->argumentList(),
+ rmd->getOuterScope(),rmd->getFileDef(),rmd->argumentList(),
+ TRUE
+ )
+#else
matchArguments(md->argumentList(),rmd->argumentList()) // match argument lists
+#endif
)
{
//printf(" Found related member `%s'\n",md->name().data());
@@ -3962,23 +4010,37 @@ static void addMemberDocs(Entry *root,
MemberDef *md, const char *funcDecl,
ArgumentList *al,
bool over_load,
- NamespaceSDict *nl
+ NamespaceSDict *
+#ifndef NEWMATCH
+ nl
+#endif
)
{
//printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s' memSpec=%d\n",
// root->parent->name.data(),md->name().data(),md->argsString(),funcDecl,root->memSpec);
QCString fDecl=funcDecl;
// strip extern specifier
- if (fDecl.left(7)=="extern ") fDecl=fDecl.right(fDecl.length()-7);
+ fDecl.stripPrefix("extern ");
md->setDefinition(fDecl);
md->enableCallGraph(root->callGraph);
ClassDef *cd=md->getClassDef();
NamespaceDef *nd=md->getNamespaceDef();
QCString fullName;
- if (cd) fullName = cd->name();
- else if (nd) fullName = nd->name();
+ if (cd)
+ fullName = cd->name();
+ else if (nd)
+ fullName = nd->name();
+
if (!fullName.isEmpty()) fullName+="::";
fullName+=md->name();
+ bool ambig;
+ FileDef *rfd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+
+#ifdef NEWMATCH
+ // TODO determine scope based on root not md
+ Definition *rscope = md->getOuterScope();
+#endif
+
if (al)
{
//printf("merging arguments (1)\n");
@@ -3986,12 +4048,20 @@ static void addMemberDocs(Entry *root,
}
else
{
- if (matchArguments(md->argumentList(),root->argList,
- cd ? cd->name().data() : 0,
- nd ? nd->name().data() : 0,
- TRUE,
- nl
- )
+ if (
+#ifdef NEWMATCH
+ matchArguments2( md->getOuterScope(), md->getFileDef(), md->argumentList(),
+ rscope,rfd,root->argList,
+ TRUE
+ )
+#else
+ matchArguments(md->argumentList(),root->argList,
+ cd ? cd->name().data() : 0,
+ nd ? nd->name().data() : 0,
+ TRUE,
+ nl
+ )
+#endif
)
{
//printf("merging arguments (2)\n");
@@ -4064,16 +4134,14 @@ static void addMemberDocs(Entry *root,
//{
// md->setBody(root->body);
//}
- bool ambig;
- FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
- if (fd)
+ if (rfd)
{
if ((md->getStartBodyLine()==-1 && root->bodyLine!=-1) ||
(md->isVariable() && !root->explicitExternal))
{
md->setBodySegment(root->bodyLine,root->endBodyLine);
- md->setBodyDef(fd);
+ md->setBodyDef(rfd);
}
md->setRefItems(root->sli);
@@ -4176,10 +4244,22 @@ static bool findGlobalMember(Entry *root,
Debug::print(Debug::FindMembers,0,"4. Try to add member `%s' to scope `%s'\n",
md->name().data(),namespaceName.data());
QCString nsName = nd ? nd->name().data() : "";
+
+#ifdef NEW_MATCH
+ NamespaceDef *rnd = 0;
+ if (!namespaceName.isEmpty()) rnd = Doxygen::namespaceSDict[namespaceName];
+#endif
+
bool matching=
(md->argumentList()==0 && root->argList->count()==0) ||
md->isVariable() || md->isTypedef() || /* in case of function pointers */
+#ifdef NEW_MATCH
+ matchArguments2(md->getOuterScope(),md->getFileDef(),md->argumentList(),
+ rnd ? rnd : Doxygen::globalScope,fd,root->argList,
+ FALSE);
+#else
matchArguments(md->argumentList(),root->argList,0,nsName,FALSE,nl,cl);
+#endif
// for static members we also check if the comment block was found in
// the same file. This is needed because static members with the same
@@ -4709,7 +4789,6 @@ static void findMember(Entry *root,
className.data(),namespaceName.data()
);
-//#define NEWMATCH
#ifdef NEWMATCH
bool matching=
@@ -5054,6 +5133,10 @@ static void findMember(Entry *root,
}
}
}
+
+ bool ambig;
+ FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+
if ((mn=Doxygen::memberNameSDict[funcName])==0)
{
mn=new MemberName(funcName);
@@ -5064,8 +5147,15 @@ static void findMember(Entry *root,
MemberDef *rmd=mn->first();
while (rmd && newMember) // see if we got another member with matching arguments
{
+
newMember=newMember &&
+#ifdef NEWMATCH
+ !matchArguments2(rmd->getOuterScope(),rmd->getFileDef(),rmd->argumentList(),
+ cd,fd,root->argList,
+ TRUE);
+#else
!matchArguments(rmd->argumentList(),root->argList,className,namespaceName);
+#endif
if (newMember) rmd=mn->next();
}
if (!newMember && rmd) // member already exists as rmd -> add docs
@@ -5117,10 +5207,17 @@ static void findMember(Entry *root,
while (rmd && !found) // see if we got another member with matching arguments
{
// check for matching argument lists
- if (matchArguments(rmd->argumentList(),
+ if (
+#ifdef NEWMATCH
+ matchArguments2(rmd->getOuterScope(),rmd->getFileDef(),rmd->argumentList(),
+ cd,fd,root->argList,
+ TRUE)
+#else
+ matchArguments(rmd->argumentList(),
root->argList,
className,
namespaceName)
+#endif
)
{
found=TRUE;
@@ -5139,8 +5236,6 @@ static void findMember(Entry *root,
// entry
{
md->setBodySegment(root->bodyLine,root->endBodyLine);
- bool ambig;
- FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
md->setBodyDef(fd);
}
@@ -5729,6 +5824,13 @@ static void findEnumDocumentation(Entry *root)
}
md->addSectionsToDefinition(root->anchors);
+
+ GroupDef *gd=md->getGroupDef();
+ if (gd==0 &&root->groups->first()!=0) // member not grouped but out-of-line documentation is
+ {
+ addMemberToGroups(root,md);
+ }
+
found=TRUE;
}
}
@@ -5740,6 +5842,7 @@ static void findEnumDocumentation(Entry *root)
}
else // enum outside class
{
+ //printf("Enum outside class: %s grpId=%d\n",name.data(),root->mGrpId);
MemberDef *md;
MemberName *mn=Doxygen::functionNameSDict[name];
if (mn && (md=mn->getFirst()))
@@ -5750,6 +5853,13 @@ static void findEnumDocumentation(Entry *root)
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
md->addSectionsToDefinition(root->anchors);
md->setMemberGroupId(root->mGrpId);
+
+ GroupDef *gd=md->getGroupDef();
+ if (gd==0 &&root->groups->first()!=0) // member not grouped but out-of-line documentation is
+ {
+ addMemberToGroups(root,md);
+ }
+
found=TRUE;
}
}
@@ -5845,7 +5955,16 @@ static void computeMemberRelations()
// argListToString(bmd->argumentList()).data(),
// argListToString(md->argumentList()).data()
// );
- if ( matchArguments(bmd->argumentList(),md->argumentList()) )
+ if (
+#ifdef NEWMATCH
+ matchArguments2(bmd->getOuterScope(),bmd->getFileDef(),bmd->argumentList(),
+ md->getOuterScope(), md->getFileDef(), md->argumentList(),
+ TRUE
+ )
+#else
+ matchArguments(bmd->argumentList(),md->argumentList())
+#endif
+ )
{
//printf(" match found!\n");
if (mcd && bmcd &&
@@ -8704,6 +8823,16 @@ void generateOutput()
outputList->add(new RTFGenerator);
RTFGenerator::init();
}
+
+ if (Config_getBool("USE_HTAGS"))
+ {
+ Htags::useHtags = TRUE;
+ QCString htmldir = Config_getString("HTML_OUTPUT");
+ if (!Htags::execute(htmldir))
+ err("Error: USE_HTAGS is YES but htags(1) failed. \n");
+ if (!Htags::loadFilemap(htmldir))
+ err("Error: htags(1) ended normally but failed to load the filemap. \n");
+ }
/**************************************************************************
* Generate documentation *
@@ -8777,7 +8906,10 @@ void generateOutput()
generateExampleDocs();
msg("Generating file sources...\n");
- generateFileSources();
+ if (!Htags::useHtags)
+ {
+ generateFileSources();
+ }
transferFunctionReferences();
msg("Generating file documentation...\n");
diff --git a/src/doxygen.h b/src/doxygen.h
index 78067ae..d67165c 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -123,4 +123,6 @@ void readConfiguration(int argc, char **argv);
void parseInput();
void generateOutput();
+#define NEWMATCH
+
#endif
diff --git a/src/doxytag.l b/src/doxytag.l
index 2b326f5..b9cf479 100644
--- a/src/doxytag.l
+++ b/src/doxytag.l
@@ -91,6 +91,7 @@ static QCString memberRef;
static QCString memberName;
static QCString memberArgs;
static QCString className;
+static QCString baseName;
static QCString docBaseLink;
static QCString docAnchor;
static QCString docRefName;
@@ -119,6 +120,7 @@ static void addClass(const char *clName)
{
if (classDict[clName]==0)
{
+ //printf("addClass(%s)\n",clName);
ClassDef *cd=new ClassDef;
cd->name=clName;
cd->fileName=yyFileName;
@@ -149,13 +151,22 @@ static void addBases(const char *clName)
static void addMember(const char *memName,const char *memRef,const char *memArgs)
{
+ //printf("addMember(%s,%s,%s)\n",memName,memRef,memArgs);
ClassDef *cd=classList.last();
- MemberDef *md;
- md=new MemberDef;
- md->name=memName;
- md->anchor=memRef;
- md->args=memArgs;
- cd->memberList.append(md);
+ if (cd)
+ {
+ MemberDef *md;
+ md=new MemberDef;
+ md->name=memName;
+ md->anchor=memRef;
+ md->args=memArgs;
+ cd->memberList.append(md);
+ }
+ else
+ {
+ //printf("Warning: found member %s %s but not class was found to insert it!\n",
+ // memName,memArgs);
+ }
}
static void addReference()
@@ -214,12 +225,25 @@ QCString unhtmlify(const char *str)
%x CheckConstructor
%x SkipPreformated
+%x Qt3ReadType
+%x Qt3ReadAnchor
+%x Qt3ReadName
+%x Qt3ReadOperator
+%x Qt3ReadArgs
+
+%x DoxReadAnchor
+%x DoxReadName
+%x DoxReadArgs
+%x DoxClassName
+%x DoxClassBase
+
%%
<Start>^"<li>" {
BEGIN( SearchClassFile );
}
-<Start>^"<td"[^\n]*"<h1 align=center>" | // Qt-3.x.x+
+<Start>^"<td"[^\n]*"<h1 align=center>" | // Qt-3.x.x
+<Start>"</table><h1 align=\"center\">" | // Qt-4
<Start>^"<h1 align=center>" { // Qt variant
BEGIN( ReadClassName );
}
@@ -233,6 +257,207 @@ QCString unhtmlify(const char *str)
<Start>^"<h3 class=\"fn\">"/[a-z_A-Z0-9] { // needed due to inconsistency in the Qt docs
BEGIN( CheckConstructor );
}
+
+ /* --------------------------------------------------- */
+ /* Qt member extraction rules */
+
+<Start>^"<h3 class=fn>" {
+ BEGIN( Qt3ReadType );
+ }
+<Start>^"<h3 class=fn><a name=\"" { // Qt-3.3+ html file
+ BEGIN( Qt3ReadAnchor );
+ }
+<Start>^"<h3 class=\"fn\"><a name=\"" { // Qt-4 html file
+ BEGIN( Qt3ReadAnchor );
+ }
+<Qt3ReadType>"<a name=\"" {
+ BEGIN( Qt3ReadAnchor );
+ }
+<Qt3ReadType>.
+<Qt3ReadAnchor>[~a-z_A-Z0-9\-\[\]*+%\^&|!]+ {
+ memberRef = yytext;
+ }
+<Qt3ReadAnchor>"\"></a>" {
+ BEGIN( Qt3ReadName );
+ }
+<Qt3ReadAnchor>. {
+ BEGIN( Start );
+ }
+<Qt3ReadName>[a-z_A-Z0-9]+"::operator" {
+ memberName="operator";
+ BEGIN(Qt3ReadOperator);
+ }
+<Qt3ReadOperator>[+\-*/%\^&|~!=\[\]]+ { memberName+=yytext; }
+<Qt3ReadOperator>"&lt;" { memberName+="<"; }
+<Qt3ReadOperator>"&gt;" { memberName+=">"; }
+<Qt3ReadOperator>"new" { memberName+=" new"; }
+<Qt3ReadOperator>"delete" { memberName+=" delete"; }
+<Qt3ReadOperator>"()" { memberName+="()"; BEGIN( Qt3ReadArgs ); }
+<Qt3ReadOperator>. { unput(*yytext); BEGIN( Qt3ReadArgs ); }
+<Qt3ReadName>[a-z_A-Z0-9]+"::"[~a-z_A-Z0-9]+ {
+ memberName=yytext;
+ memberName=memberName.mid(memberName.find("::")+2);
+ BEGIN(Qt3ReadArgs);
+ }
+<Qt3ReadName>.
+<Qt3ReadArgs>[ \t]*"(" {
+ memberArgs+="(";
+ }
+<Qt3ReadArgs>"&amp;" { memberArgs+="&"; }
+<Qt3ReadArgs>"&lt;" { memberArgs+="<"; }
+<Qt3ReadArgs>"&gt;" { memberArgs+=">"; }
+<Qt3ReadArgs>"&nbsp;" { memberArgs+=" "; }
+<Qt3ReadArgs>"</h3>" {
+ addMember(memberName,memberRef,memberArgs);
+ memberName.resize(0);
+ memberRef.resize(0);
+ memberArgs.resize(0);
+ BEGIN(Start);
+ }
+<Qt3ReadArgs>"<"[^>]+">"
+<Qt3ReadArgs>")" {
+ memberArgs+=")";
+ addMember(memberName,memberRef,memberArgs);
+ memberName.resize(0);
+ memberRef.resize(0);
+ memberArgs.resize(0);
+ BEGIN(Start);
+ }
+<Qt3ReadArgs>[a-z_A-Z0-9]+ { memberArgs+=yytext; }
+<Qt3ReadArgs>. { memberArgs+=*yytext; }
+
+ /* --------------------------------------------------- */
+ /* Doxygen class extraction rules */
+
+<Start>"<!-- doxytag: class=<" {
+ className.resize(0);
+ BEGIN(DoxClassName);
+ }
+<DoxClassName>[^&>]+ {
+ className=yytext;
+ addClass(className);
+ }
+<DoxClassName>"&lt;" {
+ className+="<";
+ }
+<DoxClassName>"&gt;" {
+ className+=">";
+ }
+<DoxClassName>"&amp;" {
+ className+="&";
+ }
+<DoxClassName>. {
+ className+=*yytext;
+ }
+<DoxClassName>"> -->" {
+ BEGIN(Start);
+ }
+
+ /* --------------------------------------------------- */
+ /* Doxygen inheritance extraction rules */
+
+<Start>"<!-- doxytag: inherits=<" {
+ bases.clear();
+ baseName.resize(0);
+ BEGIN(DoxClassBase);
+ }
+<DoxClassBase>[^&,>]+ {
+ baseName+=yytext;
+ }
+<DoxClassBase>"," {
+ bases.append(baseName);
+ baseName.resize(0);
+ }
+<DoxClassBase>"&lt;" {
+ baseName+="<";
+ }
+<DoxClassBase>"&gt;" {
+ baseName+=">";
+ }
+<DoxClassBase>"&amp;" {
+ baseName+="&";
+ }
+<DoxClassBase>. {
+ baseName+=*yytext;
+ }
+<DoxClassBase>"> -->" {
+ bases.append(baseName);
+ baseName.resize(0);
+ addBases(className);
+ BEGIN(Start);
+ }
+
+ /* --------------------------------------------------- */
+ /* Doxygen member extraction rules */
+
+<Start>"<!-- doxytag: member=<" {
+ memberName.resize(0);
+ BEGIN(DoxReadName);
+ }
+<DoxReadName>[^&>]+ {
+ memberName+=yytext;
+ }
+<DoxReadName>"&lt;" {
+ memberName+="<";
+ }
+<DoxReadName>"&gt;" {
+ memberName+=">";
+ }
+<DoxReadName>"&amp;" {
+ memberName+="&";
+ }
+<DoxReadName>. {
+ memberName+=*yytext;
+ }
+<DoxReadName>"> ref=<" {
+ memberName=memberName.mid(memberName.find("::")+2);
+ memberRef.resize(0);
+ BEGIN(DoxReadAnchor);
+ }
+<DoxReadAnchor>[^&>]+ {
+ memberRef+=yytext;
+ }
+<DoxReadAnchor>"&lt;" {
+ memberRef+="<";
+ }
+<DoxReadAnchor>"&gt;" {
+ memberRef+=">";
+ }
+<DoxReadAnchor>"&amp;" {
+ memberRef+="&";
+ }
+<DoxReadAnchor>. {
+ memberRef+=*yytext;
+ }
+<DoxReadAnchor>"> args=<" {
+ memberArgs.resize(0);
+ BEGIN(DoxReadArgs);
+ }
+<DoxReadArgs>[^&>]+ {
+ memberArgs+=yytext;
+ }
+<DoxReadArgs>"&lt;" {
+ memberArgs+="<";
+ }
+<DoxReadArgs>"&gt;" {
+ memberArgs+=">";
+ }
+<DoxReadArgs>"&amp;" {
+ memberArgs+="&";
+ }
+<DoxReadArgs>. {
+ memberArgs+=*yytext;
+ }
+<DoxReadArgs>"> -->" {
+ addMember(memberName,memberRef,memberArgs);
+ memberName.resize(0);
+ memberRef.resize(0);
+ memberArgs.resize(0);
+ BEGIN(Start);
+ }
+
+ /** --------------------------------------------------- */
+
<Start>"<pre>" {
BEGIN( SkipPreformated );
}
@@ -353,7 +578,8 @@ QCString unhtmlify(const char *str)
{
classFile=yyFileName;
}
- BEGIN( ReadMemberRef );
+ //BEGIN( ReadMemberRef );
+ BEGIN( Start );
}
<ReadMemberRef>[a-z_A-Z0-9]+ {
memberRef=yytext;
@@ -410,7 +636,9 @@ QCString unhtmlify(const char *str)
// addClass(className);
//}
addMember(memberName,memberRef,memberArgs);
- memberArgs.resize(0);
+ memberName.resize(0);
+ memberRef.resize(0);
+ memberArgs.resize(0);
if (*yytext=='<')
BEGIN( SkipHTMLTag);
else
@@ -446,7 +674,7 @@ void parse(QCString &s)
void parseFile(QFileInfo &fi)
{
- fprintf(stderr,"Parsing file %s...\n",fi.fileName().data());
+ printf("Parsing file %s...\n",fi.fileName().data());
QFile f;
f.setName(fi.absFilePath());
if (f.open(IO_ReadOnly))
@@ -651,7 +879,14 @@ int main(int argc,char **argv)
MemberDef *md=cd->memberList.first();
while (md)
{
- t << " <member kind=\"function\">" << endl;
+ if (md->anchor.right(5)=="-enum")
+ {
+ t << " <member kind=\"enum\">" << endl;
+ }
+ else
+ {
+ t << " <member kind=\"function\">" << endl;
+ }
t << " <name>" << convertToXML(md->name) << "</name>" << endl;
t << " <anchor>" << convertToXML(md->anchor) << "</anchor>" << endl;
t << " <arglist>" << convertToXML(md->args) << "</arglist>" << endl;
diff --git a/src/entry.h b/src/entry.h
index 6d29844..74ddfed 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -87,6 +87,7 @@ struct Argument
QCString attrib; /*!< Argument's attribute (IDL only) */
QCString type; /*!< Argument's type */
+ QCString canType; /*!< Cached value of canonical type (after type resolution). Empty initially. */
QCString name; /*!< Argument's name (may be empty) */
QCString array; /*!< Argument's array specifier (may be empty) */
QCString defval; /*!< Argument's default value (may be empty) */
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 3895db4..a305ca9 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -32,7 +32,7 @@
#include "docparser.h"
#include "ftvhelp.h"
#include "searchindex.h"
-//#include "xml.h"
+#include "htags.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
@@ -583,6 +583,8 @@ void FileDef::writeMemberPages(OutputList &ol)
void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
+ static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
+
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
@@ -604,6 +606,7 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
+ if (createSubDirs) ol.writeString("../../");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->localName());
@@ -1254,3 +1257,28 @@ void FileDef::acquireFileVersion()
}
+QCString FileDef::getSourceFileBase() const
+{
+ if (Htags::useHtags)
+ {
+ return Htags::path2URL(filepath);
+ }
+ else
+ {
+ return convertNameToFile(diskname+"-source");
+ }
+}
+
+/*! Returns the name of the verbatim copy of this file (if any). */
+QCString FileDef::includeName() const
+{
+ if (Htags::useHtags)
+ {
+ return Htags::path2URL(filepath);
+ }
+ else
+ {
+ return convertNameToFile(diskname+"-source");
+ }
+}
+
diff --git a/src/filedef.h b/src/filedef.h
index 0550074..b7feb3d 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -86,12 +86,10 @@ class FileDef : public Definition
QCString getFileBase() const
{ return diskname; }
- QCString getSourceFileBase() const
- { return convertNameToFile(diskname+"-source"); }
+ QCString getSourceFileBase() const;
/*! Returns the name of the verbatim copy of this file (if any). */
- QCString includeName() const
- { return convertNameToFile(diskname+"-source"); }
+ QCString includeName() const;
/*! Returns the absolute path including the file name. */
QCString absFilePath() const { return filepath; }
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index aa0f727..eb733f6 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -218,7 +218,14 @@ bool GroupDef::insertMember(MemberDef *md,bool docOnly)
md->getOuterScope()->definitionType()==Definition::TypeFile);
if (srcMd->isFunction() && md->isFunction() &&
+#ifdef NEWMATCH
+ matchArguments2(srcMd->getOuterScope(),srcMd->getFileDef(),srcMd->argumentList(),
+ md->getOuterScope(),md->getFileDef(),md->argumentList(),
+ TRUE
+ ) &&
+#else
matchArguments(srcMd->argumentList(),md->argumentList()) &&
+#endif
sameScope
)
{
@@ -754,6 +761,8 @@ void GroupDef::writeMemberPages(OutputList &ol)
void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
+ static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
+
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
@@ -775,6 +784,7 @@ void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
+ if (createSubDirs) ol.writeString("../../");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->localName());
@@ -878,7 +888,7 @@ void addMemberToGroups(Entry *root,MemberDef *md)
(gd=Doxygen::groupSDict[g->groupname]) &&
g->pri >= pri)
{
- if (fgd && g->pri==pri)
+ if (fgd && gd!=fgd && g->pri==pri)
{
warn(root->fileName.data(), root->startLine,
"Warning: Member %s found in multiple %s groups! "
diff --git a/src/htags.cpp b/src/htags.cpp
new file mode 100644
index 0000000..681e5b8
--- /dev/null
+++ b/src/htags.cpp
@@ -0,0 +1,176 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2005 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
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include <stdio.h>
+
+#include <qdir.h>
+#include <qdict.h>
+
+#include "qtbc.h"
+#include "htags.h"
+#include "util.h"
+#include "message.h"
+#include "config.h"
+
+
+bool Htags::useHtags = FALSE;
+
+static QDir g_inputDir;
+static QDict<QCString> g_symbolDict(10007);
+
+/*! constructs command line of htags(1) and executes it.
+ * \retval TRUE success
+ * \retval FALSE an error has occured.
+ */
+bool Htags::execute(const QCString &htmldir)
+{
+ static QStrList &inputSource = Config_getList("INPUT");
+ static bool quiet = Config_getBool("QUIET");
+ static bool warnings = Config_getBool("WARNINGS");
+ static QCString htagsOptions = ""; //Config_getString("HTAGS_OPTIONS");
+ static QCString projectName = Config_getString("PROJECT_NAME");
+ static QCString projectNumber = Config_getString("PROJECT_NUMBER");
+
+ QCString cwd = convertToQCString(QDir::currentDirPath());
+ if (inputSource.isEmpty())
+ {
+ g_inputDir.setPath(cwd);
+ }
+ else if (inputSource.count()==1)
+ {
+ g_inputDir.setPath(inputSource.first());
+ if (!g_inputDir.exists())
+ err("Error: Cannot find directory %s. "
+ "Check the value of the INPUT tag in the configuration file.\n",
+ inputSource.first()
+ );
+ }
+ else
+ {
+ err("Error: If you use USE_HTAGS then INPUT should specific a single directory. \n");
+ return FALSE;
+ }
+
+ /*
+ * Construct command line for htags(1).
+ */
+ QCString commandLine = " -g -s -a -n";
+ if (!quiet) commandLine += "-v ";
+ if (warnings) commandLine += "-w ";
+ if (!htagsOptions.isEmpty())
+ {
+ commandLine += ' ';
+ commandLine += htagsOptions;
+ }
+ if (!projectName.isEmpty())
+ {
+ commandLine += "-t \"";
+ commandLine += projectName;
+ if (!projectNumber.isEmpty())
+ {
+ commandLine += '-';
+ commandLine += projectNumber;
+ }
+ commandLine += "\" ";
+ }
+ commandLine += " \"" + htmldir + "\"";
+ QCString oldDir = convertToQCString(QDir::currentDirPath());
+ QDir::setCurrent(g_inputDir.absPath());
+ //printf("CommandLine=[%s]\n",commandLine.data());
+ bool result=iSystem("htags",commandLine,FALSE)==0;
+ QDir::setCurrent(oldDir);
+ return result;
+}
+
+
+/*! load filemap and make index.
+ * \param htmlDir of HTML directory generated by htags(1).
+ * \retval TRUE success
+ * \retval FALSE error
+ */
+bool Htags::loadFilemap(const QCString &htmlDir)
+{
+ QCString fileMapName = htmlDir+"/HTML/FILEMAP";
+ QCString fileMap;
+ QFileInfo fi(fileMapName);
+ /*
+ * Construct FILEMAP dictionary using QDict.
+ *
+ * In FILEMAP, URL includes 'html' suffix but we cut it off according
+ * to the method of FileDef class.
+ *
+ * FILEMAP format:
+ * <NAME>\t<HREF>.html\n
+ * QDICT:
+ * dict[<NAME>] = <HREF>
+ */
+ if (fi.exists() && fi.isReadable())
+ {
+ QFile f(fileMapName);
+ const int maxlen = 8192;
+ QCString line(maxlen+1);
+ line.at(maxlen)='\0';
+ if (f.open(IO_ReadOnly))
+ {
+ while (f.readLine(line.data(),maxlen)>0)
+ {
+ //printf("Read line: %s",line.data());
+ int sep = line.find('\t');
+ if (sep!=-1)
+ {
+ QCString key = line.left(sep).stripWhiteSpace();
+ QCString value = line.mid(sep+1).stripWhiteSpace();
+ int ext=value.findRev('.');
+ if (ext!=-1) value=value.left(ext); // strip extension
+ g_symbolDict.setAutoDelete(TRUE);
+ g_symbolDict.insert(key,new QCString(value));
+ //printf("Key/Value=(%s,%s)\n",key.data(),value.data());
+ }
+ }
+ return TRUE;
+ }
+ else
+ {
+ err("Error: file %s cannot be opened\n",fileMapName.data());
+ }
+ }
+ return FALSE;
+}
+
+/*! convert path name into the url in the hypertext generated by htags.
+ * \param path path name
+ * \returns URL NULL: not found.
+ */
+QCString Htags::path2URL(const QCString &path)
+{
+ QCString url,symName=path;
+ QCString dir = convertToQCString(g_inputDir.absPath());
+ int dl=dir.length();
+ if ((int)symName.length()>dl+1)
+ {
+ symName = symName.mid(dl+1);
+ }
+ if (!symName.isEmpty())
+ {
+ QCString *result = g_symbolDict[symName];
+ //printf("path2URL=%s symName=%s result=%p\n",path.data(),symName.data(),result);
+ if (result)
+ {
+ url = "HTML/" + *result;
+ }
+ }
+ return url;
+}
+
diff --git a/src/htags.h b/src/htags.h
new file mode 100644
index 0000000..8373eb6
--- /dev/null
+++ b/src/htags.h
@@ -0,0 +1,28 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2005 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
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+#ifndef HTAGS_H
+#define HTAGS_H
+
+class QCString;
+
+struct Htags
+{
+ static bool useHtags;
+ static bool loadFilemap(const QCString &htmldir);
+ static QCString path2URL(const QCString &path);
+ static bool execute(const QCString &htmldir);
+};
+
+#endif /* HTAGS_H */
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 21b656b..99eb97d 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -599,9 +599,13 @@ void HtmlGenerator::writeStyleInfo(int part)
}
void HtmlGenerator::startDoxyAnchor(const char *,const char *,
- const char *anchor, const char *name)
+ const char *anchor, const char *name,
+ const char *args)
{
- t << "<a class=\"anchor\" name=\"" << anchor << "\" doxytag=\"" << name << "\"></a>";
+ t << "<a class=\"anchor\" name=\"" << anchor << "\"></a>";
+ t << "<!-- doxytag: member=<" << name << "> ref=<" << anchor << "> args=<";
+ docify(args);
+ t << "> -->";
}
void HtmlGenerator::endDoxyAnchor(const char *,const char *)
diff --git a/src/htmlgen.h b/src/htmlgen.h
index e6e99c9..f2f2364 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -136,7 +136,8 @@ class HtmlGenerator : public OutputGenerator
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(bool);
void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor,const char *name);
+ const char *anchor,const char *name,
+ const char *args);
void endDoxyAnchor(const char *fName,const char *anchor);
void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; }
void endCodeAnchor() { }
diff --git a/src/index.cpp b/src/index.cpp
index d5d82a4..597fbb4 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -232,19 +232,6 @@ void endFile(OutputList &ol,bool)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.writeFooter(); // write the footer
- //if (Config_getString("HTML_FOOTER").isEmpty())
- //{
- // ol.parseText(theTranslator->trGeneratedAt(
- // dateToString(TRUE),
- // Config_getString("PROJECT_NAME")
- // ));
- //}
- //ol.writeFooter(1,external); // write the link to the picture
- //if (Config_getString("HTML_FOOTER").isEmpty())
- //{
- // parseText(ol,theTranslator->trWrittenBy());
- //}
- //ol.writeFooter(2,external); // end the footer
ol.popGeneratorState();
ol.endFile();
}
@@ -1160,52 +1147,6 @@ void writeAnnotatedClassList(OutputList &ol)
//----------------------------------------------------------------------------
-// OBSOLETE
-//void writePackageList(OutputList &ol)
-//{
-// bool &generateHtml = Config_getBool("GENERATE_HTML") ;
-// bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
-// bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
-// ol.startIndexList();
-// PackageSDict::Iterator pdi(Doxygen::packageDict);
-// PackageDef *pd;
-// for (;(pd=pdi.current());++pdi)
-// {
-// if (!pd->isReference())
-// {
-// //ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name());
-// ol.startIndexKey();
-// ol.writeObjectLink(0,pd->getOutputFileBase(),0,pd->name());
-// ol.endIndexKey();
-// bool hasBrief = !pd->briefDescription().isEmpty();
-// ol.startIndexValue(hasBrief);
-// if (hasBrief)
-// {
-// //ol.docify(" (");
-// parseDoc(ol,
-// pd->getDefFileName(),pd->getDefLine(),
-// pd,0,
-// abbreviate(pd->briefDescription(),pd->name()));
-// //ol.docify(")");
-// }
-// ol.endIndexValue(pd->getOutputFileBase(),hasBrief);
-//
-// //ol.writeEndAnnoItem(pd->getOutputFileBase());
-// if (hasHtmlHelp)
-// {
-// HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase());
-// }
-// if (hasFtvHelp)
-// {
-// FTVHelp::getInstance()->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pd->name());
-// }
-// }
-// }
-// ol.endIndexList();
-//}
-
-//----------------------------------------------------------------------------
-
// write an alphabetical index of all class with a header for each letter
void writeAlphabeticalClassList(OutputList &ol)
{
@@ -1458,57 +1399,6 @@ void writeAnnotatedIndex(OutputList &ol)
//----------------------------------------------------------------------------
-//void writePackageIndex(OutputList &ol)
-//{
-// bool &generateHtml = Config_getBool("GENERATE_HTML") ;
-// bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
-// bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
-//
-// if (documentedPackages==0) return;
-//
-// ol.pushGeneratorState();
-// ol.disable(OutputGenerator::Man);
-// startFile(ol,"packages",0,"Package Index");
-// startTitle(ol,0);
-// QCString title = theTranslator->trPackageList();
-// QCString htmlHelpTitle = title;
-// QCString ftvHelpTitle = title;
-// if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
-// parseText(ol,title);
-// endTitle(ol,0,0);
-// ol.startTextBlock();
-// HtmlHelp *htmlHelp = 0;
-// FTVHelp *ftvHelp = 0;
-// if (hasHtmlHelp)
-// {
-// htmlHelp = HtmlHelp::getInstance();
-// htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"packages");
-// htmlHelp->incContentsDepth();
-// }
-// if (hasFtvHelp)
-// {
-// ftvHelp = FTVHelp::getInstance();
-// ftvHelp->addContentsItem(TRUE,0,"packages",0,ftvHelpTitle);
-// ftvHelp->incContentsDepth();
-// }
-// parseText(ol,theTranslator->trPackageListDescription());
-// ol.endTextBlock();
-// writePackageList(ol);
-// if (hasHtmlHelp)
-// {
-// htmlHelp->decContentsDepth();
-// }
-// if (hasFtvHelp)
-// {
-// ftvHelp->decContentsDepth();
-// }
-//
-// endFile(ol);
-// ol.popGeneratorState();
-//}
-
-//----------------------------------------------------------------------------
-
void writeMemberList(OutputList &ol,bool useSections,
ClassMemberHighlight filter,char sectionFilter)
{
@@ -2413,17 +2303,74 @@ void countRelatedPages(int &docPages,int &indexPages)
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
- if (!pd->getGroupDef() &&
- (!pd->isReference() || Config_getBool("ALLEXTERNALS")))
+ if ( pd->visibleInIndex())
{
indexPages++;
- if (!pd->isReference()) docPages++;
+ }
+ if ( pd->documentedPage())
+ {
+ docPages++;
}
}
}
//----------------------------------------------------------------------------
+static void writeSubPages(PageDef *pd)
+{
+ //printf("Write subpages(%s #=%d)\n",pd->name().data(),pd->getSubPages() ? pd->getSubPages()->count() : 0 );
+ static bool generateHtml = Config_getBool("GENERATE_HTML") ;
+ static bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
+ static bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
+ HtmlHelp *htmlHelp = 0;
+ if (hasHtmlHelp)
+ {
+ htmlHelp = HtmlHelp::getInstance();
+ htmlHelp->incContentsDepth();
+ }
+ FTVHelp *ftvHelp = 0;
+ if (hasFtvHelp)
+ {
+ ftvHelp = FTVHelp::getInstance();
+ ftvHelp->incContentsDepth();
+ }
+
+ PageSDict *subPages = pd->getSubPages();
+ if (subPages)
+ {
+ PageSDict::Iterator pi(*subPages);
+ PageDef *subPage;
+ for (pi.toFirst();(subPage=pi.current());++pi)
+ {
+ QCString pageTitle;
+
+ if (subPage->title().isEmpty())
+ pageTitle=subPage->name();
+ else
+ pageTitle=subPage->title();
+
+ bool hasSubPages = subPage->hasSubPages();
+
+ if (hasHtmlHelp)
+ {
+ htmlHelp->addContentsItem(hasSubPages,pageTitle,subPage->getOutputFileBase());
+ }
+ if (hasFtvHelp)
+ {
+ ftvHelp->addContentsItem(hasSubPages,subPage->getReference(),subPage->getOutputFileBase(),0,pageTitle);
+ }
+ writeSubPages(subPage);
+ }
+ }
+ if (hasHtmlHelp)
+ {
+ htmlHelp->decContentsDepth();
+ }
+ if (hasFtvHelp)
+ {
+ ftvHelp->decContentsDepth();
+ }
+}
void writePageIndex(OutputList &ol)
{
@@ -2441,9 +2388,9 @@ void writePageIndex(OutputList &ol)
ol.startTextBlock();
HtmlHelp *htmlHelp = 0;
FTVHelp *ftvHelp = 0;
- bool &generateHtml = Config_getBool("GENERATE_HTML") ;
- bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
- bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
+ static bool generateHtml = Config_getBool("GENERATE_HTML") ;
+ static bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
+ static bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
@@ -2463,8 +2410,7 @@ void writePageIndex(OutputList &ol)
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
- if (!pd->getGroupDef() &&
- (!pd->isReference() || Config_getBool("ALLEXTERNALS")))
+ if ( pd->visibleInIndex())
{
QCString pageTitle;
@@ -2473,6 +2419,8 @@ void writePageIndex(OutputList &ol)
else
pageTitle=pd->title();
+ bool hasSubPages = pd->hasSubPages();
+
ol.writeIndexItem(pd->getReference(),pd->getOutputFileBase(),pageTitle);
if (pd->isReference())
{
@@ -2481,8 +2429,15 @@ void writePageIndex(OutputList &ol)
ol.endTypewriter();
}
ol.writeString("\n");
- if (hasHtmlHelp) htmlHelp->addContentsItem(FALSE,pageTitle,pd->getOutputFileBase());
- if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pageTitle);
+ if (hasHtmlHelp)
+ {
+ htmlHelp->addContentsItem(hasSubPages,pageTitle,pd->getOutputFileBase());
+ }
+ if (hasFtvHelp)
+ {
+ ftvHelp->addContentsItem(hasSubPages,pd->getReference(),pd->getOutputFileBase(),0,pageTitle);
+ }
+ writeSubPages(pd);
}
}
endIndexHierarchy(ol,0);
@@ -3018,62 +2973,6 @@ void writeDirHierarchy(OutputList &ol)
//----------------------------------------------------------------------------
-#if 0
-void writeGroupList(OutputList &ol)
-{
- bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP");
- bool hasFtvHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_TREEVIEW");
- HtmlHelp *htmlHelp = 0;
- FTVHelp *ftvHelp = 0;
- if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
- if (hasFtvHelp) ftvHelp = FTVHelp::getInstance();
- ol.startDescription();
- GroupListIterator gli(Doxygen::groupList);
- GroupDef *gd;
- for (;(gd=gli.current());++gli)
- {
- //printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers());
- //if (gd->countMembers()>0)
- //{
- if (gd->hasDocumentation())
- {
- ol.startDescItem();
- ol.startTextLink(gd->getOutputFileBase(),0);
- parseText(ol,gd->groupTitle());
- ol.endTextLink();
- ol.endDescItem();
- parseDoc(ol,
- gd->briefFile(),gd->briefLine(),
- gd,0,gd->briefDescription());
- ol.newParagraph();
- //}
-
- const char *docFile = 0;
- if (gd->hasDocumentation()) docFile = gd->getOutputFileBase();
- if (hasHtmlHelp)
- {
- htmlHelp = HtmlHelp::getInstance();
- if (!Config::instance()->get(""))
- {
- htmlHelp->addContentsItem(FALSE,gd->groupTitle(),docFile);
- }
- }
- if (hasFtvHelp)
- {
- ftvHelp = FTVHelp::getInstance();
- if (!Config::instance()->get(""))
- {
- ftvHelp->addContentsItem(FALSE,gd->groupTitle(),docFile);
- }
- }
- }
- }
- ol.endDescription();
-}
-#endif
-
-//----------------------------------------------------------------------------
-
void writeGroupIndex(OutputList &ol)
{
if (documentedGroups==0) return;
@@ -3220,16 +3119,24 @@ void writeIndex(OutputList &ol)
if (Config_getBool("GENERATE_TREEVIEW")) indexName="main";
ol.startFile(indexName,0,title);
- bool &generateHtml = Config_getBool("GENERATE_HTML") ;
- bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
- bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
- if (hasHtmlHelp)
- {
- HtmlHelp::getInstance()->addContentsItem(FALSE,title,indexName);
- }
- if (hasFtvHelp)
+ if (Doxygen::mainPage)
{
- FTVHelp::getInstance()->addContentsItem(FALSE,0,indexName,0,title);
+ bool &generateHtml = Config_getBool("GENERATE_HTML") ;
+ bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
+ bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
+ if (hasHtmlHelp)
+ {
+ HtmlHelp::getInstance()->addContentsItem(Doxygen::mainPage->hasSubPages(),title,indexName);
+ }
+ if (hasFtvHelp)
+ {
+ FTVHelp::getInstance()->addContentsItem(Doxygen::mainPage->hasSubPages(),0,indexName,0,title);
+ }
+
+ if (Doxygen::mainPage->hasSubPages())
+ {
+ writeSubPages(Doxygen::mainPage);
+ }
}
if (!Config_getBool("DISABLE_INDEX")) ol.writeQuickLinks(TRUE,HLI_Main);
diff --git a/src/language.cpp b/src/language.cpp
index b6e12f2..7a80082 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -332,6 +332,12 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorLithuanian;
}
#endif
+#ifdef LANG_ZA
+ else if (L_EQUAL("afrikaans"))
+ {
+ theTranslator=new TranslatorAfrikaans;
+ }
+#endif
#endif // ENGLISH_ONLY
else // use the default language (i.e. english)
{
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 46762f8..90384ec 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1133,7 +1133,8 @@ void LatexGenerator::endMemberDoc(bool)
}
void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
- const char *anchor, const char *)
+ const char *anchor, const char *,
+ const char *)
{
if (Config_getBool("PDF_HYPERLINKS"))
{
diff --git a/src/latexgen.h b/src/latexgen.h
index 3aa8334..1a48b1e 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -129,7 +129,7 @@ class LatexGenerator : public OutputGenerator
void lineBreak() { t << "\\par\n"; }
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *);
+ void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {}
void endCodeAnchor() {}
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index 58b135f..337e920 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -47,6 +47,7 @@ HEADERS = bufstr.h \
formula.h \
ftvhelp.h \
groupdef.h \
+ htags.h \
htmlattrib.h \
htmldocvisitor.h \
htmlgen.h \
@@ -150,6 +151,7 @@ SOURCES = ce_lex.cpp \
formula.cpp \
ftvhelp.cpp \
groupdef.cpp \
+ htags.cpp \
htmldocvisitor.cpp \
htmlgen.cpp \
htmlhelp.cpp \
diff --git a/src/mangen.cpp b/src/mangen.cpp
index f09e74f..2339208 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -372,7 +372,8 @@ void ManGenerator::startMemberDoc(const char *,const char *,const char *,const c
}
void ManGenerator::startDoxyAnchor(const char *,const char *manName,
- const char *, const char *name)
+ const char *, const char *name,
+ const char *)
{
// something to be done?
if( !Config_getBool("MAN_LINKS") )
diff --git a/src/mangen.h b/src/mangen.h
index 085b7ad..970579d 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -139,7 +139,7 @@ class ManGenerator : public OutputGenerator
void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *);
+ void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *) {}
void startCodeAnchor(const char *) {}
void endCodeAnchor() {}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 9fa64ee..36079fd 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -333,10 +333,10 @@ MemberDef::MemberDef(const char *df,int dl,
m_hasCallGraph = FALSE;
initLines=0;
type=t;
- if (mt==Typedef && type.left(8)=="typedef ") type=type.mid(8);
- if (type.left(7)=="struct ") type=type.right(type.length()-7);
- if (type.left(6)=="class " ) type=type.right(type.length()-6);
- if (type.left(6)=="union " ) type=type.right(type.length()-6);
+ if (mt==Typedef) type.stripPrefix("typedef ");
+ type.stripPrefix("struct ");
+ type.stripPrefix("class " );
+ type.stripPrefix("union " );
type=removeRedundantWhiteSpace(type);
args=a;
@@ -637,7 +637,7 @@ bool MemberDef::isLinkableInProject() const
//printf("in a namespace but namespace not linkable!\n");
return FALSE; // in namespace but namespace not linkable
}
- if (!group && !nspace && !related && fileDef && !fileDef->isLinkableInProject())
+ if (!group && !nspace && !related && !classDef && fileDef && !fileDef->isLinkableInProject())
{
//printf("in a file but file not linkable!\n");
return FALSE; // in file (and not in namespace) but file not linkable
@@ -685,6 +685,10 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *,
QCString n = name();
if (classDef && gd) n.prepend(classDef->name()+sep);
else if (nspace && (gd || fd)) n.prepend(nspace->name()+sep);
+ if (isObjCMethod())
+ {
+ if (isStatic()) ol.docify("+ "); else ol.docify("- ");
+ }
if (!onlyText) // write link
{
ol.writeObjectLink(getReference(),getOutputFileBase(),anchor(),n);
@@ -717,7 +721,7 @@ ClassDef *MemberDef::getClassDefOfAnonymousType()
// strip `static' keyword from ltype
//if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7);
// strip `friend' keyword from ltype
- if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7);
+ ltype.stripPrefix("friend ");
static QRegExp r("@[0-9]+");
int l,i=r.match(ltype,0,&l);
//printf("ltype=`%s' i=%d\n",ltype.data(),i);
@@ -943,7 +947,8 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
QCString doxyName=name().copy();
if (!cname.isEmpty()) doxyName.prepend(cname+"::");
- ol.startDoxyAnchor(cfname,cname,anchor(),doxyName);
+ QCString doxyArgs=argsString();
+ ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs);
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
@@ -973,7 +978,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
QCString ltype(type);
if (mtype==Typedef) ltype.prepend("typedef ");
// strip `friend' keyword from ltype
- if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7);
+ ltype.stripPrefix("friend ");
static QRegExp r("@[0-9]+");
bool endAnonScopeNeeded=FALSE;
@@ -1308,6 +1313,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
QCString doxyName=name().copy();
// prepend scope if there is any. TODO: make this optional for C only docs
if (scopeName) doxyName.prepend((QCString)scopeName+"::");
+ QCString doxyArgs=argsString();
QCString ldef = definition();
//printf("member `%s' def=`%s'\n",name().data(),ldef.data());
@@ -1340,7 +1346,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
{
- ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName);
+ ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(cname,name(),memAnchor,name());
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i));
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
@@ -1352,7 +1358,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (!found) // anonymous compound
{
//printf("Anonymous compound `%s'\n",cname.data());
- ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName);
+ ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(cname,name(),memAnchor,name());
// strip anonymous compound names from definition
int si=ldef.find(' '),pi,ei=i+l;
@@ -1370,7 +1376,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
else // not an enum value
{
- ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName);
+ ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(cname,name(),memAnchor,name());
ClassDef *cd=getClassDef();
@@ -1678,7 +1684,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
//ol.writeListItem();
ol.startDescTableTitle(); // this enables emphasis!
- ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name());
+ ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name(),fmd->argsString());
first=FALSE;
//ol.startEmphasis();
ol.docify(fmd->name());
@@ -2396,3 +2402,20 @@ void MemberDef::setTagInfo(TagInfo *ti)
}
}
+QCString MemberDef::objCMethodName(bool localLink,bool showStatic) const
+{
+ QCString qm;
+ if (showStatic)
+ {
+ if (isStatic()) qm="+ "; else qm="- ";
+ }
+ qm+=name();
+ if (!localLink) // link to method of same class
+ {
+ qm+=" (";
+ qm+=classDef->name();
+ qm+=")";
+ }
+ return qm;
+}
+
diff --git a/src/memberdef.h b/src/memberdef.h
index 545bf7f..6b5c3bf 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -106,6 +106,7 @@ class MemberDef : public Definition
int getGroupStartLine() const { return groupStartLine; }
bool getGroupHasDocs() const { return groupHasDocs; }
QCString qualifiedName();
+ QCString objCMethodName(bool localLink,bool showStatic) const;
// direct kind info
Protection protection() const { return prot; }
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 5e629e9..6735d4e 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -434,6 +434,8 @@ void NamespaceDef::writeMemberPages(OutputList &ol)
void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
+ static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
+
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
@@ -455,6 +457,7 @@ void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) co
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
+ if (createSubDirs) ol.writeString("../../");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->localName());
diff --git a/src/outputgen.h b/src/outputgen.h
index de788db..c271835 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -323,7 +323,8 @@ class OutputGenerator : public BaseOutputDocInterface
const char *,const char *) = 0;
virtual void endMemberDoc(bool) = 0;
virtual void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor,const char *name) = 0;
+ const char *anchor,const char *name,
+ const char *args) = 0;
virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
virtual void writeLatexSpacing() = 0;
virtual void writeStartAnnoItem(const char *type,const char *file,
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 06f9f9f..2dff450 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -258,6 +258,18 @@ void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4),a1,a2,a3,a4)
} \
}
+// five arguments
+#define FORALL5(a1,a2,a3,a4,a5,p1,p2,p3,p4,p5) \
+void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4,a5),a1,a2,a3,a4,a5) \
+{ \
+ OutputGenerator *og=outputs->first(); \
+ while (og) \
+ { \
+ if (og->isEnabled()) (og->*func)(p1,p2,p3,p4,p5); \
+ og=outputs->next(); \
+ } \
+}
+
// now instantiate only the ones we need.
FORALL1(const char *a1,a1)
@@ -293,6 +305,7 @@ FORALL3(uchar a1,uchar a2,uchar a3,a1,a2,a3)
FORALL4(SectionTypes a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4)
FORALL4(const char *a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4)
FORALL4(const char *a1,const char *a2,const char *a3,int a4,a1,a2,a3,a4)
+FORALL5(const char *a1,const char *a2,const char *a3,const char *a4,const char *a5,a1,a2,a3,a4,a5)
//--------------------------------------------------------------------------
diff --git a/src/outputlist.h b/src/outputlist.h
index 32b3223..3e4b5c0 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -31,6 +31,8 @@
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3),arg1,arg2,arg3)
#define FORALLPROTO4(arg1,arg2,arg3,arg4) \
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4),arg1,arg2,arg3,arg4)
+#define FORALLPROTO5(arg1,arg2,arg3,arg4,arg5) \
+ void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4,arg5),arg1,arg2,arg3,arg4,arg5)
class ClassDiagram;
class DotClassGraph;
@@ -217,8 +219,9 @@ class OutputList : public OutputDocInterface
void endMemberDoc(bool hasArgs)
{ forall(&OutputGenerator::endMemberDoc,hasArgs); }
void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor, const char *name)
- { forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name); }
+ const char *anchor, const char *name,
+ const char *args)
+ { forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name,args); }
void endDoxyAnchor(const char *fn,const char *anchor)
{ forall(&OutputGenerator::endDoxyAnchor,fn,anchor); }
void startCodeAnchor(const char *label)
@@ -423,6 +426,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO4(SectionTypes,const char *,const char *,const char *);
FORALLPROTO4(const char *,const char *,const char *,const char *);
FORALLPROTO4(const char *,const char *,const char *,bool);
+ FORALLPROTO5(const char *,const char *,const char *,const char *,const char *);
OutputList(const OutputList &ol);
QList<OutputGenerator> *outputs;
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index ec16276..e820273 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -5,6 +5,7 @@
#include "util.h"
#include "outputlist.h"
#include "doxygen.h"
+#include "language.h"
PageDef::PageDef(const char *f,int l,const char *n,
@@ -77,6 +78,9 @@ void PageDef::writeDocumentation(OutputList &ol)
{
ol.startSection(si->label,si->title,si->type);
ol.docify(si->title);
+ stringToSearchIndex(getOutputFileBase(),
+ theTranslator->trPage(TRUE,TRUE)+" "+si->title,
+ si->title);
ol.endSection(si->label,si->type);
}
ol.startTextBlock();
@@ -117,4 +121,29 @@ void PageDef::writeDocumentation(OutputList &ol)
}
}
+bool PageDef::visibleInIndex() const
+{
+ return // not part of a group
+ !getGroupDef() &&
+ // not an externally defined page
+ (!isReference() || Config_getBool("ALLEXTERNALS")) &&
+ // not a subpage
+ (getOuterScope()==0 ||
+ getOuterScope()->definitionType()!=Definition::TypePage
+ );
+}
+
+bool PageDef::documentedPage() const
+{
+ return // not part of a group
+ !getGroupDef() &&
+ // not an externally defined page
+ !isReference();
+}
+
+bool PageDef::hasSubPages() const
+{
+ return subPageDict->count()>0;
+}
+
diff --git a/src/pagedef.h b/src/pagedef.h
index 1425dfd..d63eb33 100644
--- a/src/pagedef.h
+++ b/src/pagedef.h
@@ -46,6 +46,9 @@ class PageDef : public Definition
PageSDict * getSubPages() const { return subPageDict; }
void setFileName(const char *name) { m_fileName = name; }
void addInnerCompound(Definition *d);
+ bool visibleInIndex() const;
+ bool documentedPage() const;
+ bool hasSubPages() const;
private:
QCString m_fileName;
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index c9014a9..47193ba 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1384,7 +1384,9 @@ void RTFGenerator::endMemberDoc(bool)
}
void RTFGenerator::startDoxyAnchor(const char *,const char *,
- const char *,const char *)
+ const char *,const char *,
+ const char *
+ )
{
DBG_RTF(t << "{\\comment startDoxyAnchor}" << endl)
}
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 24de6b2..0495da7 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -138,7 +138,7 @@ class RTFGenerator : public OutputGenerator
void lineBreak();
void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *);
+ void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *);
void startCodeAnchor(const char *) {};
void endCodeAnchor() {};
diff --git a/src/scanner.l b/src/scanner.l
index 25c53b4..dfe8777 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -95,12 +95,9 @@ static int memberGroupId = DOX_NOGROUP;
static QCString memberGroupHeader;
static QCString memberGroupDocs;
static bool isTypedef;
-//static char afterDocTerminator;
static int tmpDocType;
static QCString sectionLabel;
static QCString sectionTitle;
-//static SectionInfo::SectionType
-// sectionType;
static QCString funcPtrType;
static QCString templateStr;
static QCString aliasName;
@@ -127,7 +124,6 @@ static QCString *copyArgString;
static QCString fullArgString;
static ArgumentList *currentArgumentList;
-//static QCString *currentTemplateSpec;
static char lastCopyArgChar;
static QCString *pCopyRoundString;
static QCString *pCopyCurlyString;
@@ -688,7 +684,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
%x PrototypeExc
%x PrototypeSkipLine
- /** new comment parsing states */
+ /** comment parsing states */
%x DocLine
%x DocBlock
diff --git a/src/search.php b/src/search.php
index ee8802a..b3ac0e6 100644
--- a/src/search.php
+++ b/src/search.php
@@ -21,24 +21,26 @@ function readHeader($file)
function computeIndex($word)
{
- $lword = strtolower($word);
- $l = strlen($lword);
- for ($i=0;$i<$l;$i++)
- {
- $c = ord($lword{$i});
- $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;
- }
- return $v;
+ // Fast string hashing
+ //$lword = strtolower($word);
+ //$l = strlen($lword);
+ //for ($i=0;$i<$l;$i++)
+ //{
+ // $c = ord($lword{$i});
+ // $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;
+ //}
+ //return $v;
- //if (strlen($word)<2) return -1;
+ // Simple hashing that allows for substring search
+ if (strlen($word)<2) return -1;
// high char of the index
- //$hi = ord($word{0});
- //if ($hi==0) return -1;
+ $hi = ord($word{0});
+ if ($hi==0) return -1;
// low char of the index
- //$lo = ord($word{1});
- //if ($lo==0) return -1;
+ $lo = ord($word{1});
+ if ($lo==0) return -1;
// return index
- //return $hi*256+$lo;
+ return $hi*256+$lo;
}
function search($file,$word,&$statsList)
@@ -48,7 +50,7 @@ function search($file,$word,&$statsList)
{
fseek($file,$index*4+4); // 4 bytes per entry, skip header
$index = readInt($file);
- if ($index) // found words matching first two characters
+ if ($index) // found words matching the hash key
{
$start=sizeof($statsList);
$count=$start;
diff --git a/src/search_php.h b/src/search_php.h
index 86e97fa..04c95fe 100644
--- a/src/search_php.h
+++ b/src/search_php.h
@@ -21,24 +21,26 @@
"\n"
"function computeIndex($word)\n"
"{\n"
-" $lword = strtolower($word);\n"
-" $l = strlen($lword);\n"
-" for ($i=0;$i<$l;$i++)\n"
-" {\n"
-" $c = ord($lword{$i});\n"
-" $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;\n"
-" }\n"
-" return $v;\n"
+" // Fast string hashing\n"
+" //$lword = strtolower($word);\n"
+" //$l = strlen($lword);\n"
+" //for ($i=0;$i<$l;$i++)\n"
+" //{\n"
+" // $c = ord($lword{$i});\n"
+" // $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;\n"
+" //}\n"
+" //return $v;\n"
"\n"
-" //if (strlen($word)<2) return -1;\n"
+" // Simple hashing that allows for substring search\n"
+" if (strlen($word)<2) return -1;\n"
" // high char of the index\n"
-" //$hi = ord($word{0});\n"
-" //if ($hi==0) return -1;\n"
+" $hi = ord($word{0});\n"
+" if ($hi==0) return -1;\n"
" // low char of the index\n"
-" //$lo = ord($word{1});\n"
-" //if ($lo==0) return -1;\n"
+" $lo = ord($word{1});\n"
+" if ($lo==0) return -1;\n"
" // return index\n"
-" //return $hi*256+$lo;\n"
+" return $hi*256+$lo;\n"
"}\n"
"\n"
"function search($file,$word,&$statsList)\n"
@@ -48,7 +50,7 @@
" {\n"
" fseek($file,$index*4+4); // 4 bytes per entry, skip header\n"
" $index = readInt($file);\n"
-" if ($index) // found words matching first two characters\n"
+" if ($index) // found words matching the hash key\n"
" {\n"
" $start=sizeof($statsList);\n"
" $count=$start;\n"
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 5bf510f..400702b 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -80,20 +80,22 @@ static int charsToIndex(const char *word)
{
if (word==0) return -1;
- register ushort h=0;
- const char *k = word;
- ushort mask=0xfc00;
- while ( *k )
- {
- h = (h&mask)^(h<<6)^(*k++);
- }
+ // Fast string hashing algorithm
+ //register ushort h=0;
+ //const char *k = word;
+ //ushort mask=0xfc00;
+ //while ( *k )
+ //{
+ // h = (h&mask)^(h<<6)^(*k++);
+ //}
+ //return h;
- //uint c1=word[0];
- //if (c1==0) return -1;
- //uint c2=word[1];
- //if (c2==0) return -1;
- //return c1*256+c2;
- return h;
+ // Simple hashing that allows for substring searching
+ uint c1=word[0];
+ if (c1==0) return -1;
+ uint c2=word[1];
+ if (c2==0) return -1;
+ return c1*256+c2;
}
void SearchIndex::addWord(const char *word,bool hiPriority)
diff --git a/src/translator_en.h b/src/translator_en.h
index 0f41e51..fd9ea87 100644
--- a/src/translator_en.h
+++ b/src/translator_en.h
@@ -471,7 +471,7 @@ class TranslatorEnglish : public Translator
* list of (global) variables
*/
virtual QCString trEnumerationValues()
- { return "Enumeration values"; }
+ { return "Enumerator"; }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
@@ -501,7 +501,7 @@ class TranslatorEnglish : public Translator
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
- { return "Enumeration Value Documentation"; }
+ { return "Enumerator Documentation"; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
diff --git a/src/translator_hu.h b/src/translator_hu.h
index 11d2a40..2cb300d 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -56,7 +56,7 @@ class TranslatorHungarian : public Translator
*/
virtual QCString latexLanguageSupportCommand()
{
- return "";
+ return "\\usepackage{t1enc}\n\\usepackage[latin2]{inputenc}\n\\usepackage[magyar]{babel}\n";
}
/*! return the language charset. This will be used for the HTML output */
diff --git a/src/translator_za.h b/src/translator_za.h
index 15a1b0c..e09390d 100644
--- a/src/translator_za.h
+++ b/src/translator_za.h
@@ -26,7 +26,7 @@
#ifndef TRANSLATOR_ZA_H
#define TRANSLATOR_ZA_H
-class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
+class TranslatorAfrikaans : public Translator
{
public:
@@ -178,10 +178,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual QCString trFileList()
{ return "Le&euml;r Lys"; }
- /*! This is put above each page as a link to the list of all verbatim headers */
- virtual QCString trHeaderFiles()
- { return "Kop Le&euml;r"; }
-
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
@@ -314,10 +310,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
return result;
}
- /*! This is an introduction to the page with the list of all header files. */
- virtual QCString trHeaderFilesDescription()
- { return "Die kop leers waaruit die API bestaan:"; }
-
/*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription()
{ return "'n Lys van alle voorbeelde:"; }
@@ -330,15 +322,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual QCString trModulesDescription()
{ return "'n Lys van alle modules:"; }
- /*! This sentences is used in the annotated class/file lists if no brief
- * description is given.
- */
- virtual QCString trNoDescriptionAvailable()
- { return "Geen beskrywings beskikbaar"; }
-
- // index titles (the project name is prepended for these)
-
-
/*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation()
{ return "Dokumentasie"; }
@@ -486,12 +469,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
{ return "Enumeration Type Dokumentasie"; }
/*! This is used in the documentation of a file/namespace before the list
- * of documentation blocks for enumeration values
- */
- virtual QCString trEnumerationValueDocumentation()
- { return "Enumeration Waarde Dokumentasie"; }
-
- /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
virtual QCString trFunctionDocumentation()
@@ -545,18 +522,10 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual QCString trForInternalUseOnly()
{ return "Slegs vir interne gebruik."; }
- /*! this text is generated when the \\reimp command is used. */
- virtual QCString trReimplementedForInternalReasons()
- { return "Hergeimplimenteer vir interne redes; die API word nie beinvloed nie."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Waarskuwing"; }
- /*! this text is generated when the \\bug command is used. */
- virtual QCString trBugsAndLimitations()
- { return "Bugs and beperkings"; }
-
/*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return "Weergawe"; }
@@ -794,8 +763,8 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
case ClassDef::Union: result+="union"; break;
case ClassDef::Interface: result+="intervlak"; break;
case ClassDef::Protocol: result+="protokol"; break;
- case ClassDef::Category: result+="category"; break;
- case ClassDef::Exception: result+="exception"; break;
+ case ClassDef::Category: result+="kategorie"; break;
+ case ClassDef::Exception: result+="eksepsie"; break;
}
result+=" is gegenereer vanaf die volgende le&euml;r";
if (single) result+=":"; else result+="s:";
@@ -831,10 +800,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
- virtual QCString trSources()
- {
- return "Bronne";
- }
virtual QCString trDefinedAtLineInSourceFile()
{
return "Gedefinie&euml;r by lyn @0 van le&euml;r @1.";
@@ -1141,11 +1106,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
// new since 1.2.4
//////////////////////////////////////////////////////////////////////////
- /*! Used for Java interfaces in the summary section of Java packages */
- virtual QCString trInterfaces()
- {
- return "Intervlake";
- }
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
@@ -1178,11 +1138,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
{
return "Pakkette";
}
- /*! Used as a chapter title for Latex & RTF output */
- virtual QCString trPackageDocumentation()
- {
- return "Pakket Dokumentasie";
- }
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
@@ -1313,22 +1268,11 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
* of the category.
*/
virtual QCString trMember(bool first_capital, bool singular)
- {
+ {
QCString result((first_capital ? "Lid" : "lid"));
if (!singular) result = (first_capital ? "Lede" : "lede");
return result;
}
-
- /*! This is used for translation of the word that will possibly
- * be followed by a single name or by a list of names
- * of the category.
- */
- virtual QCString trField(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Veld" : "veld"));
- if (!singular) result+="e";
- return result;
- }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
@@ -1521,8 +1465,8 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
}
else
{
- return "Die soektog het <b>$num</b> documente gevind na gelang van jou navraag. "
- "Begin met beste resultate.";
+ return "Die soektog het <b>$num</b> dokumente gevind na gelang van jou navraag. "
+ "Beste resultate eerste.";
}
}
/*! This string is put before the list of matched words, for each search
@@ -1544,6 +1488,67 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
return filename + " Bron kode Le&euml;r";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Directory Hi&euml;rargie"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Directory Documentasie"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Directories"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Hierdie directory hi&euml;rargie is min of meer alfabeties "
+ "gesorteer:";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result=dirName; result+=" Directory Verwysing"; return result; }
+
+ /*! 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)
+ {
+ QCString result((first_capital ? "Director" : "director"));
+ if (singular) result+="y"; else result+="ies";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is added to the documentation when the \\overload command
+ * is used for a overloaded function.
+ */
+ virtual QCString trOverloadText()
+ {
+ return "Hierdie is 'n oorlaaide lede funksie, "
+ "vertoon vir volledigheid. Dit verskil slegs van die bogegewe "
+ "funksie in die argument(e) wat dit aanvaar.";
+ }
+
+
};
#endif
diff --git a/src/util.cpp b/src/util.cpp
index dd012aa..e18190e 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -46,6 +46,7 @@
#include "reflist.h"
#include "pagedef.h"
#include "debug.h"
+#include "searchindex.h"
#if !defined(_WIN32) || defined(__CYGWIN__)
#include <unistd.h>
@@ -622,18 +623,9 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe
ip--;
}
type=type.left(ip+1);
- if (type.left(6)=="const ") // strip leading "const"
- {
- type=type.mid(6);
- }
- if (type.left(7)=="struct ") // strip leading "struct"
- {
- type=type.mid(7);
- }
- else if (type.left(6)=="union ") // or strip leading "union"
- {
- type=type.mid(6);
- }
+ type.stripPrefix("const "); // strip leading "const"
+ type.stripPrefix("struct "); // strip leading "struct"
+ type.stripPrefix("union "); // strip leading "union"
type=type.stripWhiteSpace(); // strip leading and trailing whitespace
MemberDef *memTypeDef = 0;
ClassDef *result = getResolvedClassRec(md->getOuterScope(),
@@ -1243,7 +1235,12 @@ ClassDef *getResolvedClass(Definition *scope,
{
scope=Doxygen::globalScope;
}
- //printf("getResolvedClass(%s,%s)\n",scope?scope->name().data():"<global>",n);
+ //printf("getResolvedClass(scope=%s,file=%s,name=%s,mayUnlinkable=%d)\n",
+ // scope?scope->name().data():"<global>",
+ // fileScope?fileScope->name().data():"<none>",
+ // n,
+ // mayBeUnlinkable
+ // );
ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec);
if (!mayBeUnlinkable && result && !result->isLinkable())
{
@@ -1251,7 +1248,6 @@ ClassDef *getResolvedClass(Definition *scope,
}
//printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
// n,result?result->name().data():"<none>");
-
return result;
}
@@ -2281,8 +2277,8 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
QCString dstAType=trimTemplateSpecifiers(namespaceName,className,dstA->type);
QCString srcAName=srcA->name.stripWhiteSpace();
QCString dstAName=dstA->name.stripWhiteSpace();
- if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6);
- if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6);
+ srcAType.stripPrefix("class ");
+ dstAType.stripPrefix("class ");
// allow distingishing "const A" from "const B" even though
// from a syntactic point of view they would be two names of the same
@@ -2651,14 +2647,13 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
stripIrrelevantConstVolatile(type);
// strip leading keywords
- if (type.left(6)=="class ") type=type.right(type.length()-6);
- else if (type.left(7)=="struct ") type=type.right(type.length()-7);
- else if (type.left(6)=="union ") type=type.right(type.length()-6);
- else if (type.left(5)=="enum ") type=type.right(type.length()-5);
- else if (type.left(9)=="typename ") type=type.right(type.length()-9);
+ type.stripPrefix("class ");
+ type.stripPrefix("struct ");
+ type.stripPrefix("union ");
+ type.stripPrefix("enum ");
+ type.stripPrefix("typename ");
static QRegExp id("[a-z_A-Z][:a-z_A-Z0-9]*");
-
QCString canType;
int i,p=0,l;
@@ -2666,7 +2661,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
{
canType += type.mid(p,i-p);
QCString word = type.mid(i,l);
- ClassDef *cd = getResolvedClass(d,fs,word);
+ ClassDef *cd = getResolvedClass(d,fs,word,0,0,TRUE);
//printf("word %s => %s\n",word.data(),cd?cd->qualifiedName().data():"<none>");
if (cd)
{
@@ -2677,7 +2672,16 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
QCString resolvedType = resolveTypeDef(d,word);
if (resolvedType.isEmpty())
{
- canType+=word;
+ int i=word.findRev("::");
+ if (i!=-1) // strip scope if it cannot be resolved anyway
+ // TODO is this robust enough?
+ {
+ canType+=word.mid(i+2);
+ }
+ else
+ {
+ canType+=word;
+ }
}
else
{
@@ -2687,7 +2691,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
p=i+l;
}
canType += type.right(type.length()-p);
- //printf("result = %s\n",canType.data());
+ //printf("result = %s->%s\n",type.data(),canType.data());
return removeRedundantWhiteSpace(canType);
}
@@ -2697,11 +2701,11 @@ static bool matchArgument2(
Definition *dstScope,FileDef *dstFileScope,const Argument *dstA
)
{
- //printf("match argument start `%s|%s' <-> `%s|%s' using nsp=%p class=%p\n",
- // srcA->type.data(),srcA->name.data(),
- // dstA->type.data(),dstA->name.data(),
- // usingNamespaces,
- // usingClasses);
+ //printf(">> match argument: %s::`%s|%s' (%s) <-> %s::`%s|%s' (%s)\n",
+ // srcScope ? srcScope->name().data() : "",
+ // srcA->type.data(),srcA->name.data(),srcA->canType.data(),
+ // dstScope ? dstScope->name().data() : "",
+ // dstA->type.data(),dstA->name.data(),dstA->canType.data());
if (srcA->array!=dstA->array) // nomatch for char[] against char
{
@@ -2709,16 +2713,28 @@ static bool matchArgument2(
return FALSE;
}
- QCString canonicalSrcType = extractCanonicalType(srcScope,srcFileScope,srcA);
- QCString canonicalDstType = extractCanonicalType(dstScope,dstFileScope,dstA);
+ if (srcA->canType.isEmpty())
+ {
+ Argument *thatSrcA = (Argument*)srcA; // since canType is a cached value
+ // of type we do not really change the argument, but the
+ // compiler does know that.
+ thatSrcA->canType = extractCanonicalType(srcScope,srcFileScope,srcA);
+ }
+ if (dstA->canType.isEmpty())
+ {
+ Argument *thatDstA = (Argument*)dstA;
+ thatDstA->canType = extractCanonicalType(dstScope,dstFileScope,dstA);
+ }
- if (canonicalSrcType==canonicalDstType)
+ if (srcA->canType==dstA->canType)
{
MATCH
return TRUE;
}
else
{
+ //printf(" Canonical types do not match [%s]<->[%s]\n",
+ // srcA->canType.data(),dstA->canType.data());
NOMATCH
return FALSE;
}
@@ -3545,11 +3561,11 @@ QCString linkToText(const char *link,bool isFileName)
* 3) "memberName(...)" a specific (overloaded) function or define
* with name memberName
* 4) "::name a global variable or define
- * 4) "#memberName member variable, global variable or define
+ * 4) "\#memberName member variable, global variable or define
* 5) ("ScopeName::")+"memberName()"
* 6) ("ScopeName::")+"memberName(...)"
* 7) ("ScopeName::")+"memberName"
- * instead of :: the # symbol may also be used.
+ * instead of :: the \# symbol may also be used.
*/
bool generateRef(OutputDocInterface &od,const char *scName,
@@ -5373,5 +5389,20 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s)
return s.mid(li,bi-li);
}
-
+void stringToSearchIndex(const QCString &docBaseUrl,const QCString &title,
+ const QCString &str,bool priority,const QCString &anchor)
+{
+ static bool searchEngine = Config_getBool("SEARCHENGINE");
+ if (searchEngine)
+ {
+ Doxygen::searchIndex->setCurrentDoc(title,docBaseUrl,anchor);
+ static QRegExp wordPattern("[a-z_A-Z][a-z_A-Z0-9]*");
+ int i,p=0,l;
+ while ((i=wordPattern.match(str,p,&l))!=-1)
+ {
+ Doxygen::searchIndex->addWord(str.mid(i,l),priority);
+ p=i+l;
+ }
+ }
+}
diff --git a/src/util.h b/src/util.h
index b8e582f..fc991f4 100644
--- a/src/util.h
+++ b/src/util.h
@@ -231,6 +231,9 @@ QCString stripPath(const char *s);
bool containsWord(const QCString &s,const QCString &word);
bool findAndRemoveWord(QCString &s,const QCString &word);
QCString stripLeadingAndTrailingEmptyLines(const QCString &s);
+void stringToSearchIndex(const QCString &docUrlBase,const QCString &title,
+ const QCString &str, bool priority=FALSE,
+ const QCString &anchor="");
#endif
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 998ace4..3a73c55 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -483,9 +483,9 @@ static void stripQualifiers(QCString &typeStr)
bool done=FALSE;
while (!done)
{
- if (typeStr.left(7)=="static ") typeStr=typeStr.mid(7);
- else if (typeStr.left(8)=="virtual ") typeStr=typeStr.mid(8);
- else if (typeStr.left(9)=="volatile ") typeStr=typeStr.mid(9);
+ if (typeStr.stripPrefix("static "));
+ else if (typeStr.stripPrefix("virtual "));
+ else if (typeStr.stripPrefix("volatile "));
else done=TRUE;
}
}