summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-10-15 15:32:16 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-10-15 15:32:16 (GMT)
commit868208ab61ca3aa6f506076f60de2745eaa8a6be (patch)
tree7824ba2a5c9f1fe6ddc8633a13cc7d1e7a6c79a3 /src
parent499475795ed160e3a1e9cb571adc1ad86dc6a8ba (diff)
downloadDoxygen-868208ab61ca3aa6f506076f60de2745eaa8a6be.zip
Doxygen-868208ab61ca3aa6f506076f60de2745eaa8a6be.tar.gz
Doxygen-868208ab61ca3aa6f506076f60de2745eaa8a6be.tar.bz2
Release-1.2.2-20001015
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp42
-rw-r--r--src/classdef.h2
-rw-r--r--src/code.l3
-rw-r--r--src/config.h4
-rw-r--r--src/config.l33
-rw-r--r--src/doc.l115
-rw-r--r--src/doxygen.cpp22
-rw-r--r--src/doxygen.dtd4
-rw-r--r--src/doxygen.pro.in10
-rw-r--r--src/doxytag.pro.in12
-rw-r--r--src/entry.h4
-rw-r--r--src/filedef.cpp1
-rw-r--r--src/groupdef.cpp2
-rw-r--r--src/htmlgen.cpp2
-rw-r--r--src/index.cpp28
-rw-r--r--src/language.cpp5
-rw-r--r--src/logos.cpp38
-rw-r--r--src/logos.h2
-rw-r--r--src/mangen.cpp19
-rw-r--r--src/memberdef.cpp19
-rw-r--r--src/memberdef.h8
-rw-r--r--src/memberlist.cpp21
-rw-r--r--src/message.cpp35
-rw-r--r--src/message.h2
-rw-r--r--src/scanner.l14
-rw-r--r--src/translator.h20
-rw-r--r--src/translator_cn.h707
-rw-r--r--src/translator_cz.h18
-rw-r--r--src/translator_nl.h35
-rw-r--r--src/util.cpp708
-rw-r--r--src/util.h18
-rw-r--r--src/xml_dtd.h4
32 files changed, 1584 insertions, 373 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 6a505ec..9289375 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -50,10 +50,20 @@ ClassDef::ClassDef(
: Definition(defFileName,defLine,removeRedundantWhiteSpace(nm))
{
//name=n;
+
+ QCString compoundName;
+ switch(ct)
+ {
+ case Class: compoundName="class"; break;
+ case Struct: compoundName="struct"; break;
+ case Union: compoundName="union"; break;
+ case Interface: compoundName="interface"; break;
+ case Exception: compoundName="exception"; break;
+ }
if (fName)
fileName=stripExtension(fName);
else
- fileName="class_"+nameToFile(nm);
+ fileName=compoundName+"_"+nameToFile(nm);
if (lref)
{
//url=(QCString)"doxygen=\""+lref+":\" href=\""+fileName;
@@ -66,7 +76,7 @@ ClassDef::ClassDef(
exampleList = new ExampleList;
exampleDict = new ExampleDict(29);
}
- memListFileName="class_"+nameToFile(nm)+"-members";
+ memListFileName=compoundName+"_"+nameToFile(nm)+"-members";
inherits = new BaseClassList;
inherits->setAutoDelete(TRUE);
inheritedBy = new BaseClassList;
@@ -195,6 +205,7 @@ void ClassDef::addMembersToMemberGroup()
addMemberListToGroup(&priStaticAttribs);
addMemberListToGroup(&friends);
addMemberListToGroup(&related);
+ addMemberListToGroup(&properties);
}
// adds new member definition to the class
@@ -228,6 +239,10 @@ void ClassDef::insertMember(MemberDef *md)
dcopMethods.append(md);
md->setSectionList(&dcopMethods);
break;
+ case MemberDef::Property:
+ properties.append(md);
+ md->setSectionList(&properties);
+ break;
case MemberDef::Slot: // Qt specific
switch (md->protection())
{
@@ -363,6 +378,12 @@ void ClassDef::insertMember(MemberDef *md)
{
switch (md->memberType())
{
+ case MemberDef::Property:
+ if (Config::sortMembersFlag)
+ propertyMembers.inSort(md);
+ else
+ propertyMembers.append(md);
+ break;
case MemberDef::Signal: // fall through
case MemberDef::DCOP:
if (Config::sortMembersFlag)
@@ -521,6 +542,7 @@ void ClassDef::computeAnchors()
setAnchors('t',&proTypes);
setAnchors('u',&priTypes);
setAnchors('v',&dcopMethods);
+ setAnchors('w',&properties);
}
void ClassDef::distributeMemberGroupDocumentation()
@@ -789,6 +811,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startDotGraph();
parseText(ol,theTranslator->trClassDiagram(name()));
ol.endDotGraph(inheritanceGraph);
+ if (Config::generateLegend)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
@@ -821,6 +844,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startDotGraph();
parseText(ol,theTranslator->trCollaborationDiagram(name()));
ol.endDotGraph(usageImplGraph);
+ if (Config::generateLegend)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
@@ -870,6 +894,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
pubSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicSlots(),0);
signals.writeDeclarations(ol,this,0,0,0,theTranslator->trSignals(),0);
dcopMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trDCOPMethods(),0);
+ properties.writeDeclarations(ol,this,0,0,0,theTranslator->trProperties(),0);
// static public members
pubStaticMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPublicMembers(),0);
@@ -1051,6 +1076,16 @@ void ClassDef::writeDocumentation(OutputList &ol)
variableMembers.writeDocumentation(ol,name(),this);
}
+ propertyMembers.countDocMembers();
+ if (propertyMembers.totalCount()>0)
+ {
+ ol.writeRuler();
+ ol.startGroupHeader();
+ parseText(ol,theTranslator->trPropertyDocumentation());
+ ol.endGroupHeader();
+ propertyMembers.writeDocumentation(ol,name(),this);
+ }
+
ol.startTextBlock();
// write the list of used files (not for man pages)
@@ -1355,6 +1390,7 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
pubSlots.writePlainDeclarations(ol,this,0,0,0);
signals.writePlainDeclarations(ol,this,0,0,0);
dcopMethods.writePlainDeclarations(ol,this,0,0,0);
+ properties.writePlainDeclarations(ol,this,0,0,0);
pubStaticMembers.writePlainDeclarations(ol,this,0,0,0);
pubStaticAttribs.writePlainDeclarations(ol,this,0,0,0);
proTypes.writePlainDeclarations(ol,this,0,0,0);
@@ -1808,6 +1844,7 @@ void ClassDef::generateXMLSection(QTextStream &t,MemberList *ml,const char *type
void ClassDef::generateXML(QTextStream &t)
{
+ if (name().find('@')!=-1) return; // skip anonymous compounds
t << " <compounddef id=\""
<< getOutputFileBase() << "\" type=\"";
switch(compType)
@@ -1893,6 +1930,7 @@ void ClassDef::generateXML(QTextStream &t)
generateXMLSection(t,&pubSlots,"public-slot");
generateXMLSection(t,&signals,"signal");
generateXMLSection(t,&dcopMethods,"dcop-func");
+ generateXMLSection(t,&properties,"property");
generateXMLSection(t,&pubStaticMembers,"public-static-func");
generateXMLSection(t,&pubStaticAttribs,"public-static-attrib");
generateXMLSection(t,&proTypes,"protected-type");
diff --git a/src/classdef.h b/src/classdef.h
index dd4b16f..2bb6a66 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -169,6 +169,7 @@ class ClassDef : public Definition
MemberList signals;
MemberList friends;
MemberList dcopMethods;
+ MemberList properties;
/* member list by types */
MemberList constructors;
@@ -178,6 +179,7 @@ class ClassDef : public Definition
MemberList functionMembers;
MemberList relatedMembers;
MemberList variableMembers;
+ MemberList propertyMembers;
/* user defined member groups */
MemberGroupList *memberGroupList;
diff --git a/src/code.l b/src/code.l
index 6253507..10d706f 100644
--- a/src/code.l
+++ b/src/code.l
@@ -417,7 +417,8 @@ static bool getLink(const char *className,
QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className;
//printf("Trying `%s'::`%s'\n",c.data(),m.data());
- if (getDefs(c,m,"()",md,cd,fd,nd,gd) && md->isLinkable())
+ if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) &&
+ md->isLinkable())
{
//printf("Found!\n");
if (g_exampleBlock)
diff --git a/src/config.h b/src/config.h
index 724f02b..a85fc68 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Sun Oct 1 13:51:26 2000
+/* This file was generated by configgen on Tue Oct 10 22:16:03 2000
* from config_templ.h
*
* DO NOT EDIT!
@@ -74,6 +74,7 @@ struct Config
static bool warningFlag; // generate warnings flag
static bool warningUndocFlag; // generate undocumented warnings
static QCString warnFormat; // format of the warning messages
+ static QCString warnLogFile; // log file to write warning to
static QStrList inputSources; // list of input files
static QStrList filePatternList; // list of file patterns
static bool recursiveFlag; // scan directories recursively
@@ -133,6 +134,7 @@ struct Config
static QCString dotPath; // path to the dot tool
static int maxDotGraphWidth; // max dot graph width
static int maxDotGraphHeight; // max dot graph height
+ static bool generateLegend; // generate legend page
static bool searchEngineFlag; // generate search engine flag
static QCString cgiName; // the name of the CGI binary
static QCString cgiURL; // the absolute URL to the CGI binary
diff --git a/src/config.l b/src/config.l
index 204531f..86b6578 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Sun Oct 1 13:51:26 2000
+/* This file was generated by configgen on Tue Oct 10 22:16:03 2000
* from config_templ.l
*
* DO NOT EDIT!
@@ -111,6 +111,7 @@ bool Config::quietFlag = FALSE;
bool Config::warningFlag = TRUE;
bool Config::warningUndocFlag = TRUE;
QCString Config::warnFormat = "$file:$line: $text";
+QCString Config::warnLogFile;
QStrList Config::inputSources;
QStrList Config::filePatternList;
bool Config::recursiveFlag = FALSE;
@@ -170,6 +171,7 @@ bool Config::gfxHierarchyFlag = TRUE;
QCString Config::dotPath;
int Config::maxDotGraphWidth = 1024;
int Config::maxDotGraphHeight = 1024;
+bool Config::generateLegend = TRUE;
bool Config::searchEngineFlag = FALSE;
QCString Config::cgiName = "search.cgi";
QCString Config::cgiURL;
@@ -370,6 +372,7 @@ static void readIncludeFile(const char *incName)
<Start>"WARNINGS"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningFlag; }
<Start>"WARN_IF_UNDOCUMENTED"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningUndocFlag; }
<Start>"WARN_FORMAT"[ \t]*"=" { BEGIN(GetString); s=&Config::warnFormat; s->resize(0); }
+<Start>"WARN_LOGFILE"[ \t]*"=" { BEGIN(GetString); s=&Config::warnLogFile; s->resize(0); }
<Start>"INPUT"[ \t]*"=" { BEGIN(GetStrList); l=&Config::inputSources; l->clear(); elemStr=""; }
<Start>"INPUT"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::inputSources; elemStr=""; }
<Start>"FILE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::filePatternList; l->clear(); elemStr=""; }
@@ -443,6 +446,7 @@ static void readIncludeFile(const char *incName)
<Start>"DOT_PATH"[ \t]*"=" { BEGIN(GetString); s=&Config::dotPath; s->resize(0); }
<Start>"MAX_DOT_GRAPH_WIDTH"[ \t]*"=" { BEGIN(GetString); s=&maxDotGraphWidthString; s->resize(0); }
<Start>"MAX_DOT_GRAPH_HEIGHT"[ \t]*"=" { BEGIN(GetString); s=&maxDotGraphHeightString; s->resize(0); }
+<Start>"GENERATE_LEGEND"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateLegend; }
<Start>"SEARCHENGINE"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchEngineFlag; }
<Start>"CGI_NAME"[ \t]*"=" { BEGIN(GetString); s=&Config::cgiName; s->resize(0); }
<Start>"CGI_URL"[ \t]*"=" { BEGIN(GetString); s=&Config::cgiURL; s->resize(0); }
@@ -614,6 +618,7 @@ void dumpConfig()
printf("warningFlag=`%d'\n",Config::warningFlag);
printf("warningUndocFlag=`%d'\n",Config::warningUndocFlag);
printf("warnFormat=`%s'\n",Config::warnFormat.data());
+ printf("warnLogFile=`%s'\n",Config::warnLogFile.data());
printf("# configuration options related to the input files\n");
{
char *is=Config::inputSources.first();
@@ -781,6 +786,7 @@ void dumpConfig()
printf("dotPath=`%s'\n",Config::dotPath.data());
printf("maxDotGraphWidth=`%d'\n",Config::maxDotGraphWidth);
printf("maxDotGraphHeight=`%d'\n",Config::maxDotGraphHeight);
+ printf("generateLegend=`%d'\n",Config::generateLegend);
printf("# Configuration::addtions related to the search engine \n");
printf("searchEngineFlag=`%d'\n",Config::searchEngineFlag);
printf("cgiName=`%s'\n",Config::cgiName.data());
@@ -837,6 +843,7 @@ void Config::init()
Config::warningFlag = TRUE;
Config::warningUndocFlag = TRUE;
Config::warnFormat = "$file:$line: $text";
+ Config::warnLogFile.resize(0);
Config::inputSources.clear();
Config::filePatternList.clear();
Config::recursiveFlag = FALSE;
@@ -896,6 +903,7 @@ void Config::init()
Config::dotPath.resize(0);
Config::maxDotGraphWidth = 1024;
Config::maxDotGraphHeight = 1024;
+ Config::generateLegend = TRUE;
Config::searchEngineFlag = FALSE;
Config::cgiName = "search.cgi";
Config::cgiURL.resize(0);
@@ -1405,6 +1413,17 @@ void writeTemplateConfig(QFile *f,bool sl)
if (!sl)
{
t << "\n";
+ t << "# The WARN_LOGFILE tag can be used to specify a file to which warning \n";
+ t << "# and error messages should be written. If left blank the output is written \n";
+ t << "# to stderr. \n";
+ t << "\n";
+ }
+ t << "WARN_LOGFILE = ";
+ writeStringValue(t,Config::warnLogFile);
+ t << "\n";
+ if (!sl)
+ {
+ t << "\n";
}
t << "#---------------------------------------------------------------------------\n";
t << "# configuration options related to the input files\n";
@@ -2141,6 +2160,17 @@ void writeTemplateConfig(QFile *f,bool sl)
if (!sl)
{
t << "\n";
+ t << "# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will \n";
+ t << "# generate a legend page explaining the meaning of the various boxes and \n";
+ t << "# arrows in the dot generated graphs. \n";
+ t << "\n";
+ }
+ t << "GENERATE_LEGEND = ";
+ writeBoolValue(t,Config::generateLegend);
+ t << "\n";
+ if (!sl)
+ {
+ t << "\n";
}
t << "#---------------------------------------------------------------------------\n";
t << "# Configuration::addtions related to the search engine \n";
@@ -2420,6 +2450,7 @@ void substituteEnvironmentVars()
substEnvVarsInStrList( Config::sectionFilterList );
substEnvVarsInStrList( Config::aliasList );
substEnvVarsInString( Config::warnFormat );
+ substEnvVarsInString( Config::warnLogFile );
substEnvVarsInStrList( Config::inputSources );
substEnvVarsInStrList( Config::filePatternList );
substEnvVarsInStrList( Config::excludeSources );
diff --git a/src/doc.l b/src/doc.l
index 3cc7891..41af1ee 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -92,12 +92,12 @@ static QCString sectionRef;
static bool insideVerbatim = FALSE;
static bool insidePre = FALSE;
static int depthIf;
-//static int currentListIndentLevel;
-static QStack<char> currentListIndent;
static QCString curImageName;
static QCString curImageCaption;
static QCString internalRefFile;
static QCString internalRefAnchor;
+static QStack<char> currentListIndent; // indent stack of all list items
+static bool insideItemList = FALSE;
//-----------------------------------------------------------------------------
@@ -456,6 +456,32 @@ static void showUntil(OutputList &ol,const char *key)
//-----------------------------------------------------------------
+static bool inBlock()
+{
+ return inParamBlock || inRetValBlock || inSeeBlock || inReturnBlock || inAuthorBlock ||
+ inVersionBlock || inSinceBlock || inDateBlock || inWarningBlock || inRemarkBlock ||
+ inAttentionBlock || inBugBlock || inNoteBlock ||
+ inParBlock || inExceptionBlock || inDeprecatedBlock || inPreBlock ||
+ inPostBlock || inInvarBlock;
+}
+
+static void endBlock()
+{
+ if (inParamBlock || inRetValBlock || inExceptionBlock)
+ {
+ outDoc->endDescTableData();
+ outDoc->endDescTable();
+ }
+ outDoc->endDescList();
+ currentListIndent.pop();
+ inParamBlock=inRetValBlock=inSeeBlock=inReturnBlock=inAuthorBlock=
+ inVersionBlock=inSinceBlock=inDateBlock=inBugBlock=inNoteBlock=inWarningBlock=
+ inParBlock=inExceptionBlock=inDeprecatedBlock=inPreBlock=inPostBlock=
+ inInvarBlock=inRemarkBlock=inAttentionBlock=FALSE;
+}
+
+//-----------------------------------------------------------------
+
struct IndentInfo
{
public:
@@ -477,8 +503,7 @@ struct IndentInfo
bool enumerated;
};
-static QStack<IndentInfo> listIndentStack;
-static bool insideItemList = FALSE;
+static QStack<IndentInfo> listIndentStack; // indent stack of - items
static void addListItemMarker(const char *marker,int dashPos,bool enumerated)
{
@@ -504,6 +529,7 @@ static void addListItemMarker(const char *marker,int dashPos,bool enumerated)
//printf("list marker found at column %d enumerated %d\n",indent,enumerated);
if (!insideItemList)
{
+ currentListIndent.push(enumerated ? "O" : "U");
listIndentStack.push(new IndentInfo(indent,enumerated));
listIndentStack.top()->startList();
listIndentStack.top()->writeItem();
@@ -528,6 +554,7 @@ static void addListItemMarker(const char *marker,int dashPos,bool enumerated)
}
else if (pPrevInfo->indent<indent) // start sub item list
{
+ currentListIndent.push(enumerated ? "O" : "U");
listIndentStack.push(new IndentInfo(indent,enumerated));
listIndentStack.top()->startList();
listIndentStack.top()->writeItem();
@@ -536,6 +563,7 @@ static void addListItemMarker(const char *marker,int dashPos,bool enumerated)
{
pPrevInfo->endList();
listIndentStack.pop();
+ currentListIndent.pop();
delete pPrevInfo;
// safe guard against wrong indenting
if (listIndentStack.isEmpty())
@@ -558,35 +586,27 @@ static void forceEndItemList()
IndentInfo *info;
while ((info=listIndentStack.pop())!=0)
{
- info->endList();
delete info;
}
- insideItemList=FALSE;
-}
-
-//-----------------------------------------------------------------
-
-static bool inBlock()
-{
- return inParamBlock || inRetValBlock || inSeeBlock || inReturnBlock || inAuthorBlock ||
- inVersionBlock || inSinceBlock || inDateBlock || inWarningBlock || inRemarkBlock ||
- inAttentionBlock || inBugBlock || inNoteBlock ||
- inParBlock || inExceptionBlock || inDeprecatedBlock || inPreBlock ||
- inPostBlock || inInvarBlock;
-}
-
-static void endBlock()
-{
- if (inParamBlock || inRetValBlock || inExceptionBlock)
+ while (!currentListIndent.isEmpty())
+ {
+ char c=*currentListIndent.pop();
+ switch(c)
{
- outDoc->endDescTableData();
- outDoc->endDescTable();
+ case 'O': outDoc->endEnumList(); break;
+ case 'U': outDoc->endItemList(); break;
+ case 'D':
+ if (inBlock())
+ {
+ currentListIndent.push("D"); // hack!
+ endBlock();
+ }
+ else
+ outDoc->endDescription();
+ break;
}
- outDoc->endDescList();
- inParamBlock=inRetValBlock=inSeeBlock=inReturnBlock=inAuthorBlock=
- inVersionBlock=inSinceBlock=inDateBlock=inBugBlock=inNoteBlock=inWarningBlock=
- inParBlock=inExceptionBlock=inDeprecatedBlock=inPreBlock=inPostBlock=
- inInvarBlock=inRemarkBlock=inAttentionBlock=FALSE;
+ }
+ insideItemList=FALSE;
}
//-----------------------------------------------------------------
@@ -999,6 +1019,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
endArgumentList();
if (b) endBlock();
inParBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
outDoc->docify(title);
@@ -1018,6 +1039,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inWarningBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trWarning()+": ");
@@ -1036,6 +1058,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inRemarkBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trRemarks()+": ");
@@ -1054,6 +1077,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inAttentionBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trAttention()+": ");
@@ -1072,6 +1096,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inBugBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trBugsAndLimitations()+": ");
@@ -1090,6 +1115,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inNoteBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trNote()+": ");
@@ -1108,6 +1134,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inPreBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trPrecondition()+": ");
@@ -1126,6 +1153,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inPostBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trPostcondition()+": ");
@@ -1144,6 +1172,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inInvarBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trInvariant()+": ");
@@ -1162,6 +1191,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inVersionBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trVersion()+": ");
@@ -1180,6 +1210,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inSinceBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trSince()+": ");
@@ -1198,6 +1229,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inDateBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trDate()+": ");
@@ -1220,6 +1252,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
ASSERT(item!=0);
endArgumentList();
if (inBlock()) endBlock();
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
outDoc->writeObjectLink(0,"todo",item->listAnchor,theTranslator->trTodo()+": ");
@@ -1228,6 +1261,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->writeDescItem();
internalParseDocument(item->text);
outDoc->endDescList();
+ currentListIndent.pop();
}
}
<DocScan>"\\test "[0-9]+ { // this tag is generated in an earlier pass
@@ -1240,6 +1274,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
ASSERT(item!=0);
endArgumentList();
if (inBlock()) endBlock();
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
outDoc->writeObjectLink(0,"test",item->listAnchor,theTranslator->trTest()+": ");
@@ -1248,6 +1283,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->writeDescItem();
internalParseDocument(item->text);
outDoc->endDescList();
+ currentListIndent.pop();
}
}
<DocScan>{CMD}"deprecated"/{BN} {
@@ -1256,6 +1292,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inDeprecatedBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trDeprecated()+": ");
@@ -1276,6 +1313,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
tagText=tagText.left(tagText.length()-1);
endArgumentList();
if (inBlock()) endBlock();
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(tagName+": ");
@@ -1284,6 +1322,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->writeDescItem();
scanString(tagText);
outDoc->endDescList();
+ currentListIndent.pop();
}
<DocScan>{CMD}"author"/{BN} {
endArgumentList();
@@ -1291,6 +1330,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inAuthorBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trAuthors()+": ");
@@ -1309,6 +1349,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inReturnBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trReturns()+": ");
@@ -1323,6 +1364,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inSeeBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trSeeAlso()+": ");
@@ -1346,6 +1388,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inParamBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trParameters()+": ");
@@ -1371,6 +1414,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inRetValBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trReturnValues()+": ");
@@ -1396,6 +1440,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{
if (inBlock()) endBlock();
inExceptionBlock=TRUE;
+ currentListIndent.push("D");
outDoc->startDescList();
outDoc->startBold();
scanString(theTranslator->trExceptions()+": ");
@@ -1819,7 +1864,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
"Warning in the documentation of this entity:\nMore </ol> tags than <ol> tags in the documentation of this entity."
);
}
- else if (currentListIndent.top()!="O")
+ else if (*currentListIndent.top()!='O')
{
warn(yyFileName,yyLineNr,
"Warning in the documentation of this entity:\nThe </ol> tag does not end a <ol> tag."
@@ -1841,7 +1886,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
"Warning in the documentation of this entity:\nMore </ul> tags than <ul> tags."
);
}
- else if (currentListIndent.top()!="U")
+ else if (*currentListIndent.top()!='U')
{
warn(yyFileName,yyLineNr,
"Warning in the documentation of this entity:\nThe </ul> tag does not end a <ul> tag."
@@ -1855,7 +1900,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
}
<DocScan>"<"{LI}{ATTR}">" {
if (/*currentListIndent.isEmpty() ||*/ //DvH: I removed this check because I use this in the manual (the <ul> is in a \htmlonly block!)
- currentListIndent.top()=="D")
+ !currentListIndent.isEmpty() && *currentListIndent.top()=='D')
{
warn(yyFileName,yyLineNr,
"Warning in the documentation of this entity:\nThe <li> tag can only be used inside a <ul> ... </ul> or a <ol> ... </ol> block."
@@ -1882,7 +1927,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
"Warning in the documentation of this entity:\nMore </dl> tags than <dl> tags in the documentation."
);
}
- else if (currentListIndent.top()!="D")
+ else if (*currentListIndent.top()!='D')
{
warn(yyFileName,yyLineNr,
"Warning in the documentation of this entity:\nThe </dl> tag does not end a <dl> tag in the documentation."
@@ -1896,7 +1941,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
}
<DocScan>"<"{DT}{ATTR}">" {
if (currentListIndent.isEmpty() ||
- currentListIndent.top()!="D")
+ *currentListIndent.top()!='D')
{
warn(yyFileName,yyLineNr,
"Warning in the documentation of this entity:\nThe <dt> tag can only be used inside a <dl> ... </dl> block."
@@ -1910,7 +1955,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<DocScan>"</"{DT}{ATTR}">"
<DocScan>"<"{DD}{ATTR}">" {
if (currentListIndent.isEmpty() ||
- currentListIndent.top()!="D")
+ *currentListIndent.top()!='D')
{
warn(yyFileName,yyLineNr,
"Warning in the documentation of this entity:\nThe <dd> tag can only be used inside a <dl> ... </dl> block."
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index e01ef56..621039d 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1174,7 +1174,7 @@ static MemberDef *addVariableToFile(
NamespaceDef *nd = 0;
if (!scope.isEmpty())
{
- QCString nscope=removeAnnonymousScopes(scope);
+ QCString nscope=removeAnonymousScopes(scope);
if (!nscope.isEmpty())
{
nd = getResolvedNamespace(nscope);
@@ -1219,7 +1219,7 @@ static MemberDef *addVariableToFile(
MemberDef *md;
for (mni.toFirst();(md=mni.current());++mni)
{
- QCString nscope=removeAnnonymousScopes(scope);
+ QCString nscope=removeAnonymousScopes(scope);
NamespaceDef *nd=0;
if (!nscope.isEmpty())
{
@@ -1395,6 +1395,8 @@ void buildVarList(Entry *root)
mtype=MemberDef::Typedef;
else if (type.left(7)=="friend ")
mtype=MemberDef::Friend;
+ else if (root->mtype==Property)
+ mtype=MemberDef::Property;
else
mtype=MemberDef::Variable;
@@ -1811,7 +1813,7 @@ static void buildMemberList(Entry *root)
NamespaceDef *nd = 0;
if (root->parent->section == Entry::NAMESPACE_SEC )
{
- QCString nscope=removeAnnonymousScopes(root->parent->name);
+ QCString nscope=removeAnonymousScopes(root->parent->name);
if (!nscope.isEmpty())
{
nd = getResolvedNamespace(nscope);
@@ -3044,7 +3046,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
//printf("result: scope=%s\n",scopeName.data());
}
- namespaceName=removeAnnonymousScopes(namespaceName);
+ namespaceName=removeAnonymousScopes(namespaceName);
//printf("namespaceName=`%s' className=`%s'\n",namespaceName.data(),className.data());
// merge class and namespace scopes again
scopeName.resize(0);
@@ -4135,9 +4137,8 @@ static void generateFileSources()
for (;(fd=fni.current());++fni)
{
bool src = !fd->isReference() &&
- (Config::verbatimHeaderFlag
- //fd->generateSource()
- || Config::sourceBrowseFlag);
+ fd->name().right(4)!=".doc" && fd->name().right(4)!=".txt" &&
+ (Config::verbatimHeaderFlag || Config::sourceBrowseFlag);
if (src)
{
msg("Generating code for file %s...\n",fd->name().data());
@@ -6044,8 +6045,11 @@ int main(int argc,char **argv)
msg("Generating page index...\n");
writePageIndex(*outputList);
- msg("Generating graph info page...\n");
- writeGraphInfo(*outputList);
+ if (Config::generateLegend)
+ {
+ msg("Generating graph info page...\n");
+ writeGraphInfo(*outputList);
+ }
msg("Generating search index...\n");
generateSearchIndex();
diff --git a/src/doxygen.dtd b/src/doxygen.dtd
index a479ee5..62727b8 100644
--- a/src/doxygen.dtd
+++ b/src/doxygen.dtd
@@ -1,4 +1,4 @@
-<?xml encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- DTD describing the grammar used in doxygen's XML output -->
<!-- standard character entities -->
@@ -50,6 +50,8 @@
|friend
|related
|define|prototype|typedef|enum|func|var
+ |dcop-func
+ |property
) #REQUIRED
'
>
diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in
index 30312b7..66d57a0 100644
--- a/src/doxygen.pro.in
+++ b/src/doxygen.pro.in
@@ -15,7 +15,7 @@
# TMake project file for doxygen
TEMPLATE = doxygen.t
-CONFIG = console qt warn_on $extraopts
+CONFIG = console warn_on $extraopts
HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \
membername.h index.h memberlist.h definition.h \
entry.h logos.h instdox.h message.h code.h \
@@ -27,7 +27,7 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \
translator_it.h formula.h debug.h membergroup.h htmlhelp.h \
translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \
reflist.h page.h sortdict.h translator_hu.h translator_kr.h \
- translator_ro.h translator_si.h
+ translator_ro.h translator_si.h translator_cn.h
SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
memberdef.cpp membername.cpp index.cpp memberlist.cpp \
entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \
@@ -39,7 +39,11 @@ SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
version.cpp language.cpp definition.cpp formula.cpp debug.cpp \
membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \
reflist.cpp
+unix:LIBS += -L../qtools -lqtools
win32:INCLUDEPATH += .
-win32:LIBS += shell32.lib
+win32:LIBS += qtools.lib shell32.lib
+win32:TMAKE_LFLAGS += /LIBPATH:..\qtools
+win32:TMAKE_CXXFLAGS += -DQT_NODLL
+INCLUDEPATH += ../qtools
TARGET = ../bin/doxygen
OBJECTS_DIR = ../objects
diff --git a/src/doxytag.pro.in b/src/doxytag.pro.in
index 1032443..d91378d 100644
--- a/src/doxytag.pro.in
+++ b/src/doxytag.pro.in
@@ -15,11 +15,15 @@
# TMake project file for doxytag
TEMPLATE = doxytag.t
-CONFIG = console warn_on qt $extraopts
+CONFIG = console warn_on $extraopts
HEADERS = suffixtree.h searchindex.h logos.h version.h
SOURCES = doxytag.cpp suffixtree.cpp searchindex.cpp \
logos.cpp version.cpp
-TARGET = ../bin/doxytag
-win32:INCLUDEPATH += .
-#unix:INCLUDEPATH += /usr/include
+unix:LIBS += -L../qtools -lqtools
+win32:INCLUDEPATH += .
+win32:LIBS += qtools.lib
+win32:TMAKE_LFLAGS += /LIBPATH:..\qtools
+win32:TMAKE_CXXFLAGS += -DQT_NODLL
+INCLUDEPATH += ../qtools
OBJECTS_DIR = ../objects
+TARGET = ../bin/doxytag
diff --git a/src/entry.h b/src/entry.h
index 27035e2..c836d87 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -23,7 +23,7 @@
enum Protection { Public, Protected, Private } ;
enum Specifier { Normal, Virtual, Pure } ;
-enum MethodTypes { Method, Signal, Slot, DCOP };
+enum MethodTypes { Method, Signal, Slot, DCOP, Property };
struct BaseInfo
{
@@ -162,7 +162,7 @@ class Entry
int section; // entry type (see Sections);
Protection protection; // class protection
- MethodTypes mtype; // signal, slot or dcop method?
+ MethodTypes mtype; // signal, slot, (dcop) method, or property?
bool stat; // static ?
bool explicitExternal; // explicitly defined as external?
bool proto; // prototype ?
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 3d20233..6ce4c86 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -220,6 +220,7 @@ void FileDef::writeDocumentation(OutputList &ol)
//incDepGraph.writeGraph(Config::htmlOutputDir,fd->getOutputFileBase());
}
+ //printf("%s: generateSourceFile()=%d\n",name().data(),generateSourceFile());
if (generateSourceFile())
{
ol.disableAllBut(OutputGenerator::Html);
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index eb0611f..5476dc1 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -285,7 +285,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
while (nd)
{
ol.startMemberItem(0);
- ol.docify("namespace");
+ ol.docify("namespace ");
ol.insertMemberAlign();
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,nd->name());
ol.endMemberItem(FALSE);
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 40eed09..1b93b5a 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -89,7 +89,7 @@ void HtmlGenerator::init()
exit(1);
}
writeLogo(Config::htmlOutputDir);
- writeNullImage(Config::htmlOutputDir);
+ //writeNullImage(Config::htmlOutputDir);
}
void HtmlGenerator::writeStyleSheetFile(QFile &file)
diff --git a/src/index.cpp b/src/index.cpp
index 9bd0e37..f470341 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -320,6 +320,7 @@ void writeGraphicalClassHierarchy(OutputList &ol)
//----------------------------------------------------------------------------
+
void countFiles(int &htmlFiles,int &files)
{
htmlFiles=0;
@@ -334,13 +335,18 @@ void countFiles(int &htmlFiles,int &files)
{
bool doc = fd->isLinkableInProject();
bool src = fd->generateSourceFile();
- if (doc || src)
- {
- htmlFiles++;
- }
- if (doc)
+ bool nameOk = fd->name().right(4)!=".doc" &&
+ fd->name().right(4)!=".txt";
+ if (nameOk)
{
- files++;
+ if (doc || src)
+ {
+ htmlFiles++;
+ }
+ if (doc)
+ {
+ files++;
+ }
}
}
}
@@ -416,7 +422,10 @@ void writeFileIndex(OutputList &ol)
//printf("Found filedef %s\n",fd->name().data());
bool doc = fd->isLinkableInProject();
bool src = fd->generateSourceFile();
- if ((doc || src) && !fd->isReference())
+ bool nameOk = fd->name().right(4)!=".doc" &&
+ fd->name().right(4)!=".txt";
+ if (nameOk && (doc || src) &&
+ !fd->isReference())
{
QCString path;
if (Config::fullPathNameFlag)
@@ -1223,11 +1232,6 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections)
first=FALSE;
}
}
- else if (first)
- {
- first=FALSE;
- ol.startItemList();
- }
ol.writeListItem();
ol.docify(md->name());
if (md->isFunction()) ol.docify("()");
diff --git a/src/language.cpp b/src/language.cpp
index 4fca8c7..e7a9576 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -35,6 +35,7 @@
#include "translator_kr.h"
#include "translator_ro.h"
#include "translator_si.h"
+#include "translator_cn.h"
#endif
#define L_EQUAL(a) !stricmp(langName,a)
@@ -120,6 +121,10 @@ bool setTranslator(const char *langName)
{
theTranslator=new TranslatorSlovene;
}
+ else if (L_EQUAL("chinese"))
+ {
+ theTranslator=new TranslatorChinese;
+ }
#endif
else // use the default language (i.e. english)
{
diff --git a/src/logos.cpp b/src/logos.cpp
index f598435..92bc08e 100644
--- a/src/logos.cpp
+++ b/src/logos.cpp
@@ -22,13 +22,13 @@
#include <qdir.h>
-unsigned char null_data[] = {
- 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0xff,
- 0x00, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b
-};
-unsigned int null_len = 43;
+//unsigned char null_data[] = {
+// 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0xff,
+// 0x00, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00,
+// 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
+// 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b
+//};
+//unsigned int null_len = 43;
unsigned char logo_data[] = {
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x6e, 0x00, 0x35, 0x00, 0xe7, 0x00,
@@ -3139,18 +3139,18 @@ unsigned char doxfont_data[] = {
};
unsigned int doxfont_len = 32760;
-void writeNullImage(const char *dir)
-{
- QCString fileName=(QCString)dir+"/null.gif";
- QFile f(fileName);
- if (f.open(IO_WriteOnly))
- f.writeBlock((char *)null_data,null_len);
- else
- {
- fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
- }
- f.close();
-}
+//void writeNullImage(const char *dir)
+//{
+// QCString fileName=(QCString)dir+"/null.gif";
+// QFile f(fileName);
+// if (f.open(IO_WriteOnly))
+// f.writeBlock((char *)null_data,null_len);
+// else
+// {
+// fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
+// }
+// f.close();
+//}
void writeLogo(const char *dir)
{
diff --git a/src/logos.h b/src/logos.h
index 5dbdf22..d8f84a5 100644
--- a/src/logos.h
+++ b/src/logos.h
@@ -19,7 +19,7 @@
#define LOGOS_H
extern void writeLogo(const char *dir);
-extern void writeNullImage(const char *dir);
+//extern void writeNullImage(const char *dir);
extern void writeSearchButton(const char *dir);
extern void writeDoxFont(const char *dir);
extern void removeDoxFont(const char *dir);
diff --git a/src/mangen.cpp b/src/mangen.cpp
index cd5718c..852a0f4 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -73,10 +73,29 @@ void ManGenerator::init()
void ManGenerator::startFile(const char *name,const char *,bool)
{
QCString fileName=name;
+
+ // TODO: do something sensible here.
if (fileName.left(6)=="class_")
{
fileName=fileName.right(fileName.length()-6);
}
+ else if (fileName.left(10)=="interface_")
+ {
+ fileName=fileName.right(fileName.length()-10);
+ }
+ else if (fileName.left(7)=="struct_")
+ {
+ fileName=fileName.right(fileName.length()-7);
+ }
+ else if (fileName.left(6)=="union_")
+ {
+ fileName=fileName.right(fileName.length()-6);
+ }
+ else if (fileName.left(10)=="exception_")
+ {
+ fileName=fileName.right(fileName.length()-10);
+ }
+
int i;
if ((i=fileName.findRev('.'))!=-1)
{
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index f9a8ff9..1c2e940 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1411,6 +1411,7 @@ void MemberDef::generateXML(QTextStream &t,Definition *def)
{
case Define: t << "definedef"; xmlType=define_t; break;
case EnumValue: // fall through
+ case Property: // fall through
case Variable: t << "variabledef"; xmlType=variable_t; break;
case Typedef: t << "typedef"; xmlType=typedef_t; break;
case Enumeration: t << "enumdef"; xmlType=enum_t; break;
@@ -1423,7 +1424,8 @@ void MemberDef::generateXML(QTextStream &t,Definition *def)
}
t << " id=\"";
t << def->getOutputFileBase()
- << ":"
+ << "__" // can we change this to a non ID char?
+ // : do not seem allowed for some parsers!
<< anchor();
t << "\"";
if (xmlType==function_t && virtualness()!=Normal)
@@ -1444,15 +1446,13 @@ void MemberDef::generateXML(QTextStream &t,Definition *def)
(xmlType!=function_t || !type.isEmpty()) // Type is optional here.
)
{
+ QCString typeStr = replaceAnonymousScopes(type);
+ if (xmlType==typedef_t && typeStr.left(8)=="typedef ")
+ typeStr=typeStr.right(typeStr.length()-8);
+ if (xmlType==function_t && typeStr.left(8)=="virtual ")
+ typeStr=typeStr.right(typeStr.length()-8);
t << " <type>";
- if (xmlType==typedef_t && type.left(8)=="typedef ")
- linkifyText(TextGeneratorXMLImpl(t),scopeName,name(),
- type.right(type.length()-8)); // strip "typedef "
- else if (xmlType==function_t && type.left(8)=="virtual ")
- linkifyText(TextGeneratorXMLImpl(t),scopeName,name(),
- type.right(type.length()-8)); // strip "virtual "
- else
- linkifyText(TextGeneratorXMLImpl(t),scopeName,name(),type);
+ linkifyText(TextGeneratorXMLImpl(t),scopeName,name(),typeStr);
t << "</type>" << endl;
}
@@ -1560,6 +1560,7 @@ void MemberDef::generateXML(QTextStream &t,Definition *def)
{
case Define: t << "definedef"; break;
case EnumValue: // fall through
+ case Property: // fall through
case Variable: t << "variabledef"; break;
case Typedef: t << "typedef"; break;
case Enumeration: t << "enumdef"; break;
diff --git a/src/memberdef.h b/src/memberdef.h
index a0c655e..bee7ca4 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -58,7 +58,8 @@ class MemberDef : public Definition
Signal,
Slot,
Friend,
- DCOP
+ DCOP,
+ Property
};
enum
@@ -111,6 +112,7 @@ class MemberDef : public Definition
bool isDefine() const { return mtype==Define; }
bool isFriend() const { return mtype==Friend; }
bool isDCOP() const { return mtype==DCOP; }
+ bool isProperty() const { return mtype==Property; }
bool isRelated() const { return related; }
bool isStatic() const { return stat; }
bool isInline() const { return (memSpec&Entry::Inline)!=0; }
@@ -132,8 +134,8 @@ class MemberDef : public Definition
void setMemberSpecifiers(int s) { memSpec=s; }
void mergeMemberSpecifiers(int s) { memSpec|=s; }
void setInitializer(const char *i) { init=i;
- init=init.stripWhiteSpace();
- initLines=init.contains('\n');
+ init=init.stripWhiteSpace();
+ initLines=init.contains('\n');
}
void setBitfields(const char *s) { bitfields = s; }
void setMaxInitLines(int lines) { if (lines!=-1) maxInitLines=lines; }
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 60a4e90..3e7b7a0 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -70,7 +70,9 @@ void MemberList::countDecMembers(bool inGroup,bool countSubGroups,bool sectionPe
{
switch(md->memberType())
{
- case MemberDef::Variable: varCnt++,m_count++; break;
+ case MemberDef::Variable: // fall through
+ case MemberDef::Property: varCnt++,m_count++;
+ break;
case MemberDef::Function: // fall through
case MemberDef::Signal: // fall through
case MemberDef::DCOP: // fall through
@@ -346,13 +348,13 @@ void MemberList::writePlainDeclarations(OutputList &ol,
typeDecl.enable(OutputGenerator::Man);
enumMemCount++;
}
- }
- if (fmdl->count()>MAX_ENUM_VALUES_FOR_ONE_LINE)
- {
- typeDecl.pushGeneratorState();
- typeDecl.disableAllBut(OutputGenerator::Html);
- typeDecl.lineBreak();
- typeDecl.popGeneratorState();
+ if (fmdl->count()>MAX_ENUM_VALUES_FOR_ONE_LINE)
+ {
+ typeDecl.pushGeneratorState();
+ typeDecl.disableAllBut(OutputGenerator::Html);
+ typeDecl.lineBreak();
+ typeDecl.popGeneratorState();
+ }
}
typeDecl.docify(" }");
md->setEnumDecl(typeDecl);
@@ -496,7 +498,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this);
for ( ; (md=mli.current()) ; ++mli )
{
- if (md->isVariable() && inGroup==md->visibleMemberGroup(sectionPerType))
+ if ((md->isVariable() || md->isProperty()) &&
+ inGroup==md->visibleMemberGroup(sectionPerType))
{
md->writeDeclaration(ol,cd,nd,fd,gd,inGroup);
}
diff --git a/src/message.cpp b/src/message.cpp
index 9554c02..112d5af 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -28,6 +28,8 @@ static int warnFormatOrder; // 1 = $file,$line,$text
// 5 = $text,$file,$line
// 6 = $line,$file,$text
+static FILE *warnFile = stderr;
+
void initWarningFormat()
{
int filePos = Config::warnFormat.find("$file");
@@ -78,6 +80,11 @@ void initWarningFormat()
// replace(QRegExp("\\$text"),"%s").
// replace(QRegExp("\\$line"),"%d")+
// '\n';
+
+ if (!Config::warnLogFile.isEmpty())
+ {
+ warnFile = fopen(Config::warnLogFile,"w");
+ }
}
@@ -104,12 +111,12 @@ void warn(const char *file,int line,const char *fmt, ...)
va_end(args);
switch(warnFormatOrder)
{
- case 1: fprintf(stderr,outputFormat,file,line,text); break;
- case 2: fprintf(stderr,outputFormat,text,line,file); break;
- case 3: fprintf(stderr,outputFormat,line,text,file); break;
- case 4: fprintf(stderr,outputFormat,file,text,line); break;
- case 5: fprintf(stderr,outputFormat,text,file,line); break;
- case 6: fprintf(stderr,outputFormat,line,file,text); break;
+ case 1: fprintf(warnFile,outputFormat,file,line,text); break;
+ case 2: fprintf(warnFile,outputFormat,text,line,file); break;
+ case 3: fprintf(warnFile,outputFormat,line,text,file); break;
+ case 4: fprintf(warnFile,outputFormat,file,text,line); break;
+ case 5: fprintf(warnFile,outputFormat,text,file,line); break;
+ case 6: fprintf(warnFile,outputFormat,line,file,text); break;
default:
printf("Error: warning format has not been initialized!\n");
}
@@ -122,7 +129,7 @@ void warn_cont(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, fmt, args);
+ vfprintf(warnFile, fmt, args);
va_end(args);
}
}
@@ -139,12 +146,12 @@ void warn_undoc(const char *file,int line,const char *fmt, ...)
va_end(args);
switch(warnFormatOrder)
{
- case 1: fprintf(stderr,outputFormat,file,line,text); break;
- case 2: fprintf(stderr,outputFormat,text,line,file); break;
- case 3: fprintf(stderr,outputFormat,line,text,file); break;
- case 4: fprintf(stderr,outputFormat,file,text,line); break;
- case 5: fprintf(stderr,outputFormat,text,file,line); break;
- case 6: fprintf(stderr,outputFormat,line,file,text); break;
+ case 1: fprintf(warnFile,outputFormat,file,line,text); break;
+ case 2: fprintf(warnFile,outputFormat,text,line,file); break;
+ case 3: fprintf(warnFile,outputFormat,line,text,file); break;
+ case 4: fprintf(warnFile,outputFormat,file,text,line); break;
+ case 5: fprintf(warnFile,outputFormat,text,file,line); break;
+ case 6: fprintf(warnFile,outputFormat,line,file,text); break;
default:
printf("Error: warning format has not been initialized!\n");
}
@@ -155,6 +162,6 @@ void err(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, fmt, args);
+ vfprintf(warnFile, fmt, args);
va_end(args);
}
diff --git a/src/message.h b/src/message.h
index 87022f6..df2bc94 100644
--- a/src/message.h
+++ b/src/message.h
@@ -18,6 +18,8 @@
#ifndef MESSAGE_H
#define MESSAGE_H
+#include <stdio.h>
+
extern void msg(const char *fmt, ...);
extern void warn(const char *file,int line,const char *fmt, ...);
extern void warn_cont(const char *fmt, ...);
diff --git a/src/scanner.l b/src/scanner.l
index c63de52..a12189b 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -519,6 +519,16 @@ TITLE [tT][iI][tT][lL][eE]
unput(*yytext);
BEGIN( FindMembers );
}
+<FindMembers>{B}*("properties"|"__property"){BN}*":"{BN}* { // IDL or Borland C++ builder property
+ current->mtype = mtype = Property;
+ current->protection = protection = Public ;
+ current->type.resize(0);
+ current->name.resize(0);
+ current->args.resize(0);
+ current->argList->clear();
+ lineCount() ;
+ }
+
<FindMembers>{B}*"k_dcop"{BN}*":"{BN}* { current->mtype = mtype = DCOP;
current->protection = protection = Public ;
current->type.resize(0);
@@ -566,9 +576,7 @@ TITLE [tT][iI][tT][lL][eE]
current->argList->clear();
lineCount();
}
-<FindMembers>{B}*"properties"{B}":" { /* M$-IDL only: ignored */ }
-<FindMembers>{B}*"methods"{B}":" { /* M$-IDL only: ignored */ }
-<FindMembers>{B}*"public"{BN}*":"{BN}* {
+<FindMembers>{B}*("public"|"methods"|"__published"){BN}*":"{BN}* {
current->protection = protection = Public ;
current->mtype = mtype = Method;
current->type.resize(0);
diff --git a/src/translator.h b/src/translator.h
index 5808ae1..4849c95 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -566,7 +566,9 @@ class Translator
virtual QCString trGeneratedBy()
{ return "Generated by"; }
- // new since 0.49-990307
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990307
+//////////////////////////////////////////////////////////////////////////
/*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList()
@@ -607,7 +609,6 @@ class Translator
bool isTemplate)
{
QCString result=(QCString)clName+" ";
- if (isTemplate) result+=" Template";
switch(compType)
{
case ClassDef::Class: result+=" Class"; break;
@@ -616,6 +617,7 @@ class Translator
case ClassDef::Interface: result+=" Interface"; break;
case ClassDef::Exception: result+=" Exception"; break;
}
+ if (isTemplate) result+=" Template";
result+=" Reference";
return result;
}
@@ -1086,6 +1088,20 @@ class Translator
return "DCOP Methods";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for IDL properties */
+ virtual QCString trProperties()
+ {
+ return "Properties";
+ }
+ /*! Used as a section header for IDL property documentation */
+ virtual QCString trPropertyDocumentation()
+ {
+ return "Property Documentation";
+ }
};
#endif
diff --git a/src/translator_cn.h b/src/translator_cn.h
new file mode 100644
index 0000000..9343695
--- /dev/null
+++ b/src/translator_cn.h
@@ -0,0 +1,707 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 1997-2000 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 TRANSLATOR_CN_H
+#define TRANSLATOR_CN_H
+
+#include "translator.h"
+
+/*!
+ If you want insert a space whenever Chinese meets English charactors, set
+ CN_SPC to " ", else null.
+*/
+#define CN_SPC
+
+class TranslatorChinese : public Translator
+{
+ public:
+ QCString idLanguage()
+ { return "chinese"; }
+ QCString idLanguageCharset()
+ { return "gb2312"; }
+ QCString latexBabelPackage()
+ { return "chinese"; }
+ QCString trRelatedFunctions()
+ { return "Ïà¹Øº¯Êý"; }
+ QCString trRelatedSubscript()
+ { return "£¨×¢Ò⣺ÕâЩ²»ÊdzÉÔ±º¯Êý£©"; }
+ QCString trDetailedDescription()
+ { return "ÏêϤÃèÊö"; }
+ QCString trMemberTypedefDocumentation()
+ { return "³ÉÔ±ÀàÐͶ¨ÒåÎĵµ"; }
+ QCString trMemberEnumerationDocumentation()
+ { return "³ÉԱö¾ÙÀàÐÍÎĵµ"; }
+ QCString trEnumerationValueDocumentation()
+ { return "³ÉԱö¾ÙÖµÎĵµ"; }
+ QCString trMemberFunctionDocumentation()
+ { return "³ÉÔ±º¯ÊýÎĵµ"; }
+ QCString trMemberDataDocumentation()
+ { return "³ÉÔ±Êý¾ÝÎĵµ"; }
+ QCString trMore()
+ { return "¸ü¶à..."; }
+ QCString trListOfAllMembers()
+ { return "ËùÓгÉÔ±µÄÁÐ±í¡£"; }
+ QCString trMemberList()
+ { return "³ÉÔ±Áбí"; }
+ QCString trThisIsTheListOfAllMembers()
+ { return "³ÉÔ±µÄÍêÕûÁÐ±í£¬ÕâЩ³ÉÔ±ÊôÓÚ"CN_SPC; }
+ QCString trIncludingInheritedMembers()
+ { return "£¬°üÀ¨ËùÓм̳жøÀ´µÄ³ÉÔ±"; }
+ QCString trGeneratedAutomatically(const char *s)
+ { QCString result;
+ if (s) result=(QCString)"Ϊ"CN_SPC+s+"£¬";
+ result+="ÓÉ"CN_SPC"Doyxgen"CN_SPC"ͨ¹ý·ÖÎöÔ´´úÂë×Ô¶¯Éú³É¡£";
+ return result;
+ }
+ QCString trEnumName()
+ { return "ö¾ÙÃû³Æ"; }
+ QCString trEnumValue()
+ { return "ö¾ÙÖµ"; }
+ QCString trDefinedIn()
+ { return "¶¨ÒåÓÚ"CN_SPC; }
+ QCString trVerbatimText(const char *f)
+ { return (QCString)"ÕâÊÇÍ·Îļþ"CN_SPC+f+CN_SPC"µÄÔ´´úÂë¡£"; }
+ QCString trModules()
+ { return "Ä£¿é"; }
+ QCString trClassHierarchy()
+ { return "Àà¼Ì³Ð¹Øϵ"; }
+ QCString trCompoundList()
+ { return "×éºÏÀàÐÍÁбí"; }
+ QCString trFileList()
+ { return "ÎļþÁбí"; }
+ QCString trHeaderFiles()
+ { return "Í·Îļþ"; }
+ QCString trCompoundMembers()
+ { return "×éºÏÀàÐͳÉÔ±"; }
+ QCString trFileMembers()
+ { return "Îļþ³ÉÔ±"; }
+ QCString trRelatedPages()
+ { return "Ïà¹ØÒ³Ãæ"; }
+ QCString trExamples()
+ { return "ʾÀý"; }
+ QCString trSearch()
+ { return "ËÑË÷"; }
+ QCString trClassHierarchyDescription()
+ { return "´ËÁбí»ù±¾°´×Öµä˳ÐòÅÅÐò£º"; }
+ QCString trFileListDescription(bool extractAll)
+ {
+ QCString result="ÕâÀïÁгöËùÓÐ";
+ if (!extractAll) result+="Îĵµ»¯µÄ";
+ result+="Îļþ£¬¸½´ø¼òҪ˵Ã÷£º";
+ return result;
+ }
+ QCString trCompoundListDescription()
+ { return "ÕâÀïÁгöËùÓÐÀà¡¢½á¹¹¡¢ÁªºÏÒÔ¼°½Ó¿Ú¶¨Ò壬¸½´ø¼òҪ˵Ã÷£º";
+ }
+ QCString trCompoundMembersDescription(bool extractAll)
+ {
+ QCString result="ÕâÀïÁгöËùÓÐ";
+ if (!extractAll) result+="Îĵµ»¯µÄ";
+ result+="Àà³ÉÔ±£¬¸½´ø";
+ if (extractAll) result+="ËùÔÚÀàµÄÎĵµµÄÁ´½Ó£º";
+ else result+="ËùÔÚÀàµÄÁ´½Ó£º";
+ return result;
+ }
+ QCString trFileMembersDescription(bool extractAll)
+ {
+ QCString result="ÕâÀïÁгöËùÓÐ";
+ if (!extractAll) result+="Îĵµ»¯µÄ";
+ result+="Îļþ³ÉÔ±£¬¸½´ø";
+ if (extractAll) result+="ËùÔÚÎļþµÄÎĵµµÄÁ´½Ó£º";
+ else result+="ËùÔÚÎļþµÄÁ´½Ó£º";
+ return result;
+ }
+ QCString trHeaderFilesDescription()
+ { return "ÕâÀïÁгö×é³ÉAPIµÄÍ·Îļþ£º"; }
+ QCString trExamplesDescription()
+ { return "ÕâÀïÁгöËùÓÐʾÀý£º"; }
+ QCString trRelatedPagesDescription()
+ { return "ÕâÀïÁгöËùÓÐÏà¹ØµÄÒ³Ã棺"; }
+ QCString trModulesDescription()
+ { return "ÕâÀïÁгöËùÓÐÄ£¿é"; }
+ QCString trNoDescriptionAvailable()
+ { return "ÎÞ¿ÉÓÃÎĵµ"; }
+
+ QCString trDocumentation()
+ { return "Îĵµ"; }
+ QCString trModuleIndex()
+ { return "Ä£¿éË÷Òý"; }
+ QCString trHierarchicalIndex()
+ { return "¼Ì³Ð¹ØϵË÷Òý"; }
+ QCString trCompoundIndex()
+ { return "×éºÏÀàÐÍË÷Òý"; }
+ QCString trFileIndex()
+ { return "ÎļþË÷Òý"; }
+ QCString trModuleDocumentation()
+ { return "Ä£¿éÎĵµ"; }
+ QCString trClassDocumentation()
+ { return "ÀàÎĵµ"; }
+ QCString trFileDocumentation()
+ { return "ÎļþÎĵµ"; }
+ QCString trExampleDocumentation()
+ { return "ʾÀýÎĵµ"; }
+ QCString trPageDocumentation()
+ { return "Ò³ÃæÎĵµ"; }
+ QCString trReferenceManual()
+ { return "²Î¿¼ÊÖ²á"; }
+
+ QCString trDefines()
+ { return "ºê¶¨Òå"; }
+ QCString trFuncProtos()
+ { return "º¯ÊýÔ­ÐÍ"; }
+ QCString trTypedefs()
+ { return "ÀàÐͶ¨Òå"; }
+ QCString trEnumerations()
+ { return "ö¾Ù"; }
+ QCString trFunctions()
+ { return "º¯Êý"; }
+ QCString trVariables()
+ { return "±äÁ¿"; }
+ QCString trEnumerationValues()
+ { return "ö¾ÙÖµ"; }
+ QCString trAuthor()
+ { return "×÷Õß"; }
+ QCString trDefineDocumentation()
+ { return "ºê¶¨ÒåÎĵµ"; }
+ QCString trFunctionPrototypeDocumentation()
+ { return "º¯ÊýÔ­ÐÍÎĵµ"; }
+ QCString trTypedefDocumentation()
+ { return "ÀàÐͶ¨ÒåÎĵµ"; }
+ QCString trEnumerationTypeDocumentation()
+ { return "ö¾ÙÀàÐÍÎĵµ"; }
+ QCString trFunctionDocumentation()
+ { return "º¯ÊýÎĵµ"; }
+ QCString trVariableDocumentation()
+ { return "±äÁ¿Îĵµ"; }
+ QCString trCompounds()
+ { return "×éºÏÀàÐÍ"; }
+ QCString trFiles()
+ { return "Îļþ"; }
+ QCString trGeneratedAt(const char *date,const char *projName)
+ {
+ QCString result=(QCString)"Generated at "+date;
+ if (projName) result+=(QCString)" for "+projName;
+ result+=(QCString)" by";
+ return result;
+ }
+ QCString trWrittenBy()
+ {
+ return "written by";
+ }
+ QCString trClassDiagram(const char *clName)
+ {
+ return (QCString)"¼Ì³Ðͼ£¬Àà"CN_SPC+clName;
+ }
+ QCString trForInternalUseOnly()
+ { return "½öÏÞÄÚ²¿Ê¹Óá£"; }
+ QCString trReimplementedForInternalReasons()
+ { return "ÓÉÓÚÄÚ²¿Ô­Òò±»ÖØÔØ£»µ«²»Ó°ÏìAPI";
+ }
+ QCString trWarning()
+ { return "¾¯¸æ"; }
+ QCString trBugsAndLimitations()
+ { return "BUG"CN_SPC"Óë¾ÖÏÞ"; }
+ QCString trVersion()
+ { return "°æ±¾"; }
+ QCString trDate()
+ { return "ÈÕÆÚ"; }
+ QCString trAuthors()
+ { return "×÷Õß"; }
+ QCString trReturns()
+ { return "·µ»Ø"; }
+ QCString trSeeAlso()
+ { return "²Î¼û"; }
+ QCString trParameters()
+ { return "²ÎÊý"; }
+ QCString trExceptions()
+ { return "Òì³£"; }
+ QCString trGeneratedBy()
+ { return "ÖÆ×÷Õß"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990307
+//////////////////////////////////////////////////////////////////////////
+
+ QCString trNamespaceList()
+ { return "ÃüÃû¿Õ¼äÁбí"; }
+ QCString trNamespaceListDescription(bool extractAll)
+ {
+ QCString result="ÕâÀïÁгöËùÓÐ";
+ if (!extractAll) result+="Îĵµ»¯µÄ";
+ result+="ÃüÃû¿Õ¼ä¶¨Ò壬¸½´ø¼òҪ˵Ã÷£º";
+ return result;
+ }
+ QCString trFriends()
+ { return "ÓÑÔª"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990405
+//////////////////////////////////////////////////////////////////////////
+
+ QCString trRelatedFunctionDocumentation()
+ { return "ÓÑÔª¼°Ïà¹Øº¯ÊýÎĵµ"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990425
+//////////////////////////////////////////////////////////////////////////
+
+ QCString trCompoundReference(const char *clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ // used as the title of the HTML page of a class/struct/union
+ {
+ QCString result=(QCString)clName;
+ if (isTemplate) result+=CN_SPC"Ä£°å";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="Àà"; break;
+ case ClassDef::Struct: result+="½á¹¹"; break;
+ case ClassDef::Union: result+="ÁªºÏ"; break;
+ case ClassDef::Interface: result+="½Ó¿Ú"; break;
+ case ClassDef::Exception: result+="Òì³£"; break;
+ }
+ result+="²Î¿¼";
+ return result;
+ }
+ QCString trFileReference(const char *fileName)
+ // used as the title of the HTML page of a file
+ {
+ QCString result=fileName;
+ result+=CN_SPC"Îļþ²Î¿¼";
+ return result;
+ }
+ QCString trNamespaceReference(const char *namespaceName)
+ // used as the title of the HTML page of a namespace
+ {
+ QCString result=namespaceName;
+ result+=CN_SPC"ÃüÃû¿Õ¼ä²Î¿¼";
+ return result;
+ }
+
+ // these are for the member sections of a class, struct or union
+ QCString trPublicMembers()
+ { return "¹«ÓгÉÔ±"; }
+ QCString trPublicSlots()
+ { return "¹«ÓвÛ"; }
+ QCString trSignals()
+ { return "ÐźÅ"; }
+ QCString trStaticPublicMembers()
+ { return "¾²Ì¬¹«ÓгÉÔ±"; }
+ QCString trProtectedMembers()
+ { return "±£»¤³ÉÔ±"; }
+ QCString trProtectedSlots()
+ { return "±£»¤²Û"; }
+ QCString trStaticProtectedMembers()
+ { return "¾²Ì¬±£»¤³ÉÔ±"; }
+ QCString trPrivateMembers()
+ { return "˽ÓгÉÔ±"; }
+ QCString trPrivateSlots()
+ { return "˽ÓвÛ"; }
+ QCString trStaticPrivateMembers()
+ { return "¾²Ì¬Ë½ÓгÉÔ±"; }
+ // end of member sections
+
+ QCString trWriteList(int numEntries)
+ {
+ // this function is used to produce a comma-separated list of items.
+ // use generateMarker(i) to indicate where item i should be put.
+ QCString result;
+ int i;
+ // the inherits list contain `numEntries' classes
+ for (i=0;i<numEntries;i++)
+ {
+ // use generateMarker to generate placeholders for the class links!
+ result+=generateMarker(i); // generate marker for entry i in the list
+ // (order is left to right)
+
+ if (i!=numEntries-1) // not the last entry, so we need a separator
+ {
+ if (i<numEntries-2) // not the fore last entry
+ result+="¡¢";
+ else // the fore last entry
+ result+=CN_SPC"¼°"CN_SPC;
+ }
+ }
+ return result;
+ }
+
+ QCString trInheritsList(int numEntries)
+ // used in class documentation to produce a list of base classes,
+ // if class diagrams are disabled.
+ {
+ return "¼Ì³Ð×Ô"CN_SPC+trWriteList(numEntries)+"¡£";
+ }
+ QCString trInheritedByList(int numEntries)
+ // used in class documentation to produce a list of super classes,
+ // if class diagrams are disabled.
+ {
+ return "±»"CN_SPC+trWriteList(numEntries)+CN_SPC"¼Ì³Ð.";
+ }
+ QCString trReimplementedFromList(int numEntries)
+ // used in member documentation blocks to produce a list of
+ // members that are hidden by this one.
+ {
+ return "ÖØÔØ"CN_SPC+trWriteList(numEntries)+"¡£";
+ }
+ QCString trReimplementedInList(int numEntries)
+ {
+ // used in member documentation blocks to produce a list of
+ // all member that overwrite the implementation of this member.
+ return "±»"CN_SPC+trWriteList(numEntries)+CN_SPC"ÖØÔØ¡£";
+ }
+
+ QCString trNamespaceMembers()
+ // This is put above each page as a link to all members of namespaces.
+ { return "ÃüÃû¿Õ¼ä³ÉÔ±"; }
+ QCString trNamespaceMemberDescription(bool extractAll)
+ // This is an introduction to the page with all namespace members
+ {
+ QCString result="ÕâÀïÁгöÁËËùÓÐ";
+ if (!extractAll) result+="Îĵµ»¯µÄ";
+ result+="ÃüÃû¿Õ¼ä³ÉÔ±£¬¸½´ø";
+ if (extractAll)
+ result+="ËùÔÚÀàµÄÎĵµµÄÁ´½Ó£º";
+ else
+ result+="ËùÔÚÀàµÄÁ´½Ó£º";
+ return result;
+ }
+ QCString trNamespaceIndex()
+ // This is used in LaTeX as the title of the chapter with the
+ // index of all namespaces.
+ { return "ÃüÃû¿Õ¼äË÷Òý"; }
+ QCString trNamespaceDocumentation()
+ // This is used in LaTeX as the title of the chapter containing
+ // the documentation of all namespaces.
+ { return "ÃüÃû¿Õ¼äÎĵµ"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990728
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is put at the bottom of a class documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
+ bool)
+ { // here s is one of " Class", " Struct" or " Union"
+ // single is true implies a single file
+ QCString result=(QCString)"¸Ã";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="Àà"; break;
+ case ClassDef::Struct: result+="½á¹¹"; break;
+ case ClassDef::Union: result+="ÁªºÏ"; break;
+ case ClassDef::Interface: result+="½Ó¿Ú"; break;
+ case ClassDef::Exception: result+="Òì³£"; break;
+ }
+ result+="µÄÎĵµÓÉÒÔÏÂÎļþÉú³É£º";
+ return result;
+ }
+
+ /*! This is in the (quick) index as a link to the alphabetical compound
+ * list.
+ */
+ QCString trAlphabeticalList()
+ { return "°´×Öµä˳ÐòÅÅÐòµÄÁбí"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990901
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the heading text for the retval command. */
+ QCString trReturnValues()
+ { return "·µ»ØÖµ"; }
+
+ /*! This is in the (quick) index as a link to the main page (index.html)
+ */
+ QCString trMainPage()
+ { return "Ê×Ò³"; }
+
+ /*! This is used in references to page that are put in the LaTeX
+ * documentation. It should be an abbreviation of the word page.
+ */
+ QCString trPageAbbreviation()
+ { return "p."; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991106
+//////////////////////////////////////////////////////////////////////////
+
+ QCString trSources()
+ {
+ return "Ô´´úÂë";
+ }
+ QCString trDefinedAtLineInSourceFile()
+ {
+ return "ÔÚÎļþ"CN_SPC"@1"CN_SPC"µÚ"CN_SPC"@0"CN_SPC"Ðж¨Òå¡£";
+ }
+ QCString trDefinedInSourceFile()
+ {
+ return "ÔÚÎļþ"CN_SPC"@0"CN_SPC"Öж¨Òå¡£";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991205
+//////////////////////////////////////////////////////////////////////////
+
+ QCString trDeprecated()
+ {
+ return "Deprecated";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.0.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! this text is put before a collaboration diagram */
+ QCString trCollaborationDiagram(const char *clName)
+ {
+ return (QCString)clName+CN_SPC"ºÏ×÷ͼ£º";
+ }
+ /*! this text is put before an include dependency graph */
+ QCString trInclDepGraph(const char *fName)
+ {
+ return (QCString)fName+CN_SPC"°üº¬/ÒÀÀµ¹Øϵͼ£º";
+ }
+ /*! header that is put before the list of constructor/destructors. */
+ QCString trConstructorDocumentation()
+ {
+ return "¹¹Ôì¼°Îö¹¹º¯ÊýÎĵµ";
+ }
+ /*! Used in the file documentation to point to the corresponding sources. */
+ QCString trGotoSourceCode()
+ {
+ return "ä¯ÀÀ¸ÃÎļþµÄÔ´´úÂë¡£";
+ }
+ /*! Used in the file sources to point to the corresponding documentation. */
+ QCString trGotoDocumentation()
+ {
+ return "ä¯ÀÀ¸ÃÎļþµÄÎĵµ¡£";
+ }
+ /*! Text for the \pre command */
+ QCString trPrecondition()
+ {
+ return "Ç°ÌáÌõ¼þ";
+ }
+ /*! Text for the \post command */
+ QCString trPostcondition()
+ {
+ return "Postcondition";
+ }
+ /*! Text for the \invariant command */
+ QCString trInvariant()
+ {
+ return "Invariant";
+ }
+ /*! Text shown before a multi-line variable/enum initialization */
+ QCString trInitialValue()
+ {
+ return "³õʼ»¯ÐòÁУº";
+ }
+ /*! Text used the source code in the file index */
+ QCString trCode()
+ {
+ return "´úÂë";
+ }
+ QCString trGraphicalHierarchy()
+ {
+ return "Àà¼Ì³Ð¹Øϵͼ";
+ }
+ QCString trGotoGraphicalHierarchy()
+ {
+ return "ä¯ÀÀÀà¼Ì³Ð¹Øϵͼ";
+ }
+ QCString trGotoTextualHierarchy()
+ {
+ return "ä¯ÀÀÀà¼Ì³Ð¹Øϵ±í";
+ }
+ QCString trPageIndex()
+ {
+ return "Ò³ÃæË÷Òý";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.0
+//////////////////////////////////////////////////////////////////////////
+
+ QCString trNote()
+ {
+ return "×¢½â";
+ }
+ QCString trPublicTypes()
+ {
+ return "¹«ÓÐÀàÐÍ";
+ }
+ QCString trPublicAttribs()
+ {
+ return "¹«ÓÐÊôÐÔ";
+ }
+ QCString trStaticPublicAttribs()
+ {
+ return "¾²Ì¬¹«ÓÐÊôÐÔ";
+ }
+ QCString trProtectedTypes()
+ {
+ return "±£»¤ÀàÐÍ";
+ }
+ QCString trProtectedAttribs()
+ {
+ return "±£»¤ÊôÐÔ";
+ }
+ QCString trStaticProtectedAttribs()
+ {
+ return "¾²Ì¬±£»¤ÊôÐÔ";
+ }
+ QCString trPrivateTypes()
+ {
+ return "˽ÓÐÀàÐÍ";
+ }
+ QCString trPrivateAttribs()
+ {
+ return "˽ÓÐÊôÐÔ";
+ }
+ QCString trStaticPrivateAttribs()
+ {
+ return "¾²Ì¬Ë½ÓÐÊôÐÔ";
+ }
+
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a todo item */
+ QCString trTodo()
+ {
+ return "TODO";
+ }
+ /*! Used as the header of the todo list */
+ QCString trTodoList()
+ {
+ return "TODO"CN_SPC"Áбí";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.4
+//////////////////////////////////////////////////////////////////////////
+
+ QCString trReferencedBy()
+ {
+ return "²Î¿¼×Ô";
+ }
+ QCString trRemarks()
+ {
+ return "ÆÀÂÛ";
+ }
+ QCString trAttention()
+ {
+ return "×¢Òâ";
+ }
+ QCString trInclByDepGraph()
+ {
+ return "´Ëͼչʾֱ½Ó»ò¼ä½Ó°üº¬¸ÃÎļþµÄÎļþ£º";
+ }
+ QCString trSince()
+ {
+ return "×Ô´Ó";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! title of the graph legend page */
+ QCString trLegendTitle()
+ {
+ return "ͼÀý";
+ }
+ /*! page explaining how the dot graph's should be interpreted */
+ QCString trLegendDocs()
+ {
+ return
+ "±¾Ò³ÏòÄúչʾÈçºÎÀí½âÓÉ"CN_SPC"Doxygen"CN_SPC"Éú³ÉµÄͼÐΡ£<p>\n"
+ "Ç뿼ÂÇÈçÏÂʾÀý£º\n"
+ "\\code\n"
+ "/*! ÓÉÓÚ½ØÈ¡¶øʹ¸ÃÀ಻¿É¼û */\n"
+ "class Invisible { };\n\n"
+ "/*! ±»½ØÈ¡µÄÀ࣬¼Ì³Ð¹Øϵ±»Òþ²ØÆðÀ´ÁË */\n"
+ "class Truncated : public Invisible { };\n\n"
+ "/* ûÓб»"CN_SPC"doxygen"CN_SPC"µÄ×¢ÊÍÎĵµ»¯µÄÀà */\n"
+ "class Undocumented { };\n\n"
+ "/*! ±»¹«Óм̳еÄÀà */\n"
+ "class PublicBase : public Truncated { };\n\n"
+ "/*! ±»±£»¤¼Ì³ÐµÄÀà */\n"
+ "class ProtectedBase { };\n\n"
+ "/*! ±»Ë½Óм̳еÄÀà */\n"
+ "class PrivateBase { };\n\n"
+ "/*! ±»Ê¹ÓõÄÀà */\n"
+ "class Used { };\n\n"
+ "/*! ¼Ì³ÐÁËÈô¸ÉÆäËüÀàµÄÀà */\n"
+ "class Inherited : public PublicBase,\n"
+ " protected ProtectedBase,\n"
+ " private PrivateBase,\n"
+ " public Undocumented\n"
+ "{\n"
+ " private:\n"
+ " Used *m_usedClass;\n"
+ "};\n"
+ "\\endcode\n"
+ "Èç¹ûÔÚÅäÖÃÎļþÖÐÖ¸¶¨ÁË"CN_SPC"MAX_DOT_GRAPH_HEIGHT"CN_SPC"µÄֵΪ200£¬"
+ "ÔòDoxygen½«Éú³ÉÈçϵÄͼÐΣº"
+ "<p><center><img src=\"graph_legend.gif\"></center>\n"
+ "<p>\n"
+ "ÒÔÉÏͼÐÎÖеľØÐÎÓÐÈçϵĺ¬Ò壺\n"
+ "<ul>\n"
+ "<li>±»ºÚÉ«Ìî³äµÄ¾ØÐδú±íµ±Ç°µÄÀà»ò½á¹¹¡£\n"
+ "<li>ºÚÉ«±ß¿òµÄ¾ØÐδú±í<i>Îĵµ»¯</i>µÄÀà»ò½á¹¹¡£\n"
+ "<li>»ÒÉ«±ß¿òµÄ¾ØÐδú±íûÓÐ<i>Îĵµ»¯</i>µÄÀà»ò½á¹¹¡£\n"
+ "<li>ºìÉ«±ß¿òµÄ¾ØÐδú±í¼Ì³Ð/°üº¬¹ØϵûÓб»ÍêÕûÏÔʾ³öµÄÀà»ò½á¹¹¡£Èç¹ûÒ»·ùͼÏñµÄ³ß"
+ "´ç´óÓÚÖ¸¶¨³ß´ç£¬Ëü½«±»½ØÈ¡¡£"
+ "</ul>\n"
+ "¸÷¸ö¼ýÍ·ÓÐÈçϵĺ¬Ò壺\n"
+ "<ul>\n"
+ "<li>ÉîÀ¶É«µÄ¼ýÍ·ÓÃÓÚÏÔʾÁ½¸öÀàÖ®¼äµÄ¹«Óм̳йØϵ¡£\n"
+ "<li>ÉîÂÌÉ«µÄ¼ýÍ·ÓÃÓÚÏÔʾ±£»¤¼Ì³Ð¹Øϵ¡£\n"
+ "<li>ÉîºìÉ«µÄ¼ýÍ·ÓÃÓÚÏÔʾ˽Óм̳йØϵ¡£\n"
+ "<li>×ÏÉ«µã×´ÏßÌõµÄ¼ýÍ·ÓÃÓÚÏÔʾÁ½¸öÀàÖ®¼ä°üº¬»òÕßʹÓõĹØϵ¡£Í¨¹ý¼ýÍ·ÅԱߵıäÁ¿¿ÉÒÔ"
+ "·ÃÎʵ½¼ýÍ·ËùÖ¸µÄÀà»ò½á¹¹¡£\n"
+ "</ul>\n";
+ }
+ /*! text for the link to the legend page */
+ QCString trLegend()
+ {
+ return "ͼÀý";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a test item */
+ virtual QCString trTest()
+ {
+ return "²âÊÔ";
+ }
+ /*! Used as the header of the test list */
+ virtual QCString trTestList()
+ {
+ return "²âÊÔÁбí";
+ }
+
+};
+
+#endif
diff --git a/src/translator_cz.h b/src/translator_cz.h
index c833a15..9b758c4 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -65,7 +65,12 @@
// 2000/09/06 (Petr Prikryl)
// - Reimplementation of the method trInheritsList() which takes
// into account quantity of base classes.
-//
+//
+// 2000/09/11 (Petr Prikryl)
+// - Update for "new since 1.2.1" version. The text of trDCOPMethods()
+// was translated rather blindly (not knowing what exactly
+// the DCOP means).
+//
// Notices:
// --------
// The conditional compilation ensures or the neutral functionality
@@ -75,7 +80,7 @@
// the conditional definition of the inline Decode() using the
// method ISO88592ToWin1250() -- for conversion of strings for the
// Windows version. The version which does not call the function is
-// probably slightly faster (if the inline is well optimized).
+// probably slightly faster.
class TranslatorCzech : public Translator
{
@@ -1094,6 +1099,15 @@ class TranslatorCzech : public Translator
return Decode("Seznam testù");
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for KDE-2 IDL methods */
+ virtual QCString trDCOPMethods()
+ {
+ return Decode("Metody DCOP");
+ }
};
#endif // TRANSLATOR_CZ_H
diff --git a/src/translator_nl.h b/src/translator_nl.h
index 14db842..80a5030 100644
--- a/src/translator_nl.h
+++ b/src/translator_nl.h
@@ -37,19 +37,10 @@ class TranslatorDutch : public Translator
{ return "Documentatie van type definitie members"; }
QCString trMemberEnumerationDocumentation()
{ return "Documentatie van enumeratie members"; }
- QCString trEnumerationValueDocumentation()
- { return "Documentatie van enumeratie waarden"; }
QCString trMemberFunctionDocumentation()
{ return "Documentatie van functie members"; }
QCString trMemberDataDocumentation()
{ return "Documentatie van data members"; }
- QCString trGeneratedFrom(const char *s,bool single)
- {
- QCString result=(QCString)"De documentatie voor deze"+s+
- " is gegenereerd op grond van de volgende file";
- if (single) result+=":"; else result+="s:";
- return result;
- }
QCString trMore()
{ return "Meer..."; }
QCString trListOfAllMembers()
@@ -185,6 +176,8 @@ class TranslatorDutch : public Translator
{ return "Documentatie van typedefs"; }
QCString trEnumerationTypeDocumentation()
{ return "Documentatie van enumeratie types"; }
+ QCString trEnumerationValueDocumentation()
+ { return "Documentatie van enumeratie waarden"; }
QCString trFunctionDocumentation()
{ return "Documentatie van functies"; }
QCString trVariableDocumentation()
@@ -712,6 +705,30 @@ class TranslatorDutch : public Translator
return "Test Lijst";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for KDE-2 IDL methods */
+ virtual QCString trDCOPMethods()
+ {
+ return "DCOP Methoden";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for IDL properties */
+ virtual QCString trProperties()
+ {
+ return "Properties";
+ }
+ /*! Used as a section header for IDL property documentation */
+ virtual QCString trPropertyDocumentation()
+ {
+ return "Property Documentatie";
+ }
};
#endif
diff --git a/src/util.cpp b/src/util.cpp
index e5c484e..02188c4 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -169,29 +169,66 @@ bool isId(char c)
// return result;
//}
-// remove all annoymous scopes from string s
-QCString removeAnnonymousScopes(const QCString &s)
+/*!
+ Removes all anoymous scopes from string s
+ Possible examples:
+\verbatim
+ "bla::@10::blep" => "bla::blep"
+ "bla::@10::@11::blep" => "bla::blep"
+ "@10::blep" => "blep"
+ " @10::blep" => "blep"
+ "@9::@10::blep" => "blep"
+ "bla::@1" => "bla"
+ "bla::@1::@2" => "bla"
+ "bla @1" => "bla"
+\endverbatim
+ */
+QCString removeAnonymousScopes(const QCString &s)
{
QCString result;
- int i,ni,l=s.length();
+ if (s.isEmpty()) return result;
+ static QRegExp re("[ :]*@[0-9]+[: ]*");
+ int i,l,sl=s.length();
int p=0;
- while ((i=s.find('@',p))!=-1)
- {
- if (i>p+2) result+=s.mid(p,i-p-2);
- if ((ni=s.find("::",i+1))!=-1)
- {
- p=ni+2;
- }
- else
- {
- p=l;
+ while ((i=re.match(s,p,&l))!=-1)
+ {
+ result+=s.mid(p,i-p);
+ int c=i;
+ bool b1=FALSE,b2=FALSE;
+ while (c<i+l && s.at(c)!='@') if (s.at(c++)==':') b1=TRUE;
+ c=i+l-1;
+ while (c>=i && s.at(c)!='@') if (s.at(c--)==':') b2=TRUE;
+ if (b1 && b2)
+ {
+ result+="::";
}
+ p=i+l;
+ }
+ result+=s.right(sl-p);
+ //printf("removeAnonymousScopes(`%s')=`%s'\n",s.data(),result.data());
+ return result;
+}
+
+// replace anonymous scopes with __anonymous__
+QCString replaceAnonymousScopes(const QCString &s)
+{
+ QCString result;
+ if (s.isEmpty()) return result;
+ static QRegExp re("@[0-9]+");
+ int i,l,sl=s.length();
+ int p=0;
+ while ((i=re.match(s,p,&l))!=-1)
+ {
+ result+=s.mid(p,i-p);
+ result+="__anonymous__";
+ p=i+l;
}
- if (p!=l) result+=s.mid(p,l-p);
- //printf("removeAnnonymousScopes(`%s')=`%s'\n",s.data(),result.data());
+ result+=s.right(sl-p);
+ //printf("replaceAnonymousScopes(`%s')=`%s'\n",s.data(),result.data());
return result;
}
+
// strip annonymous left hand side part of the scope
QCString stripAnnonymousNamespaceScope(const QCString &s)
{
@@ -1203,13 +1240,375 @@ void stripIrrelevantConstVolatile(QCString &s)
}
}
-//----------------------------------------------------------------------
-// Matches the arguments list srcAl with the argument list dstAl
-// Returns TRUE if the argument lists are equal. Two argument list are
-// considered equal if the number of arguments is equal and the types of all
-// arguments are equal. Furthermore the const and volatile specifiers
-// stored in the list should be equal.
+// a bit of debug support for matchArguments
+#define MATCH
+#define NOMATCH
+//#define MATCH printf("Match at line %d\n",__LINE__);
+//#define NOMATCH printf("Nomatch at line %d\n",__LINE__);
+
+static bool matchArgument(const Argument *srcA,const Argument *dstA,
+ const QCString &className,
+ const QCString &namespaceName,
+ NamespaceList *usingList)
+{
+ QCString srcAType=trimTemplateSpecifiers(className,srcA->type);
+ QCString dstAType=trimTemplateSpecifiers(className,dstA->type);
+ if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6);
+ if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6);
+ stripIrrelevantConstVolatile(srcAType);
+ stripIrrelevantConstVolatile(dstAType);
+
+ if (srcA->array!=dstA->array) // nomatch for char[] against char
+ {
+ NOMATCH
+ return FALSE;
+ }
+ if (srcAType!=dstAType) // check if the argument only differs on name
+ {
+ //printf("scope=`%s': `%s' <=> `%s'\n",className.data(),srcAType.data(),dstAType.data());
+
+ // remove a namespace scope that is only in one type
+ // (assuming a using statement was used)
+ trimNamespaceScope(srcAType,dstAType);
+
+ //QCString srcScope;
+ //QCString dstScope;
+
+ // strip redundant scope specifiers
+ if (!className.isEmpty())
+ {
+ srcAType=trimScope(className,srcAType);
+ dstAType=trimScope(className,dstAType);
+ //printf("trimScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
+ ClassDef *cd;
+ if (!namespaceName.isEmpty())
+ cd=getClass(namespaceName+"::"+className);
+ else
+ cd=getClass(className);
+ if (cd && cd->baseClasses()->count()>0)
+ {
+ trimBaseClassScope(cd->baseClasses(),srcAType);
+ trimBaseClassScope(cd->baseClasses(),dstAType);
+ }
+ //printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
+ }
+ if (!namespaceName.isEmpty())
+ {
+ srcAType=trimScope(namespaceName,srcAType);
+ dstAType=trimScope(namespaceName,dstAType);
+ }
+ if (usingList && usingList->count()>0)
+ {
+ NamespaceListIterator nli(*usingList);
+ NamespaceDef *nd;
+ for (;(nd=nli.current());++nli)
+ {
+ srcAType=trimScope(nd->name(),srcAType);
+ dstAType=trimScope(nd->name(),dstAType);
+ }
+ }
+
+ if (!srcA->name.isEmpty() && !dstA->type.isEmpty() &&
+ (srcAType+" "+srcA->name)==dstAType)
+ {
+ MATCH
+ return TRUE;
+ }
+ else if (!dstA->name.isEmpty() && !srcA->type.isEmpty() &&
+ (dstAType+" "+dstA->name)==srcAType)
+ {
+ MATCH
+ return TRUE;
+ }
+ //printf("srcA=%s::%s dstA=%s::%s\n",srcAType.data(),srcA->name.data(),
+ // dstAType.data(),dstA->name.data());
+
+ uint srcPos=0,dstPos=0;
+ bool equal=TRUE;
+ while (srcPos<srcAType.length() && dstPos<dstAType.length() && equal)
+ {
+ equal=srcAType.at(srcPos)==dstAType.at(dstPos);
+ if (equal) srcPos++,dstPos++;
+ }
+ if (srcPos<srcAType.length() && dstPos<dstAType.length())
+ {
+ // if nothing matches or the match ends in the middle or at the
+ // end of a string then there is no match
+ if (srcPos==0 || dstPos==0)
+ {
+ NOMATCH
+ return FALSE;
+ }
+ if (isId(srcAType.at(srcPos)) && isId(dstAType.at(dstPos)))
+ {
+ // check if a name if already found -> if no then there is no match
+ if (!srcA->name.isEmpty() || !dstA->name.isEmpty())
+ {
+ NOMATCH
+ return FALSE;
+ }
+ while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
+ while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
+ if (srcPos<srcAType.length() || dstPos<dstAType.length())
+ {
+ NOMATCH
+ return FALSE;
+ }
+ }
+ else
+ {
+ // otherwise we assume that a name starts at the current position.
+ while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
+ while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
+ // if nothing more follows for both types then we assume we have
+ // found a match. Note that now `signed int' and `signed' match, but
+ // seeing that int is not a name can only be done by looking at the
+ // semantics.
+
+ if (srcPos!=srcAType.length() || dstPos!=dstAType.length())
+ {
+ NOMATCH
+ return FALSE;
+ }
+ }
+ }
+ else if (dstPos<dstAType.length())
+ {
+ if (!isspace(dstAType.at(dstPos))) // maybe the names differ
+ {
+ while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
+ if (dstPos!=dstAType.length())
+ {
+ NOMATCH
+ return FALSE; // more than a difference in name -> no match
+ }
+ }
+ else // maybe dst has a name while src has not
+ {
+ dstPos++;
+ while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
+ if (dstPos!=dstAType.length())
+ {
+ NOMATCH
+ return FALSE; // nope not a name -> no match
+ }
+ }
+ }
+ else if (srcPos<srcAType.length())
+ {
+ if (!isspace(srcAType.at(srcPos))) // maybe the names differ
+ {
+ while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
+ if (srcPos!=srcAType.length())
+ {
+ NOMATCH
+ return FALSE; // more than a difference in name -> no match
+ }
+ }
+ else // maybe src has a name while dst has not
+ {
+ srcPos++;
+ while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
+ if (srcPos!=srcAType.length())
+ {
+ NOMATCH
+ return FALSE; // nope not a name -> no match
+ }
+ }
+ }
+ }
+ MATCH
+ return TRUE;
+}
+static void mergeArgument(Argument *srcA,Argument *dstA,
+ const QCString &className,
+ const QCString &namespaceName,
+ NamespaceList *usingList)
+{
+ QCString srcAType=trimTemplateSpecifiers(className,srcA->type);
+ QCString dstAType=trimTemplateSpecifiers(className,dstA->type);
+ if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6);
+ if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6);
+ stripIrrelevantConstVolatile(srcAType);
+ stripIrrelevantConstVolatile(dstAType);
+
+ if (srcAType!=dstAType) // check if the argument only differs on name
+ {
+ //printf("scope=`%s': `%s' <=> `%s'\n",className.data(),srcAType.data(),dstAType.data());
+
+ // remove a namespace scope that is only in one type
+ // (assuming a using statement was used)
+ trimNamespaceScope(srcAType,dstAType);
+
+ //QCString srcScope;
+ //QCString dstScope;
+
+ // strip redundant scope specifiers
+ if (!className.isEmpty())
+ {
+ srcAType=trimScope(className,srcAType);
+ dstAType=trimScope(className,dstAType);
+ //printf("trimScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
+ ClassDef *cd;
+ if (!namespaceName.isEmpty())
+ cd=getClass(namespaceName+"::"+className);
+ else
+ cd=getClass(className);
+ if (cd && cd->baseClasses()->count()>0)
+ {
+ trimBaseClassScope(cd->baseClasses(),srcAType);
+ trimBaseClassScope(cd->baseClasses(),dstAType);
+ }
+ //printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
+ }
+ if (!namespaceName.isEmpty())
+ {
+ srcAType=trimScope(namespaceName,srcAType);
+ dstAType=trimScope(namespaceName,dstAType);
+ }
+ if (usingList && usingList->count()>0)
+ {
+ NamespaceListIterator nli(*usingList);
+ NamespaceDef *nd;
+ for (;(nd=nli.current());++nli)
+ {
+ srcAType=trimScope(nd->name(),srcAType);
+ dstAType=trimScope(nd->name(),dstAType);
+ }
+ }
+
+ if (!srcA->name.isEmpty() && !dstA->type.isEmpty() &&
+ (srcAType+" "+srcA->name)==dstAType)
+ {
+ srcA->type=srcAType+" "+srcA->name;
+ srcA->name.resize(0);
+ return;
+ }
+ else if (!dstA->name.isEmpty() && !srcA->type.isEmpty() &&
+ (dstAType+" "+dstA->name)==srcAType)
+ {
+ dstA->type=dstAType+" "+dstA->name;
+ dstA->name.resize(0);
+ return;
+ }
+ //printf("srcA=%s::%s dstA=%s::%s\n",srcAType.data(),srcA->name.data(),
+ // dstAType.data(),dstA->name.data());
+
+ uint srcPos=0,dstPos=0;
+ bool equal=TRUE;
+ while (srcPos<srcAType.length() && dstPos<dstAType.length() && equal)
+ {
+ equal=srcAType.at(srcPos)==dstAType.at(dstPos);
+ if (equal) srcPos++,dstPos++;
+ }
+ if (srcPos<srcAType.length() && dstPos<dstAType.length())
+ {
+ // if nothing matches or the match ends in the middle or at the
+ // end of a string then there is no match
+ int srcStart=srcPos;
+ int dstStart=dstPos;
+ if (isId(srcAType.at(srcPos)) && isId(dstAType.at(dstPos)))
+ {
+ // find the start of the name
+ while (srcStart>=0 && isId(srcAType.at(srcStart))) srcStart--;
+ while (dstStart>=0 && isId(dstAType.at(dstStart))) dstStart--;
+ if (srcStart>0) // move the name from the type to the name field
+ {
+ srcA->name=srcAType.right(srcAType.length()-srcStart-1);
+ srcA->type=srcAType.left(srcStart+1).stripWhiteSpace();
+ }
+ if (dstStart>0) // move the name from the type to the name field
+ {
+ dstA->name=dstAType.right(dstAType.length()-dstStart-1);
+ dstA->type=dstAType.left(dstStart+1).stripWhiteSpace();
+ }
+ }
+ else
+ {
+ dstA->name=dstAType.right(dstAType.length()-dstStart);
+ dstA->type=dstAType.left(dstStart).stripWhiteSpace();
+ srcA->name=srcAType.right(dstAType.length()-srcStart);
+ srcA->type=srcAType.left(srcStart).stripWhiteSpace();
+ }
+ }
+ else if (dstPos<dstAType.length())
+ {
+ if (!isspace(dstAType.at(dstPos))) // maybe the names differ
+ {
+ int startPos=dstPos;
+ while (startPos>=0 && isId(dstAType.at(startPos))) startPos--;
+ if (startPos>0)
+ {
+ dstA->name=dstAType.right(dstAType.length()-startPos-1);
+ dstA->type=dstAType.left(startPos+1).stripWhiteSpace();
+ }
+ }
+ else // maybe dst has a name while src has not
+ {
+ dstPos++;
+ int startPos=dstPos;
+ dstA->name=dstAType.right(dstAType.length()-startPos);
+ dstA->type=dstAType.left(startPos).stripWhiteSpace();
+ }
+ }
+ else if (srcPos<srcAType.length())
+ {
+ if (!isspace(srcAType.at(srcPos))) // maybe the names differ
+ {
+ int startPos=srcPos;
+ while (startPos>=0 && isId(srcAType.at(startPos))) startPos--;
+ if (startPos>0)
+ {
+ srcA->name=srcAType.right(srcAType.length()-startPos-1);
+ srcA->type=srcAType.left(startPos+1).stripWhiteSpace();
+ }
+ }
+ else // maybe src has a name while dst has not
+ {
+ srcPos++;
+ int startPos=srcPos;
+ srcA->name=srcAType.right(srcAType.length()-startPos);
+ srcA->type=srcAType.left(startPos).stripWhiteSpace();
+ }
+ }
+ return;
+ }
+ //printf("match exactly\n");
+ if (srcA->name.isEmpty() && dstA->name.isEmpty())
+ // arguments match exactly but no name ->
+ // see if we can find the name
+ {
+ int i=srcAType.length()-1;
+ while (i>=0 && isId(srcAType.at(i))) i--;
+ if (i>0 && i<(int)srcAType.length()-1 && srcAType.at(i)!=':')
+ // there is (probably) a name
+ {
+ srcA->name=srcAType.right(srcAType.length()-i-1);
+ srcA->type=srcAType.left(i+1).stripWhiteSpace();
+ dstA->name=dstAType.right(dstAType.length()-i-1);
+ dstA->type=dstAType.left(i+1).stripWhiteSpace();
+ }
+ }
+ else if (!dstA->name.isEmpty())
+ {
+ srcA->name = dstA->name.copy();
+ }
+ else if (!srcA->name.isEmpty())
+ {
+ dstA->name = srcA->name.copy();
+ }
+ return;
+}
+
+
+/*!
+ * Matches the arguments list srcAl with the argument list dstAl
+ * Returns TRUE if the argument lists are equal. Two argument list are
+ * considered equal if the number of arguments is equal and the types of all
+ * arguments are equal. Furthermore the const and volatile specifiers
+ * stored in the list should be equal.
+ */
bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
const char *cl,const char *ns,bool checkCV,
NamespaceList *usingList)
@@ -1231,7 +1630,17 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
if (srcAl==0 || dstAl==0)
{
- return srcAl==dstAl; // at least one of the members is not a function
+ bool match = srcAl==dstAl; // at least one of the members is not a function
+ if (match)
+ {
+ MATCH
+ return TRUE;
+ }
+ else
+ {
+ NOMATCH
+ return FALSE;
+ }
}
// handle special case with void argument
@@ -1241,6 +1650,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
Argument *a=new Argument;
a->type = "void";
srcAl->append(a);
+ MATCH
return TRUE;
}
if ( dstAl->count()==0 && srcAl->count()==1 &&
@@ -1249,11 +1659,13 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
Argument *a=new Argument;
a->type = "void";
dstAl->append(a);
+ MATCH
return TRUE;
}
if (srcAl->count() != dstAl->count())
{
+ NOMATCH
return FALSE; // different number of arguments -> no match
}
@@ -1261,10 +1673,12 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
{
if (srcAl->constSpecifier != dstAl->constSpecifier)
{
+ NOMATCH
return FALSE; // one member is const, the other not -> no match
}
if (srcAl->volatileSpecifier != dstAl->volatileSpecifier)
{
+ NOMATCH
return FALSE; // one member is volatile, the other not -> no match
}
}
@@ -1274,200 +1688,22 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl);
Argument *srcA,*dstA;
for (;(srcA=srcAli.current(),dstA=dstAli.current());++srcAli,++dstAli)
- {
- QCString srcAType=trimTemplateSpecifiers(className,srcA->type);
- QCString dstAType=trimTemplateSpecifiers(className,dstA->type);
- if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6);
- if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6);
- stripIrrelevantConstVolatile(srcAType);
- stripIrrelevantConstVolatile(dstAType);
-
- if (srcA->array!=dstA->array) return FALSE;
- if (srcAType!=dstAType) // check if the argument only differs on name
+ {
+ if (!matchArgument(srcA,dstA,className,namespaceName,usingList))
{
- //printf("scope=`%s': `%s' <=> `%s'\n",className.data(),srcAType.data(),dstAType.data());
-
- // remove a namespace scope that is only in one type
- // (assuming a using statement was used)
- trimNamespaceScope(srcAType,dstAType);
-
- //QCString srcScope;
- //QCString dstScope;
-
- // strip redundant scope specifiers
- if (!className.isEmpty())
- {
- srcAType=trimScope(className,srcAType);
- dstAType=trimScope(className,dstAType);
- //printf("trimScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
- ClassDef *cd;
- if (!namespaceName.isEmpty())
- cd=getClass(namespaceName+"::"+className);
- else
- cd=getClass(className);
- if (cd && cd->baseClasses()->count()>0)
- {
- trimBaseClassScope(cd->baseClasses(),srcAType);
- trimBaseClassScope(cd->baseClasses(),dstAType);
- }
- //printf("trimBaseClassScope: `%s' <=> `%s'\n",srcAType.data(),dstAType.data());
- }
- if (!namespaceName.isEmpty())
- {
- srcAType=trimScope(namespaceName,srcAType);
- dstAType=trimScope(namespaceName,dstAType);
- }
- if (usingList && usingList->count()>0)
- {
- NamespaceListIterator nli(*usingList);
- NamespaceDef *nd;
- for (;(nd=nli.current());++nli)
- {
- srcAType=trimScope(nd->name(),srcAType);
- dstAType=trimScope(nd->name(),dstAType);
- }
- }
- //printf("srcAType=%s dstAType=%s\n",srcAType.data(),dstAType.data());
-
- uint srcPos=0,dstPos=0;
- bool equal=TRUE;
- while (srcPos<srcAType.length() && dstPos<dstAType.length() && equal)
- {
- equal=srcAType.at(srcPos)==dstAType.at(dstPos);
- if (equal) srcPos++,dstPos++;
- }
- if (srcPos<srcAType.length() && dstPos<dstAType.length())
- {
- // if nothing matches or the match ends in the middle or at the
- // end of a string then there is no match
- //if (srcPos==0 || isalnum(srcAType.at(srcPos-1)) ||
- // dstPos==0 || isalnum(dstAType.at(dstPos-1))) { printf("No match1\n"); return FALSE; }
- int srcStart=srcPos;
- int dstStart=dstPos;
- if (srcPos==0 || dstPos==0) return FALSE;
- if (isId(srcAType.at(srcPos)) && isId(dstAType.at(dstPos)))
- {
- // check if a name if already found -> if no then there is no match
- if (!srcA->name.isEmpty() || !dstA->name.isEmpty()) return FALSE;
- while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
- while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
- if (srcPos<srcAType.length() || dstPos<dstAType.length()) return FALSE;
- // find the start of the name
- while (srcStart>=0 && isId(srcAType.at(srcStart))) srcStart--;
- while (dstStart>=0 && isId(dstAType.at(dstStart))) dstStart--;
- if (srcStart>0) // move the name from the type to the name field
- {
- srcA->name=srcAType.right(srcAType.length()-srcStart-1);
- srcA->type=srcAType.left(srcStart+1).stripWhiteSpace();
- }
- if (dstStart>0) // move the name from the type to the name field
- {
- dstA->name=dstAType.right(dstAType.length()-dstStart-1);
- dstA->type=dstAType.left(dstStart+1).stripWhiteSpace();
- }
- }
- else
- {
- // otherwise we assume that a name starts at the current position.
- while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
- while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
- // if nothing more follows for both types then we assume we have
- // found a match. Note that now `signed int' and `signed' match, but
- // seeing that int is not a name can only be done by looking at the
- // semantics.
-
- if (srcPos!=srcAType.length() || dstPos!=dstAType.length()) { return FALSE; }
- dstA->name=dstAType.right(dstAType.length()-dstStart);
- dstA->type=dstAType.left(dstStart).stripWhiteSpace();
- srcA->name=srcAType.right(dstAType.length()-srcStart);
- srcA->type=srcAType.left(srcStart).stripWhiteSpace();
- }
- }
- else if (dstPos<dstAType.length())
- {
- if (!isspace(dstAType.at(dstPos))) // maybe the names differ
- {
- int startPos=dstPos;
- while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
- if (dstPos!=dstAType.length()) return FALSE; // more than a difference in name -> no match
- while (startPos>=0 && isId(dstAType.at(startPos))) startPos--;
- if (startPos>0)
- {
- dstA->name=dstAType.right(dstAType.length()-startPos-1);
- dstA->type=dstAType.left(startPos+1).stripWhiteSpace();
- }
- }
- else // maybe dst has a name while src has not
- {
- dstPos++;
- int startPos=dstPos;
- while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
- if (dstPos!=dstAType.length()) return FALSE; // nope not a name -> no match
- else // its a name (most probably) so move it
- {
- dstA->name=dstAType.right(dstAType.length()-startPos);
- dstA->type=dstAType.left(startPos).stripWhiteSpace();
- }
- }
- }
- else if (srcPos<srcAType.length())
- {
- if (!isspace(srcAType.at(srcPos))) // maybe the names differ
- {
- int startPos=srcPos;
- while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
- if (srcPos!=srcAType.length()) return FALSE; // more than a difference in name -> no match
- while (startPos>=0 && isId(srcAType.at(startPos))) startPos--;
- if (startPos>0)
- {
- srcA->name=srcAType.right(srcAType.length()-startPos-1);
- srcA->type=srcAType.left(startPos+1).stripWhiteSpace();
- }
- }
- else // maybe src has a name while dst has not
- {
- srcPos++;
- int startPos=srcPos;
- while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
- if (srcPos!=srcAType.length()) return FALSE; // nope not a name -> no match
- else // its a name (most probably) so move it
- {
- srcA->name=srcAType.right(srcAType.length()-startPos);
- srcA->type=srcAType.left(startPos).stripWhiteSpace();
- }
- }
- }
- else // without scopes the names match exactly
- {
- }
- return TRUE;
- }
- //printf("match exactly\n");
- if (srcA->name.isEmpty() && dstA->name.isEmpty())
- // arguments match exactly but no name ->
- // see if we can find the name
- {
- int i=srcAType.length()-1;
- while (i>=0 && isId(srcAType.at(i))) i--;
- if (i>0 && i<(int)srcAType.length()-1 && srcAType.at(i)!=':')
- // there is (probably) a name
- {
- srcA->name=srcAType.right(srcAType.length()-i-1);
- srcA->type=srcAType.left(i+1).stripWhiteSpace();
- dstA->name=dstAType.right(dstAType.length()-i-1);
- dstA->type=dstAType.left(i+1).stripWhiteSpace();
- }
- }
- else if (!dstA->name.isEmpty())
- {
- srcA->name=dstA->name.copy();
- }
- else if (!srcA->name.isEmpty())
- {
- dstA->name=srcA->name.copy();
+ NOMATCH
+ return FALSE;
}
}
- //printf("Match found!\n");
+ // merge/correct argument type/names
+ for (srcAli.toFirst(),dstAli.toFirst();
+ (srcA=srcAli.current(),dstA=dstAli.current());
+ ++srcAli,++dstAli
+ )
+ {
+ mergeArgument(srcA,dstA,className,namespaceName,usingList);
+ }
+ MATCH
return TRUE; // all arguments match
}
@@ -1572,7 +1808,9 @@ bool getDefs(const QCString &scName,const QCString &memberName,
const char *args,
MemberDef *&md,
ClassDef *&cd, FileDef *&fd, NamespaceDef *&nd, GroupDef *&gd,
- bool forceEmptyScope)
+ bool forceEmptyScope,
+ FileDef *currentFile
+ )
{
fd=0, md=0, cd=0, nd=0, gd=0;
if (memberName.isEmpty()) return FALSE; /* empty name => nothing to link */
@@ -1784,6 +2022,8 @@ bool getDefs(const QCString &scName,const QCString &memberName,
}
else // no scope => global function
{
+ QList<MemberDef> members;
+
//printf("Function with global scope `%s' args=`%s'\n",namespaceName.data(),args);
MemberListIterator mli(*mn);
for (mli.toFirst();(md=mli.current());++mli)
@@ -1794,12 +2034,10 @@ bool getDefs(const QCString &scName,const QCString &memberName,
gd=md->getGroupDef();
//printf("md->name()=`%s' md->args=`%s' fd=%p gd=%p\n",
// md->name().data(),args,fd,gd);
- bool inGroup=FALSE;
if ((fd && fd->isLinkable()) ||
- (inGroup=(gd && gd->isLinkable()))
+ (gd && gd->isLinkable())
)
{
- if (inGroup) fd=0;
//printf("fd=%p gd=%p inGroup=`%d' args=`%s'\n",fd,gd,inGroup,args);
bool match=TRUE;
ArgumentList *argList=0;
@@ -1813,7 +2051,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
if (match)
{
//printf("Found match!\n");
- return TRUE;
+ members.append(md);
}
}
}
@@ -1831,18 +2069,44 @@ bool getDefs(const QCString &scName,const QCString &memberName,
//printf("member is linkable md->name()=`%s'\n",md->name().data());
fd=md->getFileDef();
gd=md->getGroupDef();
- bool inGroup=FALSE;
if ((fd && fd->isLinkable()) ||
- (inGroup=(gd && gd->isLinkable()))
+ (gd && gd->isLinkable())
)
{
- if (inGroup) fd=0;
- return TRUE;
+ members.append(md);
}
}
md=mn->prev();
}
}
+ if (members.count()==1 || currentFile!=0)
+ {
+ md=members.first();
+ }
+ else if (members.count()>1)
+ {
+ // use some C scoping rules to determine the correct link
+ // 1. member in current file
+ // 2. non-static member in different file
+ MemberDef *bmd = 0;
+ for (md=members.first(); md; md=members.next())
+ {
+ if (md->getFileDef() == currentFile)
+ {
+ bmd = 0;
+ break;
+ }
+ if (!(md->isStatic())) bmd = md;
+ }
+ if (bmd) md=bmd;
+ }
+ if (md) // found a matching global member
+ {
+ fd=md->getFileDef();
+ gd=md->getGroupDef();
+ if (gd && gd->isLinkable()) fd=0; else gd=0;
+ return TRUE;
+ }
}
if (scopeOffset==0)
{
diff --git a/src/util.h b/src/util.h
index f0ed331..2c1ab3d 100644
--- a/src/util.h
+++ b/src/util.h
@@ -85,11 +85,16 @@ extern void linkifyText(const TextGeneratorIntf &ol,const char *clName,const cha
extern void setAnchors(char id,MemberList *ml,int groupId=-1);
extern QCString fileToString(const char *name);
extern QCString dateToString(bool);
-extern bool getDefs(const QCString &scopeName,const QCString &memberName,
- const char *, MemberDef *&md,
- ClassDef *&cd,FileDef *&fd,
- NamespaceDef *&nd,GroupDef *&gd,
- bool forceEmptyScope=FALSE
+extern bool getDefs(const QCString &scopeName,
+ const QCString &memberName,
+ const char *,
+ MemberDef *&md,
+ ClassDef *&cd,
+ FileDef *&fd,
+ NamespaceDef *&nd,
+ GroupDef *&gd,
+ bool forceEmptyScope=FALSE,
+ FileDef *currentFile=0
);
extern bool generateRef(OutputList &ol,const char *,
const char *,bool inSeeBlock,const char * =0);
@@ -133,7 +138,8 @@ bool leftScopeMatch(const QCString &scope, const QCString &name);
void writePageRef(OutputList &ol,const char *cn,const char *mn);
QCString substituteKeywords(const QCString &s,const char *title);
int getPrefixIndex(const QCString &name);
-QCString removeAnnonymousScopes(const QCString &s);
+QCString removeAnonymousScopes(const QCString &s);
+QCString replaceAnonymousScopes(const QCString &s);
void initClassHierarchy(ClassList *cl);
bool hasVisibleRoot(BaseClassList *bcl);
int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0);
diff --git a/src/xml_dtd.h b/src/xml_dtd.h
index f43db77..010a465 100644
--- a/src/xml_dtd.h
+++ b/src/xml_dtd.h
@@ -1,4 +1,4 @@
-"<?xml encoding=\"ISO-8859-1\"?>\n"
+"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
"<!-- DTD describing the grammar used in doxygen's XML output -->\n"
"\n"
"<!-- standard character entities -->\n"
@@ -50,6 +50,8 @@
" |friend\n"
" |related\n"
" |define|prototype|typedef|enum|func|var\n"
+" |dcop-func\n"
+" |property\n"
" ) #REQUIRED\n"
" '\n"
">\n"