summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2004-09-28 18:26:46 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2004-09-28 18:26:46 (GMT)
commitb7473cd86e57053b866a719f160cd4d01e92f092 (patch)
tree01f67df4c4005875230919c5f826290b6a17a2e4 /src
parenta3133b16473d093f9c525cbf9d21fabbae7ae1ac (diff)
downloadDoxygen-b7473cd86e57053b866a719f160cd4d01e92f092.zip
Doxygen-b7473cd86e57053b866a719f160cd4d01e92f092.tar.gz
Doxygen-b7473cd86e57053b866a719f160cd4d01e92f092.tar.bz2
Release-1.3.8-20040928
Diffstat (limited to 'src')
-rw-r--r--src/code.l42
-rw-r--r--src/compound.xsd30
-rw-r--r--src/compound_xsd.h30
-rw-r--r--src/config.l1
-rw-r--r--src/defargs.l4
-rw-r--r--src/dirdef.cpp46
-rw-r--r--src/dirdef.h6
-rw-r--r--src/dot.cpp35
-rw-r--r--src/doxygen.cpp17
-rw-r--r--src/filedef.cpp7
-rw-r--r--src/filedef.h1
-rw-r--r--src/groupdef.cpp63
-rw-r--r--src/groupdef.h10
-rw-r--r--src/htmlgen.cpp14
-rw-r--r--src/index.cpp15
-rw-r--r--src/memberdef.cpp36
-rw-r--r--src/memberlist.cpp7
-rw-r--r--src/namespacedef.cpp1
-rw-r--r--src/pre.l3
-rw-r--r--src/scanner.l30
-rw-r--r--src/search_php.h1
-rw-r--r--src/tagreader.cpp58
-rw-r--r--src/translator_cn.h65
-rw-r--r--src/translator_cz.h56
-rw-r--r--src/translator_de.h69
-rw-r--r--src/translator_es.h2
-rw-r--r--src/translator_hr.h50
-rw-r--r--src/translator_hu.h48
-rw-r--r--src/translator_it.h48
-rw-r--r--src/translator_pl.h48
-rw-r--r--src/translator_ru.h50
-rw-r--r--src/translator_se.h61
-rw-r--r--src/util.cpp180
-rw-r--r--src/xmldocvisitor.cpp6
-rw-r--r--src/xmlgen.cpp4
35 files changed, 955 insertions, 189 deletions
diff --git a/src/code.l b/src/code.l
index 73f432c..a343058 100644
--- a/src/code.l
+++ b/src/code.l
@@ -297,9 +297,12 @@ class CallContext
virtual ~CallContext() {}
void setClass(ClassDef *cd)
{
- DBG_CTX((stderr,"** Set call context %s (%p)\n",cd==0 ? "<null>" : cd->name().data(),cd));
- m_classList.removeLast();
- m_classList.append(cd);
+ if (cd)
+ {
+ DBG_CTX((stderr,"** Set call context %s (%p)\n",cd==0 ? "<null>" : cd->name().data(),cd));
+ m_classList.removeLast();
+ m_classList.append(cd);
+ }
}
void pushScope()
{
@@ -744,11 +747,11 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{
className+="-p";
}
- ClassDef *cd=0;
+ ClassDef *cd=0,*lcd=0;
MemberDef *md=0;
- //printf("generateClassOrGlobalLink(className=%s)\n",className.data());
- if (!g_theVarContext.findVariable(className)) // not a local variable
+ //fprintf(stderr,"generateClassOrGlobalLink(className=%s)\n",className.data());
+ if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable
{
Definition *d = g_currentDefinition;
//printf("d=%p g_sourceFileDef=%p\n",d,g_currentDefinition);
@@ -761,11 +764,12 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
}
else
{
- //printf("is a local variable!\n");
+ if (lcd!=VariableContext::dummyContext) g_theCallContext.setClass(lcd);
+ //fprintf(stderr,"is a local variable!\n");
}
if (cd && cd->isLinkable()) // is it a linkable class
{
- //printf("is linkable class %s\n",clName);
+ //fprintf(stderr,"is linkable class %s\n",clName);
if (g_exampleBlock)
{
QCString anchor;
@@ -926,7 +930,9 @@ static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const
}
}
- g_theCallContext.setClass(stripClassName(xmd->typeString()));
+ ClassDef *typeClass = stripClassName(xmd->typeString());
+ //fprintf(stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass);
+ g_theCallContext.setClass(typeClass);
Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ?
xmd->getBodyDef() : xmd->getOuterScope();
@@ -1755,7 +1761,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
BEGIN( Body );
}
<ClassName,ClassVar>[*&]+ {
- addType();
+ g_type=g_curClassName;
+ g_name.resize(0);
g_code->codify(yytext);
BEGIN( Body ); // variable of type struct *
}
@@ -2121,6 +2128,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
<MemberCall>{SCOPENAME}/{B}* {
if (g_theCallContext.getClass())
{
+ //fprintf(stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getClass());
if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext))
{
g_code->codify(yytext);
@@ -2130,6 +2138,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
}
else
{
+ //fprintf(stderr,"no class context!\n");
g_code->codify(yytext);
addToSearchIndex(yytext);
g_name.resize(0);
@@ -2167,7 +2176,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_code->codify(yytext);
g_saveName = g_name.copy();
g_saveType = g_type.copy();
- if (!g_type.isEmpty())
+ if (*yytext!='[' && !g_type.isEmpty())
{
if (g_scopeStack.top()!=CLASSBLOCK)
{
@@ -2175,7 +2184,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
}
g_name.resize(0);
}
- if (*yytext==';')
+ if (*yytext==';' || *yytext=='=')
{
g_type.resize(0);
g_name.resize(0);
@@ -2388,7 +2397,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
BEGIN( SkipInits );
}
}
-<CallEnd,OldStyleArgs>({BN}"const"|"volatile")*{BN}*"{" {
+<CallEnd>("const"|"volatile")({BN}+("const"|"volatile"))*{BN}*/";" {
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
+ }
+<CallEnd,OldStyleArgs>("const"|"volatile")*({BN}+("const"|"volatile"))*"{" {
if (g_insideBody)
{
g_theVarContext.pushScope();
@@ -2878,6 +2892,7 @@ static void restoreObjCContext()
void initParseCodeContext()
{
+ //printf("***initParseCodeContext()\n");
g_theVarContext.clear();
g_codeClassSDict.setAutoDelete(TRUE);
g_codeClassSDict.clear();
@@ -2889,6 +2904,7 @@ void parseCode(BaseCodeDocInterface &od,const char *className,const QCString &s,
bool exBlock, const char *exName,FileDef *fd,
int startLine,int endLine,bool inlineFragment)
{
+ //printf("***parseCode()\n");
if (s.isEmpty()) return;
g_code = &od;
g_inputString = s;
diff --git a/src/compound.xsd b/src/compound.xsd
index c35c917..bdbf498 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -216,12 +216,12 @@
<xsd:complexType name="linkType">
<xsd:attribute name="refid" type="xsd:string" />
- <xsd:attribute name="external" type="DoxBool" use="optional"/>
+ <xsd:attribute name="external" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="listingType">
<xsd:sequence>
- <xsd:element name="codeline" type="codelineType" maxOccurs="unbounded" />
+ <xsd:element name="codeline" type="codelineType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
@@ -528,12 +528,25 @@
<xsd:attribute name="langid" type="xsd:string" />
</xsd:complexType>
- <xsd:group name="docParamListGroup">
+ <xsd:complexType name="docParamListType">
<xsd:sequence>
- <xsd:element name="parametername" type="docParamName" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="parameteritem" type="docParamListItem" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="kind" type="DoxParamListKind" />
+ </xsd:complexType>
+
+ <xsd:complexType name="docParamListItem">
+ <xsd:sequence>
+ <xsd:element name="parameternamelist" type="docParamNameList" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="parameterdescription" type="descriptionType" />
</xsd:sequence>
- </xsd:group>
+ </xsd:complexType>
+
+ <xsd:complexType name="docParamNameList">
+ <xsd:sequence>
+ <xsd:element name="parametername" type="docParamName" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
<xsd:complexType name="docParamName">
<xsd:simpleContent>
@@ -543,13 +556,6 @@
</xsd:simpleContent>
</xsd:complexType>
- <xsd:complexType name="docParamListType">
- <xsd:sequence>
- <xsd:group ref="docParamListGroup" maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="kind" type="DoxParamListKind" />
- </xsd:complexType>
-
<xsd:complexType name="docXRefSectType">
<xsd:sequence>
<xsd:element name="xreftitle" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index f7a6381..a938f18 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -216,12 +216,12 @@
"\n"
" <xsd:complexType name=\"linkType\">\n"
" <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
-" <xsd:attribute name=\"external\" type=\"DoxBool\" use=\"optional\"/>\n"
+" <xsd:attribute name=\"external\" type=\"xsd:string\" use=\"optional\"/>\n"
" </xsd:complexType>\n"
"\n"
" <xsd:complexType name=\"listingType\">\n"
" <xsd:sequence>\n"
-" <xsd:element name=\"codeline\" type=\"codelineType\" maxOccurs=\"unbounded\" />\n"
+" <xsd:element name=\"codeline\" type=\"codelineType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" </xsd:sequence>\n"
" </xsd:complexType>\n"
"\n"
@@ -528,12 +528,25 @@
" <xsd:attribute name=\"langid\" type=\"xsd:string\" /> \n"
" </xsd:complexType>\n"
"\n"
-" <xsd:group name=\"docParamListGroup\">\n"
+" <xsd:complexType name=\"docParamListType\">\n"
" <xsd:sequence>\n"
-" <xsd:element name=\"parametername\" type=\"docParamName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
+" <xsd:element name=\"parameteritem\" type=\"docParamListItem\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
+" </xsd:sequence>\n"
+" <xsd:attribute name=\"kind\" type=\"DoxParamListKind\" /> \n"
+" </xsd:complexType>\n"
+"\n"
+" <xsd:complexType name=\"docParamListItem\">\n"
+" <xsd:sequence>\n"
+" <xsd:element name=\"parameternamelist\" type=\"docParamNameList\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"parameterdescription\" type=\"descriptionType\" />\n"
" </xsd:sequence>\n"
-" </xsd:group>\n"
+" </xsd:complexType>\n"
+"\n"
+" <xsd:complexType name=\"docParamNameList\">\n"
+" <xsd:sequence>\n"
+" <xsd:element name=\"parametername\" type=\"docParamName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
+" </xsd:sequence>\n"
+" </xsd:complexType>\n"
"\n"
" <xsd:complexType name=\"docParamName\">\n"
" <xsd:simpleContent>\n"
@@ -543,13 +556,6 @@
" </xsd:simpleContent>\n"
" </xsd:complexType>\n"
"\n"
-" <xsd:complexType name=\"docParamListType\">\n"
-" <xsd:sequence>\n"
-" <xsd:group ref=\"docParamListGroup\" maxOccurs=\"unbounded\" />\n"
-" </xsd:sequence>\n"
-" <xsd:attribute name=\"kind\" type=\"DoxParamListKind\" /> \n"
-" </xsd:complexType>\n"
-"\n"
" <xsd:complexType name=\"docXRefSectType\">\n"
" <xsd:sequence>\n"
" <xsd:element name=\"xreftitle\" type=\"xsd:string\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
diff --git a/src/config.l b/src/config.l
index 96357a5..1b73bbd 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1113,6 +1113,7 @@ void Config::check()
filePatternList.append("*.inc");
filePatternList.append("*.m");
filePatternList.append("*.mm");
+ filePatternList.append("*.dox");
#if !defined(_WIN32)
// unix => case sensitive match => also include useful uppercase versions
filePatternList.append("*.C");
diff --git a/src/defargs.l b/src/defargs.l
index 0a5d5ec..da76d9c 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -283,7 +283,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
if (fi>=0)
{
a->type = g_curArgTypeName.left(fi+1);
- a->name = g_curArgTypeName.mid(fi+1,bi-fi-1);
+ a->name = g_curArgTypeName.mid(fi+1,bi-fi-1).stripWhiteSpace();
a->array = g_curArgTypeName.right(l-bi);
}
else
@@ -294,7 +294,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
else if (i>=0 && g_curArgTypeName.at(i)!=':')
{ // type contains a name
a->type = removeRedundantWhiteSpace(g_curArgTypeName.left(i+1));
- a->name = g_curArgTypeName.right(l-i-1);
+ a->name = g_curArgTypeName.right(l-i-1).stripWhiteSpace();
}
else // assume only the type was specified, try to determine name later
{
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index 66ab173..6e192af 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -127,6 +127,14 @@ void DirDef::writeDocumentation(OutputList &ol)
ol.popGeneratorState();
}
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ {
+ Doxygen::tagFile << " <compound kind=\"dir\">" << endl;
+ Doxygen::tagFile << " <name>" << convertToXML(displayName()) << "</name>" << endl;
+ Doxygen::tagFile << " <path>" << convertToXML(name()) << "</path>" << endl;
+ Doxygen::tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
+ }
+
ol.startMemberSections();
// write subdir list
@@ -144,6 +152,10 @@ void DirDef::writeDocumentation(OutputList &ol)
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
ol.endMemberItem();
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ {
+ Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
+ }
if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
@@ -156,7 +168,6 @@ void DirDef::writeDocumentation(OutputList &ol)
ol.endMemberList();
}
-
// write file list
if (m_fileList->count()>0)
@@ -169,13 +180,22 @@ void DirDef::writeDocumentation(OutputList &ol)
while (fd)
{
ol.startMemberItem(0);
- ol.docify("file ");
+ ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
- //if (!Config_getString("GENERATE_TAGFILE").isEmpty())
- //{
- // Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
- //}
+ if (fd->isLinkable())
+ {
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ }
+ else
+ {
+ ol.startBold();
+ ol.writeString(fd->name());
+ ol.endBold();
+ }
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ {
+ Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
+ }
ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
@@ -190,13 +210,17 @@ void DirDef::writeDocumentation(OutputList &ol)
}
ol.endMemberSections();
- if (!Config_getBool("DETAILS_AT_TOP"))
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
- writeDetailedDocumentation(ol);
+ writeDocAnchorsToTagFile();
+ Doxygen::tagFile << " </compound>" << endl;
}
- // write details (if !DETAILS_AT_TOP)
+ if (!Config_getBool("DETAILS_AT_TOP"))
+ {
+ writeDetailedDocumentation(ol);
+ }
endFile(ol);
ol.popGeneratorState();
@@ -293,7 +317,7 @@ void buildDirectories()
for (;(fd=fni.current());++fni)
{
//printf("buildDirectories %s\n",fd->name().data());
- if (fd->getReference().isEmpty())
+ if (fd->getReference().isEmpty() && !fd->isDocumentationFile())
{
DirDef *dir;
if ((dir=Doxygen::directories.find(fd->getPath()))==0) // new directory
diff --git a/src/dirdef.h b/src/dirdef.h
index 0f24646..90ede70 100644
--- a/src/dirdef.h
+++ b/src/dirdef.h
@@ -32,7 +32,7 @@ class OutputList;
class DirDef;
-class DirDefList : public QList<DirDef>
+class DirList : public QList<DirDef>
{
public:
int compareItems(GCI item1,GCI item2);
@@ -67,7 +67,7 @@ class DirDef : public Definition
static DirDef *createNewDir(const char *path);
static bool matchPath(const QCString &path,QStrList &l);
- DirDefList m_subdirs;
+ DirList m_subdirs;
QCString m_dispName;
QCString m_shortName;
FileList *m_fileList; // list of files in the group
@@ -75,7 +75,7 @@ class DirDef : public Definition
int m_dirCount;
};
-inline int DirDefList::compareItems(GCI item1,GCI item2)
+inline int DirList::compareItems(GCI item1,GCI item2)
{
return stricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName());
}
diff --git a/src/dot.cpp b/src/dot.cpp
index 4b9f11b..670911e 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -33,6 +33,10 @@
#include <qtextstream.h>
#include <md5.h>
+// Enable this for transparent images
+// It doesn't seems to work very well with edge labels so I disabled it.
+//#define DOT_TRANSPARENT
+
//--------------------------------------------------------------------
static const int maxCmdLine = 40960;
@@ -68,6 +72,9 @@ static void writeGraphHeader(QTextStream &t)
{
t << "digraph G" << endl;
t << "{" << endl;
+#if defined(DOT_TRANSPARENT)
+ t << " bgcolor=\"transparent\"" << endl;
+#endif
t << " edge [fontname=\"Helvetica\",fontsize=10,"
"labelfontname=\"Helvetica\",labelfontsize=10];\n";
t << " node [fontname=\"Helvetica\",fontsize=10,shape=record];\n";
@@ -586,7 +593,11 @@ void DotNode::writeBox(QTextStream &t,
}
else
{
+#if defined(DOT_TRANSPARENT)
+ t << ",color=\"" << labCol << "\", fillcolor=\"white\", style=\"filled\"";
+#else
t << ",color=\"" << labCol << "\"";
+#endif
if (!m_url.isEmpty())
{
int anchorPos = m_url.findRev('#');
@@ -2327,8 +2338,30 @@ bool DotCallGraph::isTrivial() const
//-------------------------------------------------------------
-DotDirDeps::DotDirDeps(DirDef *)
+DotDirDeps::DotDirDeps(DirDef *dd)
{
+ FileList *fl = dd->getFiles();
+ if (fl)
+ {
+ QListIterator<FileDef> fli(*fl);
+ FileDef *fd;
+ for (fli.toFirst();(fd=fli.current());++fli) // foreach file in dir dd
+ {
+ QList<IncludeInfo> *ifl = fd->includeFileList();
+ if (ifl)
+ {
+ QListIterator<IncludeInfo> ifli(*ifl);
+ IncludeInfo *ii;
+ for (ifli.toFirst();(ii=ifli.current());++ifli) // foreach include file
+ {
+ if (ii->fileDef)
+ {
+ // add dependency
+ }
+ }
+ }
+ }
+ }
}
DotDirDeps::~DotDirDeps()
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 588f401..6419935 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -4621,6 +4621,7 @@ static void findMember(Entry *root,
if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName);
ClassDef *tcd=findClassDefinition(fd,nd,scopeName);
+ //printf("*** cd=%s tcd=%s fd=%s\n",cd->name().data(),tcd->name().data(),fd->name().data());
if (cd && tcd==cd) // member's classes match
{
@@ -4859,7 +4860,7 @@ static void findMember(Entry *root,
}
}
}
- else // member specialization
+ else if (cd) // member specialization
{
MemberDef::MemberType mtype=MemberDef::Function;
ArgumentList *tArgList = new ArgumentList;
@@ -4894,6 +4895,11 @@ static void findMember(Entry *root,
cd->insertMember(md);
md->setRefItems(root->sli);
}
+ else
+ {
+ //printf("Specialized member %s of unknown scope %s%s found!\n",
+ // scopeName.data(),funcName.data(),funcArgs.data());
+ }
}
else if (overloaded) // check if the function belongs to only one class
{
@@ -6496,6 +6502,7 @@ static void findDirDocumentation(Entry *root)
//printf("Match for with dir %s\n",matchingDir->name().data());
matchingDir->setBriefDescription(root->brief,root->briefFile,root->briefLine);
matchingDir->setDocumentation(root->doc,root->docFile,root->docLine);
+ addDirToGroups(root,matchingDir);
}
else
{
@@ -8284,14 +8291,14 @@ void parseInput()
msg("Freeing input...\n");
input.resize(0);
- msg("Building directory list...\n");
- buildDirectories();
- findDirDocumentation(root);
-
msg("Building group list...\n");
buildGroupList(root);
organizeSubGroups(root);
+ msg("Building directory list...\n");
+ buildDirectories();
+ findDirDocumentation(root);
+
msg("Building namespace list...\n");
buildNamespaceList(root);
findUsingDirectives(root);
diff --git a/src/filedef.cpp b/src/filedef.cpp
index fbadd59..32c0a5f 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -1110,4 +1110,9 @@ void FileDef::combineUsingRelations()
}
}
-
+bool FileDef::isDocumentationFile() const
+{
+ return name().right(4)==".doc" ||
+ name().right(4)==".txt" ||
+ name().right(4)==".dox";
+}
diff --git a/src/filedef.h b/src/filedef.h
index bceb878..2af7f94 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -156,6 +156,7 @@ class FileDef : public Definition
void addIncludedUsingDirectives();
void addListReferences();
+ bool isDocumentationFile() const;
//void generateXML(QTextStream &t);
//void generateXMLSection(QTextStream &t,MemberList *ml,const char *type);
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 5a032c2..7fdcd41 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -43,6 +43,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t,
namespaceList = new NamespaceList;
pageDict = new PageSDict(257);
exampleDict = new PageSDict(257);
+ dirList = new DirList;
allMemberList = new MemberList;
allMemberNameInfoSDict = new MemberNameInfoSDict(17);
if (refFileName)
@@ -86,6 +87,7 @@ GroupDef::~GroupDef()
delete allMemberList;
delete allMemberNameInfoSDict;
delete memberGroupSDict;
+ delete dirList;
}
void GroupDef::setGroupTitle( const char *t )
@@ -155,6 +157,14 @@ void GroupDef::addNamespace(const NamespaceDef *def)
namespaceList->append(def);
}
+void GroupDef::addDir(const DirDef *def)
+{
+ if (Config_getBool("SORT_BRIEF_DOCS"))
+ dirList->inSort(def);
+ else
+ dirList->append(def);
+}
+
void GroupDef::addPage(PageDef *def)
{
//printf("Making page %s part of a group\n",def->name.data());
@@ -516,7 +526,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
while (fd)
{
ol.startMemberItem(0);
- ol.docify("file ");
+ ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
@@ -599,6 +609,39 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.endMemberList();
}
+ // write list of directories
+ if (dirList->count()>0)
+ {
+ ol.startMemberHeader();
+ ol.parseText(theTranslator->trDirectories());
+ ol.endMemberHeader();
+ ol.startMemberList();
+ DirDef *dd=dirList->first();
+ while (dd)
+ {
+ ol.startMemberItem(0);
+ ol.parseText(theTranslator->trDir(FALSE,TRUE));
+ ol.insertMemberAlign();
+ ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
+ ol.endMemberItem();
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ {
+ Doxygen::tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>" << endl;
+ }
+ if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ {
+ ol.startMemberDescription();
+ ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE);
+ ol.endMemberDescription();
+ ol.newParagraph();
+ }
+ dd=dirList->next();
+ }
+
+ ol.endMemberList();
+ }
+
+
// write list of classes
classSDict->writeDeclaration(ol);
@@ -719,6 +762,24 @@ void addNamespaceToGroups(Entry *root,NamespaceDef *nd)
}
}
+void addDirToGroups(Entry *root,DirDef *dd)
+{
+ //printf("*** root->groups->count()=%d\n",root->groups->count());
+ QListIterator<Grouping> gli(*root->groups);
+ Grouping *g;
+ for (;(g=gli.current());++gli)
+ {
+ GroupDef *gd=0;
+ //printf("group `%s'\n",g->groupname.data());
+ if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict[g->groupname]))
+ {
+ gd->addDir(dd);
+ dd->makePartOfGroup(gd);
+ //printf("Dir %s: in group %s\n",dd->name().data(),g->groupname.data());
+ }
+ }
+}
+
void addGroupToGroups(Entry *root,GroupDef *subGroup)
{
QListIterator<Grouping> gli(*root->groups);
diff --git a/src/groupdef.h b/src/groupdef.h
index 879b2a2..86f4e7a 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -37,6 +37,8 @@ class MemberGroupSDict;
class MemberNameInfoSDict;
class PageSDict;
class PageDef;
+class DirDef;
+class DirList;
class GroupDef : public Definition
{
@@ -53,8 +55,9 @@ class GroupDef : public Definition
void addNamespace(const NamespaceDef *def);
void addGroup(const GroupDef *def);
void addParentGroup(const GroupDef *def);
- void addPage(PageDef *def); // pages in this group
- void addExample(const PageDef *def); // examples in this group
+ void addPage(PageDef *def);
+ void addExample(const PageDef *def);
+ void addDir(const DirDef *dd);
bool insertMember(MemberDef *def,bool docOnly=FALSE);
void removeMember(MemberDef *md);
bool containsGroup(const GroupDef *def); // true if def is already a subgroup
@@ -108,6 +111,7 @@ class GroupDef : public Definition
NamespaceList * getNamespaces() const { return namespaceList; }
GroupList * getSubGroups() const { return groupList; }
PageSDict * getPages() const { return pageDict; }
+ DirList * getDirs() const { return dirList; }
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
@@ -122,6 +126,7 @@ class GroupDef : public Definition
GroupList *groupList; // list of sub groups.
PageSDict *pageDict; // list of pages in the group
PageSDict *exampleDict; // list of examples in the group
+ DirList *dirList; // list of directories in the group
MemberList *allMemberList;
MemberNameInfoSDict *allMemberNameInfoSDict;
@@ -153,6 +158,7 @@ void addGroupToGroups(Entry *root,GroupDef *subGroup);
void addMemberToGroups(Entry *root,MemberDef *md);
void addPageToGroups(Entry *root,PageDef *pd);
void addExampleToGroups(Entry *root,PageDef *eg);
+void addDirToGroups(Entry *root,DirDef *dd);
#endif
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index dac75a1..53e2520 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1375,13 +1375,6 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,
t << fixSpaces(theTranslator->trModules());
endQuickIndexItem(t);
}
- if (Config_getBool("SHOW_DIRECTORIES") && documentedDirs>0)
- {
- startQuickIndexItem(t,"dirs"+Doxygen::htmlFileExtension,
- hli==HLI_Directories,compact,first,relPath);
- t << fixSpaces(theTranslator->trDirectories());
- endQuickIndexItem(t);
- }
if (documentedNamespaces>0)
{
startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
@@ -1417,6 +1410,13 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,
t << fixSpaces(theTranslator->trCompoundList());
endQuickIndexItem(t);
}
+ if (Config_getBool("SHOW_DIRECTORIES") && documentedDirs>0)
+ {
+ startQuickIndexItem(t,"dirs"+Doxygen::htmlFileExtension,
+ hli==HLI_Directories,compact,first,relPath);
+ t << fixSpaces(theTranslator->trDirectories());
+ endQuickIndexItem(t);
+ }
if (documentedHtmlFiles>0)
{
startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension,
diff --git a/src/index.cpp b/src/index.cpp
index 307ec64..d4d2fc4 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -696,13 +696,6 @@ void writeGraphicalClassHierarchy(OutputList &ol)
//----------------------------------------------------------------------------
-static bool nameIsOk(FileDef *fd)
-{
- return fd->name().right(4)!=".doc" &&
- fd->name().right(4)!=".txt" &&
- fd->name().right(4)!=".dox";
-}
-
void countFiles(int &htmlFiles,int &files)
{
htmlFiles=0;
@@ -717,7 +710,7 @@ void countFiles(int &htmlFiles,int &files)
{
bool doc = fd->isLinkableInProject();
bool src = fd->generateSourceFile();
- bool nameOk = nameIsOk(fd);
+ bool nameOk = !fd->isDocumentationFile();
if (nameOk)
{
if (doc || src)
@@ -823,7 +816,7 @@ void writeFileIndex(OutputList &ol)
//printf("Found filedef %s\n",fd->name().data());
bool doc = fd->isLinkableInProject();
bool src = fd->generateSourceFile();
- bool nameOk = nameIsOk(fd);
+ bool nameOk = !fd->isDocumentationFile();
if (nameOk && (doc || src) &&
!fd->isReference())
{
@@ -2870,13 +2863,13 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd,int level)
//printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
if (htmlHelp)
{
- htmlHelp->addContentsItem(isDir,dd->displayName(),dd->getOutputFileBase());
+ htmlHelp->addContentsItem(isDir,dd->shortName(),dd->getOutputFileBase());
htmlHelp->incContentsDepth();
}
if (ftvHelp)
{
ftvHelp->addContentsItem(isDir,dd->getReference(),dd->getOutputFileBase(),
- 0,dd->displayName());
+ 0,dd->shortName());
ftvHelp->incContentsDepth();
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 002352c..4d505f4 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -133,16 +133,26 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
while (a)
{
if (md->isDefine() || first) ol.startParameterType(first,md->isObjCMethod()?"dummy":0);
- QRegExp re(")(");
- int vp;
+ QRegExp re(")("),res("(.*\\*");
+ int vp=a->type.find(re);
+ int wp=a->type.find(res);
+
+ // use the following to put the function pointer type before the name
+ bool hasFuncPtrType=FALSE;
+
+ // or use the following to put the function pointer as it appears in
+ // the prototype.
+ // bool hasFuncPtrType=vp!=-1 && wp!=-1 && wp<vp;
+
if (!a->attrib.isEmpty() && !md->isObjCMethod()) // argument has an IDL attribute
{
ol.docify(a->attrib+" ");
}
- if ((vp=a->type.find(re))!=-1) // argument type is a function pointer
+ if (hasFuncPtrType) // argument type is a function pointer
{
//printf("a->type=`%s' a->name=`%s'\n",a->type.data(),a->name.data());
QCString n=a->type.left(vp);
+ if (hasFuncPtrType) n=a->type.left(wp);
if (md->isObjCMethod()) { n.prepend("("); n.append(")"); }
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md->name(),n);
@@ -162,9 +172,16 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
ol.endParameterType();
ol.startParameterName(defArgList->count()<2);
}
+ if (hasFuncPtrType)
+ {
+ ol.docify(a->type.mid(wp,vp-wp));
+ }
if (!a->name.isEmpty() || (a->name.isEmpty() && a->type=="...")) // argument has a name
{
- ol.docify(" ");
+ if (!hasFuncPtrType);
+ {
+ ol.docify(" ");
+ }
ol.disable(OutputGenerator::Man);
ol.startEmphasis();
ol.enable(OutputGenerator::Man);
@@ -177,8 +194,8 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
ol.docify(a->array);
}
- if (vp!=-1) // write the part of the argument type
- // that comes after the name
+ if (hasFuncPtrType) // write the part of the argument type
+ // that comes after the name
{
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),
md->name(),a->type.right(a->type.length()-vp));
@@ -405,6 +422,7 @@ MemberDef::MemberDef(const char *df,int dl,
m_cachedTypedefValue = 0;
m_inbodyLine = -1;
m_implOnly=FALSE;
+ groupMember = 0;
}
/*! Destroys the member definition. */
@@ -1783,6 +1801,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
writeSourceReffedBy(ol,cname);
writeInlineCode(ol,cname);
+ ol.endIndent();
+
if ((m_hasCallGraph || Config_getBool("CALL_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT")
)
@@ -1800,7 +1820,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
}
- ol.endIndent();
// enable LaTeX again
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
@@ -1976,6 +1995,8 @@ bool MemberDef::hasOneLineInitializer() const
bool MemberDef::hasMultiLineInitializer() const
{
+ //printf("initLines=%d userInitLines=%d maxInitLines=%d\n",
+ // initLines,userInitLines,maxInitLines);
return initLines>0 &&
((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
|| initLines<userInitLines // explicitly enabled
@@ -1984,6 +2005,7 @@ bool MemberDef::hasMultiLineInitializer() const
void MemberDef::setInitializer(const char *initializer)
{
+ //printf("setInitializer(%s)\n",initializer);
init=initializer;
int p=init.length()-1;
while (p>=0 && isspace((uchar)init.at(p))) p--;
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index e9ad1e1..5226660 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -76,7 +76,8 @@ void MemberList::countDecMembers()
m_funcCnt++,m_numDecMembers++;
break;
case MemberDef::Enumeration: m_enumCnt++,m_numDecMembers++; break;
- case MemberDef::EnumValue: m_enumValCnt++,m_numDecMembers++; break;
+ case MemberDef::EnumValue: //m_enumValCnt++,m_numDecMembers++;
+ break;
case MemberDef::Typedef: m_typeCnt++,m_numDecMembers++; break;
case MemberDef::Prototype: m_protoCnt++,m_numDecMembers++; break;
case MemberDef::Define: if (Config_getBool("EXTRACT_ALL") ||
@@ -92,7 +93,7 @@ void MemberList::countDecMembers()
}
}
}
- if (memberGroupList /*&& countSubGroups*/)
+ if (memberGroupList)
{
MemberGroupListIterator mgli(*memberGroupList);
MemberGroup *mg;
@@ -309,10 +310,10 @@ void MemberList::writeDeclarations(OutputList &ol,
const char *title,const char *subtitle
/*, bool inGroup,bool countSubGroups*/)
{
- //printf("MemberList::writeDeclaration(title=`%s',subtitle=`%s')\n",title,subtitle);
//printf("----- writeDeclaration() ----\n");
countDecMembers(); // count member not in group
if (numDecMembers()==0) return;
+ //printf("MemberList::writeDeclaration(title=`%s',subtitle=`%s')=%d\n",title,subtitle,numDecMembers());
if (title)
{
ol.startMemberHeader();
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index b11290f..ee4c48b 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -42,6 +42,7 @@ NamespaceDef::NamespaceDef(const char *df,int dl,
setReference(lref);
memberGroupSDict = new MemberGroupSDict;
memberGroupSDict->setAutoDelete(TRUE);
+ visited=FALSE;
}
NamespaceDef::~NamespaceDef()
diff --git a/src/pre.l b/src/pre.l
index 07e8d47..a01b06f 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1055,6 +1055,8 @@ static void readIncludeFile(const QCString &inc)
FileDef *oldFileDef = g_yyFileDef;
int oldLineNr = g_yyLineNr;
//printf("Searching for `%s'\n",incFileName.data());
+
+ // findFile will overwrite g_yyFileDef if found
if ((f=findFile(incFileName,localInclude))) // see if the include file can be found
{
//printf("Found include file!\n");
@@ -1627,7 +1629,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Include>[^\">\n]+[\">] {
g_incName+=yytext;
readIncludeFile(g_incName);
-
BEGIN(Start);
}
<DefName>{ID}/"(" {
diff --git a/src/scanner.l b/src/scanner.l
index 09b6b88..3260974 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -197,6 +197,7 @@ static void initParser()
autoGroupStack.setAutoDelete(TRUE);
lastDefGroup.groupname.resize(0);
insideFormula = FALSE;
+ insideCode=FALSE;
}
static void initEntry()
@@ -843,6 +844,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
%%
<*>\x06[^\x06]*\x06 { // new file
+ if (YY_START==Comment)
+ {
+ warn(yyFileName,yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
+ }
if (memberGroupId!=DOX_NOGROUP)
{
warn(yyFileName,yyLineNr,"Warning: Missing //@}");
@@ -1661,6 +1666,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
unput(';');
BEGIN(FindMembers);
}
+<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
+ current->name=yytext;
+ BEGIN(FindMembers);
+ }
<FindMembers,FindMemberName>{SCOPENAME} {
lineCount();
if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0)
@@ -2112,7 +2121,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
yyLineNr++;
}
<ReadInitializer>"@\"" {
- printf("insideCS=%d\n",insideCS);
+ //printf("insideCS=%d\n",insideCS);
current->initializer+=yytext;
if (!insideCS && !insideObjC)
{
@@ -2273,7 +2282,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->section = Entry::VARIABLE_SEC ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
- //printf("New variable type=`%s' name=`%s' groupId=%d\n",current->type.data(),current->name.data(),current->mGrpId);
current_root->addSubEntry( current ) ;
}
if ( *yytext == ',')
@@ -2962,6 +2970,12 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<CopyArgCommentLine>. { fullArgString+=*yytext; }
<CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; }
<CopyArgComment>. { fullArgString+=*yytext; }
+<CopyArgComment>{CMD}("brief"|"short"){B}+ {
+ warn(yyFileName,yyLineNr,
+ "Warning: Ignoring %cbrief command inside argument documentation",*yytext
+ );
+ fullArgString+=' ';
+ }
<ReadTempArgs>"<" {
*copyArgString+=*yytext;
fullArgString+=*yytext;
@@ -3103,8 +3117,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
BEGIN(SkipCPP);
}
<FuncQual>"=" { // typically an initialized function pointer
- current->args += *yytext;
- BEGIN(FuncPtrInit);
+ //current->args += *yytext;
+ //BEGIN(FuncPtrInit);
+ lastInitializerContext=YY_START;
+ BEGIN(ReadInitializer);
}
<FuncPtrInit>[{;] {
unput(*yytext);
@@ -4265,7 +4281,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->startLine = yyLineNr;
BEGIN( ExampleDocArg1 );
}
-<Doc>{B}*{CMD}"details"{B}+ { /* nop */
+<ClassDoc,PageDoc,Doc,JavaDoc>{B}*{CMD}"details"{B}+ { /* nop */
}
<LineDoc>{CMD}"name"[^\n]*\n {
lastDefGroup.groupname.resize(0);
@@ -5988,6 +6004,10 @@ void parseMain(Entry *rt)
scanYYrestart( scanYYin );
BEGIN( FindMembers );
scanYYlex();
+ if (YY_START==Comment)
+ {
+ warn(yyFileName,yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
+ }
forceEndGroup();
diff --git a/src/search_php.h b/src/search_php.h
index 337662c..ffd152a 100644
--- a/src/search_php.h
+++ b/src/search_php.h
@@ -1,4 +1,3 @@
-"<?\n"
"function readInt($file)\n"
"{\n"
" $b1 = ord(fgetc($file)); $b2 = ord(fgetc($file));\n"
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 5716cc9..b629373 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -132,6 +132,7 @@ class TagGroupInfo
QStringList namespaceList;
QStringList fileList;
QStringList pageList;
+ QStringList dirList;
};
/*! Container for page specific info that can be read from a tagfile */
@@ -144,6 +145,17 @@ class TagPageInfo
QStrList docAnchors;
};
+/*! Container for directory specific info that can be read from a tagfile */
+class TagDirInfo
+{
+ public:
+ QString name;
+ QString filename;
+ QString path;
+ QStringList subdirList;
+ QStringList fileList;
+ QStrList docAnchors;
+};
/*! Tag file parser.
* Reads an XML-structured tagfile and builds up the structure in
@@ -160,6 +172,7 @@ class TagFileParser : public QXmlDefaultHandler
InPage,
InMember,
InPackage,
+ InDir,
InTempArgList
};
class StartElementHandler
@@ -264,6 +277,11 @@ class TagFileParser : public QXmlDefaultHandler
m_curPackage = new TagPackageInfo;
m_state = InPackage;
}
+ else if (kind=="dir")
+ {
+ m_curDir = new TagDirInfo;
+ m_state = InDir;
+ }
else
{
err("Error: Unknown compound attribute `%s' found!\n",kind.data());
@@ -287,6 +305,8 @@ class TagFileParser : public QXmlDefaultHandler
m_curGroup=0; break;
case InPage: m_tagFilePages.append(m_curPage);
m_curPage=0; break;
+ case InDir: m_tagFileDirs.append(m_curDir);
+ m_curDir=0; break;
case InPackage: m_tagFilePackages.append(m_curPackage);
m_curPackage=0; break;
default:
@@ -351,6 +371,7 @@ class TagFileParser : public QXmlDefaultHandler
case InPage: m_curPage->docAnchors.append(m_curString); break;
case InMember: m_curMember->docAnchors.append(m_curString); break;
case InPackage: m_curPackage->docAnchors.append(m_curString); break;
+ case InDir: m_curDir->docAnchors.append(m_curString); break;
default: err("Error: Unexpected tag `member' found\n"); break;
}
}
@@ -379,6 +400,7 @@ class TagFileParser : public QXmlDefaultHandler
switch(m_state)
{
case InGroup: m_curGroup->fileList.append(m_curString); break;
+ case InDir: m_curDir->fileList.append(m_curString); break;
default: err("Error: Unexpected tag `file' found\n"); break;
}
}
@@ -390,6 +412,14 @@ class TagFileParser : public QXmlDefaultHandler
default: err("Error: Unexpected tag `page' found\n"); break;
}
}
+ void endDir()
+ {
+ switch(m_state)
+ {
+ case InDir: m_curDir->subdirList.append(m_curString); break;
+ default: err("Error: Unexpected tag `page' found\n"); break;
+ }
+ }
void startStringValue(const QXmlAttributes& )
{
m_curString = "";
@@ -414,6 +444,7 @@ class TagFileParser : public QXmlDefaultHandler
case InNamespace: m_curNamespace->name = m_curString; break;
case InGroup: m_curGroup->name = m_curString; break;
case InPage: m_curPage->name = m_curString; break;
+ case InDir: m_curDir->name = m_curString; break;
case InMember: m_curMember->name = m_curString; break;
case InPackage: m_curPackage->name = m_curString; break;
default: err("Error: Unexpected tag `name' found\n"); break;
@@ -510,6 +541,7 @@ class TagFileParser : public QXmlDefaultHandler
case InGroup: m_curGroup->filename = m_curString; break;
case InPage: m_curPage->filename = m_curString; break;
case InPackage: m_curPackage->filename = m_curString; break;
+ case InDir: m_curDir->filename = m_curString; break;
default: err("Error: Unexpected tag `filename' found\n"); break;
}
}
@@ -518,6 +550,7 @@ class TagFileParser : public QXmlDefaultHandler
switch (m_state)
{
case InFile: m_curFile->path = m_curString; break;
+ case InDir: m_curDir->path = m_curString; break;
default: err("Error: Unexpected tag `path' found\n"); break;
}
}
@@ -580,6 +613,7 @@ class TagFileParser : public QXmlDefaultHandler
m_curGroup=0;
m_curPage=0;
m_curPackage=0;
+ m_curDir=0;
m_stateStack.setAutoDelete(TRUE);
m_tagFileClasses.setAutoDelete(TRUE);
@@ -588,6 +622,7 @@ class TagFileParser : public QXmlDefaultHandler
m_tagFileGroups.setAutoDelete(TRUE);
m_tagFilePages.setAutoDelete(TRUE);
m_tagFilePackages.setAutoDelete(TRUE);
+ m_tagFileDirs.setAutoDelete(TRUE);
m_startElementHandlers.insert("compound", new StartElementHandler(this,&TagFileParser::startCompound));
m_startElementHandlers.insert("member", new StartElementHandler(this,&TagFileParser::startMember));
@@ -603,6 +638,7 @@ class TagFileParser : public QXmlDefaultHandler
m_startElementHandlers.insert("class", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("namespace", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("file", new StartElementHandler(this,&TagFileParser::startStringValue));
+ m_startElementHandlers.insert("dir", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("page", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("docanchor", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("tagfile", new StartElementHandler(this,&TagFileParser::startIgnoreElement));
@@ -623,6 +659,7 @@ class TagFileParser : public QXmlDefaultHandler
m_endElementHandlers.insert("class" , new EndElementHandler(this,&TagFileParser::endClass));
m_endElementHandlers.insert("namespace", new EndElementHandler(this,&TagFileParser::endNamespace));
m_endElementHandlers.insert("file", new EndElementHandler(this,&TagFileParser::endFile));
+ m_endElementHandlers.insert("dir", new EndElementHandler(this,&TagFileParser::endDir));
m_endElementHandlers.insert("page", new EndElementHandler(this,&TagFileParser::endPage));
m_endElementHandlers.insert("docanchor", new EndElementHandler(this,&TagFileParser::endDocAnchor));
m_endElementHandlers.insert("tagfile", new EndElementHandler(this,&TagFileParser::endIgnoreElement));
@@ -678,6 +715,7 @@ class TagFileParser : public QXmlDefaultHandler
QList<TagGroupInfo> m_tagFileGroups;
QList<TagPageInfo> m_tagFilePages;
QList<TagPackageInfo> m_tagFilePackages;
+ QList<TagDirInfo> m_tagFileDirs;
QDict<StartElementHandler> m_startElementHandlers;
QDict<EndElementHandler> m_endElementHandlers;
TagClassInfo *m_curClass;
@@ -686,6 +724,7 @@ class TagFileParser : public QXmlDefaultHandler
TagPackageInfo *m_curPackage;
TagGroupInfo *m_curGroup;
TagPageInfo *m_curPage;
+ TagDirInfo *m_curDir;
TagMemberInfo *m_curMember;
TagIncludeInfo *m_curIncludes;
QCString m_curString;
@@ -872,6 +911,25 @@ void TagFileParser::dump()
msg(" title `%s'\n",pd->title.data());
msg(" filename `%s'\n",pd->filename.data());
}
+ //============== DIRS
+ QListIterator<TagDirInfo> ldi(m_tagFileDirs);
+ TagDirInfo *dd;
+ for (;(dd=ldi.current());++ldi)
+ {
+ msg("dir `%s'\n",dd->name.data());
+ msg(" path `%s'\n",dd->path.data());
+ QStringList::Iterator it;
+ for ( it = dd->fileList.begin();
+ it != dd->fileList.end(); ++it )
+ {
+ msg( " file: %s \n", (*it).latin1() );
+ }
+ for ( it = dd->subdirList.begin();
+ it != dd->subdirList.end(); ++it )
+ {
+ msg( " subdir: %s \n", (*it).latin1() );
+ }
+ }
}
void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
diff --git a/src/translator_cn.h b/src/translator_cn.h
index def8228..7cefc71 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -24,7 +24,7 @@
*/
#define CN_SPC
-class TranslatorChinese : public TranslatorAdapter_1_3_9
+class TranslatorChinese : public Translator
{
public:
/*! Used for identification of the language. The identification
@@ -1482,6 +1482,69 @@ class TranslatorChinese : public TranslatorAdapter_1_3_9
/* return filename + " Source File"; */
return filename + CN_SPC"Ô´Îļþ";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ /* { return "Directory Hierarchy"; } */
+ {
+ return "$(BL\\¼½á$(DC((B";
+ }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ /* { return "Directory Documentation"; } */
+ {
+ return "$(BL\\¼J8[c(B";
+ }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ /* { return "Directories"; } */
+ {
+ return "$(BL\\¼(B";
+ }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+/* { return "This directory hierarchy is sorted roughly, " */
+/* "but not completely, alphabetically:"; */
+/* } */
+ {
+ return "$(BL\\¼½á$(DC(½ö¾­¹ý$(BBgCWE*GSNs!$VuL$40A40D;zJl˳=x(B";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ /* { QCString result=dirName; result+=" Directory Reference"; return result; } */
+ {
+ QCString result=dirName;
+ result+=CN_SPC"$(BL\\¼;29M(B";
+ return result;
+ }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool, bool)
+ {
+ /* QCString result((first_capital ? "Director" : "director")); */
+ /* if (singular) result+="y"; else result+="ies"; */
+ /* return result; */
+ return "$(BL\\¼(B";
+ }
};
diff --git a/src/translator_cz.h b/src/translator_cz.h
index 79f0945..f48a32c 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -130,6 +130,7 @@
// 2004/02/26 - trLegendDocs() updated.
// 2004/02/27 - Text inside the trCallGraph() corrected.
// 2004/06/16 - The new method "since 1.3.8" implemented.
+// 2004/09/14 - The new methods "since 1.3.9" implemented.
// Todo
// ----
@@ -149,7 +150,7 @@
// Windows version. The version which does not call the function is
// probably slightly faster.
-class TranslatorCzech : public TranslatorAdapter_1_3_9
+class TranslatorCzech : public Translator
{
private:
/*! The decode() inline assumes the source written in the
@@ -1673,6 +1674,59 @@ class TranslatorCzech : public TranslatorAdapter_1_3_9
return decode("Zdrojový soubor ") + filename;
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return decode("Hierarchie adresáøù"); }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return decode("Dokumentace k adresáøùm"); }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return decode("Adresáøe"); }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ {
+ return decode("Následující hierarchie adresáøù je zhruba, "
+ "ale ne úplnì, øazena podle abecedy:");
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ {
+ QCString result = "Reference k adresáøi ";
+ result += dirName;
+ return decode(result);
+ }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Adresáø" : "adresáø"));
+ if ( ! singular)
+ result += "e";
+ return decode(result);
+ }
};
#endif // TRANSLATOR_CZ_H
diff --git a/src/translator_de.h b/src/translator_de.h
index 1f7d995..20b7ffe 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -87,13 +87,22 @@
// 2004/08/01 Jens Seidel (jensseidel@users.sourceforge.net)
// - Updated for "new since 1.3.8" version
//
+// 2004/09/19 Jens Seidel (jensseidel@users.sourceforge.net)
+// - Updated for "new since 1.3.9" version
+//
+// 2004/09/25 Jens Seidel (jensseidel@users.sourceforge.net)
+// - changed "Typendefinitionen" to "Typdefinitionen" in
+// trFileMembersDescription() and trTypedefs()
+// - added a dash after (file, ...) names and in front of description
+// - changed "Eigenschaften" to "Propertys" (yeah, not ..."ies")
+//
// Todo:
// - see FIXME
#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H
-class TranslatorGerman : public TranslatorAdapter_1_3_9
+class TranslatorGerman : public Translator
{
public:
@@ -341,7 +350,7 @@ class TranslatorGerman : public TranslatorAdapter_1_3_9
if (!extractAll) result+="dokumentierten ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- result+="Funktionen, Variablen, Makros, Aufzählungen und Typendefinitionen";
+ result+="Funktionen, Variablen, Makros, Aufzählungen und Typdefinitionen";
}
else
{
@@ -471,7 +480,7 @@ class TranslatorGerman : public TranslatorAdapter_1_3_9
* list of typedefs
*/
virtual QCString trTypedefs()
- { return "Typendefinitionen"; }
+ { return "Typdefinitionen"; }
/*! This is used in the documentation of a file as a header before the
* list of enumerations
@@ -685,7 +694,7 @@ class TranslatorGerman : public TranslatorAdapter_1_3_9
virtual QCString trFileReference(const char *fileName)
{
QCString result=fileName;
- result+=" Dateireferenz";
+ result+="-Dateireferenz";
return result;
}
@@ -693,7 +702,7 @@ class TranslatorGerman : public TranslatorAdapter_1_3_9
virtual QCString trNamespaceReference(const char *namespaceName)
{
QCString result=namespaceName;
- result+=" Namensbereichsreferenz";
+ result+="-Namensbereichsreferenz";
return result;
}
@@ -1214,13 +1223,13 @@ class TranslatorGerman : public TranslatorAdapter_1_3_9
/*! Used as a section header for IDL properties */
virtual QCString trProperties()
{
- return "Eigenschaften";
+ return "Propertys";
}
/*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
{
- return "Dokumentation der Eigenschaften";
+ return "Dokumentation der Propertys";
}
//////////////////////////////////////////////////////////////////////////
@@ -1619,6 +1628,52 @@ class TranslatorGerman : public TranslatorAdapter_1_3_9
return filename + " Quellcode";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Verzeichnishierarchie"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Verzeichnisdokumentation"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Verzeichnisse"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Diese Verzeichnishierarchie ist -mit Einschränkungen- "
+ "alphabetisch sortiert:";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result=dirName; result+=" Verzeichnisreferenz"; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool, bool singular)
+ {
+ QCString result("Verzeichnis");
+ if (!singular) result+="se";
+ return result;
+ }
+
};
#endif
diff --git a/src/translator_es.h b/src/translator_es.h
index 06bb493..d6f4b48 100644
--- a/src/translator_es.h
+++ b/src/translator_es.h
@@ -359,7 +359,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_3_8
* for the author section in man pages. */
virtual QCString trAuthor(bool first_capital, bool singular)
{
- QCString result((first_capital ? "Author" : "author"));
+ QCString result((first_capital ? "Autor" : "autor"));
if (!singular) result+="s";
return result;
}
diff --git a/src/translator_hr.h b/src/translator_hr.h
index 0227f4f..ae2be0c 100644
--- a/src/translator_hr.h
+++ b/src/translator_hr.h
@@ -55,11 +55,14 @@
//
// 2004/06/21
// - Added strings for 1.3.8
+//
+// 2004/09/15
+// - Added strings for 1.3.9
#ifndef TRANSLATOR_HR_H
#define TRANSLATOR_HR_H
-class TranslatorCroatian : public TranslatorAdapter_1_3_9
+class TranslatorCroatian : public Translator
{
private:
/*! to avoid macro redefinition from translator_cz.h */
@@ -1226,6 +1229,51 @@ class TranslatorCroatian : public TranslatorAdapter_1_3_9
return "Izvorni kod datoteke " + filename;
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Stablo direktorija"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Dokumentacija direktorija"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Direktoriji"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Stablo direktorija sortirano abecednim redom:"; }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result= "Opis direktorija "; result += dirName; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Direktorij" : "direktorij"));
+ if (!singular) result+="i";
+ return result;
+ }
};
#endif
+
+
diff --git a/src/translator_hu.h b/src/translator_hu.h
index 77c5b33..477a1d2 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -29,7 +29,7 @@
#ifndef TRANSLATOR_HU_H
#define TRANSLATOR_HU_H
-class TranslatorHungarian : public TranslatorAdapter_1_3_9
+class TranslatorHungarian : public Translator
{
private:
const char * zed(char c)
@@ -1526,6 +1526,52 @@ class TranslatorHungarian : public TranslatorAdapter_1_3_9
return filename + " Forrásfájl";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Könyvtárhierarchia"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Könyvtárak dokumentációja"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Könyvtárak"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Majdnem (de nem teljesen) betûrendbe szedett "
+ "könyvtárhierarchia:";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result=dirName; result+=" könyvtárreferencia"; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool /*singular*/)
+ {
+ QCString result((first_capital ? "Könyvtár" : "könyvtár"));
+ //if (singular) result+="y"; else result+="ies";
+ return result;
+ }
+
};
#endif
diff --git a/src/translator_it.h b/src/translator_it.h
index 9e319c6..8159aa8 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -19,6 +19,7 @@
*
* Revision history
*
+ * 2004/09: translated new items used since version 1.3.9
* 2004/06: translated new items used since version 1.3.8
* 2003/11: translated new items used since version 1.3.3
* 2003/06: translated new items used since version 1.3.1
@@ -71,7 +72,7 @@
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
-class TranslatorItalian : public TranslatorAdapter_1_3_9
+class TranslatorItalian : public Translator
{
public:
@@ -1516,6 +1517,51 @@ class TranslatorItalian : public TranslatorAdapter_1_3_9
return " File sorgente " + filename ;
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Gerarchia delle directory"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Documentazione delle directory"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Directory"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Questa gerarchia di directory è ordinata "
+ "approssimativamente, ma non completamente, in ordine alfabetico:";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result="Riferimenti per la directory "; result+=dirName; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool)
+ {
+ QCString result((first_capital ? "Directory" : "directory"));
+ return result;
+ }
+
};
#endif
diff --git a/src/translator_pl.h b/src/translator_pl.h
index 3186ead..f8bab5f 100644
--- a/src/translator_pl.h
+++ b/src/translator_pl.h
@@ -13,14 +13,14 @@
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
- * Polish translation was updated to version 1.3.8 by
+ * Polish translation was updated to version 1.3.9 by
* Piotr Kaminski (Piotr.Kaminski@ctm.gdynia.pl)
*/
#ifndef TRANSLATOR_PL_H
#define TRANSLATOR_PL_H
-class TranslatorPolish : public TranslatorAdapter_1_3_9
+class TranslatorPolish : public Translator
{
private:
/*! to avoid macro redefinition from translator_pl.h */
@@ -1511,7 +1511,51 @@ class TranslatorPolish : public TranslatorAdapter_1_3_9
return "Plik ¼ród³owy " + filename;
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Struktura katalogów"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Dokumentacja katalogów"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Katalogi"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Ta struktura katalogów jest posortowana jest z grubsza, "
+ "choæ nie ca³kowicie, alfabetycznie:";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result="Dokumentacja katalogu "; result+=dirName; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Katalog" : "katalog"));
+ if (! singular) result+="i";
+ return result;
+ }
};
#endif
diff --git a/src/translator_ru.h b/src/translator_ru.h
index 4a40459..b431953 100644
--- a/src/translator_ru.h
+++ b/src/translator_ru.h
@@ -18,7 +18,7 @@
*
* Nickolay Semyonov
* Andrey V. Stolyarov released Feb 14, 2001
- * Alexandr V. Chelpanov <cav@cryptopro.ru> released Jun 16, 2004
+ * Alexandr V. Chelpanov <cav@cryptopro.ru> released Sep 25, 2004
*
* ðÒÉ ÐÅÒÅ×ÏÄÅ ÚÁÇÏÌÏ×ËÏ× ÓÌÏ×Á list É documentation ÕÂÒÁÎÙ.
*
@@ -49,7 +49,7 @@
#ifndef TRANSLATOR_RU_H
#define TRANSLATOR_RU_H
-class TranslatorRussian : public TranslatorAdapter_1_3_9
+class TranslatorRussian : public Translator
{
private:
/*! The Decode() inline assumes the source written in the
@@ -1570,7 +1570,51 @@ class TranslatorRussian : public TranslatorAdapter_1_3_9
*/
virtual QCString trSourceFile(QCString& filename)
{
- return "éÓÈÏÄÎÙÊ ÆÁÊÌ " + filename;
+ return decode( "éÓÈÏÄÎÙÊ ÆÁÊÌ " + filename );
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return decode( "äÅÒÅ×Ï ÄÉÒÅËÔÏÒÉÊ" ); }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return decode( "äÉÒÅËÔÏÒÉÉ" ); }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return decode( "áÌÆÁ×ÉÔÎÙÊ ÕËÁÚÁÔÅÌØ ÄÉÒÅËÔÏÒÉÊ" ); }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return decode( "äÅÒÅ×Ï ÄÉÒÅËÔÏÒÉÊ" ); }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result=QCString("óÏÄÅÒÖÁÎÉÅ ÄÉÒÅËÔÏÒÉÉ ")+ dirName; return decode( result ); }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "äÉÒÅËÔÏÒÉ" : "ÄÉÒÅËÔÏÒÉ"));
+ if (singular) result+="Ñ"; else result+="É";
+ return decode( result );
}
};
diff --git a/src/translator_se.h b/src/translator_se.h
index 0d3866f..1307b90 100644
--- a/src/translator_se.h
+++ b/src/translator_se.h
@@ -69,7 +69,7 @@ Problem!
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
-class TranslatorSwedish : public TranslatorAdapter_1_3_8
+class TranslatorSwedish : public Translator
{
public:
@@ -1401,6 +1401,65 @@ class TranslatorSwedish : public TranslatorAdapter_1_3_8
return "Träffar:";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return "Källkodsfilen " + filename;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Katalogstruktur"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Katalogdokumentation"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Kataloger"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Den här katalogen är grovt sorterad, "
+ "men inte helt, i alfabetisk ordning:";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result=dirName; result+=" Katalogreferens"; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Katalog" : "katalog"));
+ if (!singular) result+="er";
+ return result;
+ }
+
+
+
};
#endif
diff --git a/src/util.cpp b/src/util.cpp
index 1d592d4..fba7edb 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1041,6 +1041,19 @@ ClassDef *getResolvedClassRec(Definition *scope,
// scope, the name to search for and the explicit scope prefix. The speedup
// achieved by this simple cache can be enormous.
QCString key=scope->name()+"+"+name+"+"+explicitScopePart;
+ // if a file scope is given and it contains using statements we should
+ // also use the file part in the key (as a class name can be in
+ // two different namespaces and a using statement in a file can select
+ // one of them).
+ if (fileScope && ((fileScope->getUsedNamespaces() &&
+ fileScope->getUsedNamespaces()->count()>0) ||
+ (fileScope->getUsedClasses() &&
+ fileScope->getUsedClasses()->count()>0))
+ )
+ {
+ key+="+"+fileScope->name();
+ }
+
LookupInfo *pval=Doxygen::lookupCache.find(key);
//printf("Searching for %s result=%p\n",key.data(),pval);
if (pval)
@@ -1080,6 +1093,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
g_visitedNamespaces.clear();
// test accessibility of definition within scope.
int distance = isAccessibleFromWithExpScope(scope,fileScope,d,explicitScopePart);
+ //printf("distance %s is %d\n",d->name().data(),distance);
if (distance!=-1) // definition is accessible
{
// see if we are dealing with a class or a typedef
@@ -1092,6 +1106,26 @@ ClassDef *getResolvedClassRec(Definition *scope,
bestTypedef = 0;
bestTemplSpec.resize(0);
}
+ else if (distance==minDistance &&
+ fileScope &&
+ fileScope->getUsedNamespaces() &&
+ d->getOuterScope()->definitionType()==Definition::TypeNamespace &&
+ bestMatch->getOuterScope()==Doxygen::globalScope
+ )
+ {
+ // in case the distance is equal it could be that a class X
+ // is defined in a namespace and in the global scope. When searched
+ // in the global scope the distance is 0 in both cases. We have
+ // to choose one of the definitions: we choose the one in the
+ // namespace if the fileScope imports namespaces and the definition
+ // found was in a namespace while the best match so far isn't.
+ // Just a non-perfect heuristic but it could help in some situations
+ // (kdecore code is an example).
+ minDistance=distance;
+ bestMatch = (ClassDef *)d;
+ bestTypedef = 0;
+ bestTemplSpec.resize(0);
+ }
}
else if (d->definitionType()==Definition::TypeMember)
{
@@ -1930,7 +1964,7 @@ static QCString trimTemplateSpecifiers(
}
//printf("result=%s\n",result.data());
- return result;
+ return result.stripWhiteSpace();
}
/*!
@@ -2120,6 +2154,36 @@ static void trimNamespaceScope(QCString &t1,QCString &t2,const QCString &nsName)
}
#endif
+static void stripIrrelevantString(QCString &target,const QCString &str)
+{
+ if (target==str) { target.resize(0); return; }
+ int i,p=0;
+ int l=str.length();
+ while ((i=target.find(str,p))!=-1)
+ {
+ bool isMatch = (i==0 || !isId(target.at(i-1))) && // not a character before str
+ (i+l==(int)target.length() || !isId(target.at(i+l))); // not a character after str
+ if (isMatch)
+ {
+ int i1=target.find('*',i+l);
+ int i2=target.find('&',i+l);
+ if (i1==-1 && i2==-1)
+ {
+ // strip str from target at index i
+ target=target.left(i)+target.right(target.length()-i-l);
+ i-=l;
+ }
+ else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2)) // str before * or &
+ {
+ // move str to front
+ target=str+" "+target.left(i)+target.right(target.length()-i-l);
+ i++;
+ }
+ }
+ p = i+l;
+ }
+}
+
/*! According to the C++ spec and Ivan Vecerina:
Parameter declarations that differ only in the presence or absence
@@ -2138,53 +2202,8 @@ static void trimNamespaceScope(QCString &t1,QCString &t2,const QCString &nsName)
void stripIrrelevantConstVolatile(QCString &s)
{
//printf("stripIrrelevantConstVolatile(%s)=",s.data());
- int i;
- if (s=="const") { s.resize(0); return; }
- if (s=="volatile") { s.resize(0); return; }
-
- // strip occurrences of const
- int constLen=5+1;
- i = s.find("const ");
- if (i==-1 && s.right(5)=="const") { i=s.length()-5;constLen=5; }
- while (i!=-1)
- {
- // no & or * after the const
- int i1=s.find('*',i+constLen);
- int i2=s.find('&',i+constLen);
- if (i1==-1 && i2==-1)
- {
- s=s.left(i)+s.right(s.length()-i-constLen);
- i-=constLen;
- }
- else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2)) // const before * or &
- {
- // move const to front
- s=(QCString)"const "+s.left(i)+s.right(s.length()-i-constLen);
- }
- i = s.find("const ",i+constLen);
- }
-
- // strip occurrences of volatile
- int volatileLen=8+1;
- i = s.find("volatile ");
- if (i==-1 && s.right(8)=="volatile") { i=s.length()-8;constLen=8; }
- while (i!=-1)
- {
- // no & or * after the volatile
- int i1=s.find('*',i+volatileLen);
- int i2=s.find('&',i+volatileLen);
- if (i1==-1 && i2==-1)
- {
- s=s.left(i)+s.right(s.length()-i-volatileLen);
- i-=volatileLen;
- }
- else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2)) // volatile before * or &
- {
- // move volatile to front
- s=(QCString)"volatile "+s.left(i)+s.right(s.length()-i-volatileLen);
- }
- i = s.find("volatile ",i+volatileLen);
- }
+ stripIrrelevantString(s,"const");
+ stripIrrelevantString(s,"volatile");
//printf("%s\n",s.data());
}
@@ -2201,7 +2220,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
NamespaceSDict *usingNamespaces,
SDict<Definition> *usingClasses)
{
- //printf("match argument start %s:%s <-> %s:%s using nsp=%p class=%p\n",
+ //printf("match argument start `%s|%s' <-> `%s|%s' using nsp=%p class=%p\n",
// srcA->type.data(),srcA->name.data(),
// dstA->type.data(),dstA->name.data(),
// usingNamespaces,
@@ -2214,6 +2233,8 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
QCString srcAType=trimTemplateSpecifiers(namespaceName,className,srcA->type);
QCString dstAType=trimTemplateSpecifiers(namespaceName,className,dstA->type);
+ QCString srcAName=srcA->name.stripWhiteSpace();
+ QCString dstAName=dstA->name.stripWhiteSpace();
if (srcAType.left(6)=="class ") srcAType=srcAType.right(srcAType.length()-6);
if (dstAType.left(6)=="class ") dstAType=dstAType.right(dstAType.length()-6);
@@ -2221,23 +2242,25 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
// from a syntactic point of view they would be two names of the same
// type "const". This is not fool prove ofcourse, but should at least
// catch the most common cases.
- if ((srcAType=="const" || srcAType=="volatile") && !srcA->name.isEmpty())
+ if ((srcAType=="const" || srcAType=="volatile") && !srcAName.isEmpty())
{
srcAType+=" ";
- srcAType+=srcA->name;
+ srcAType+=srcAName;
}
- if ((dstAType=="const" || dstAType=="volatile") && !dstA->name.isEmpty())
+ if ((dstAType=="const" || dstAType=="volatile") && !dstAName.isEmpty())
{
dstAType+=" ";
- dstAType+=dstA->name;
+ dstAType+=dstAName;
}
- if (srcA->name=="const" || srcA->name=="volatile")
+ if (srcAName=="const" || srcAName=="volatile")
{
- srcAType+=srcA->name;
+ srcAType+=srcAName;
+ srcAName.resize(0);
}
- if (dstA->name=="const" || dstA->name=="volatile")
+ else if (dstA->name=="const" || dstA->name=="volatile")
{
dstAType+=dstA->name;
+ dstAName.resize(0);
}
stripIrrelevantConstVolatile(srcAType);
@@ -2260,8 +2283,8 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
//srcAType=stripTemplateSpecifiersFromScope(srcAType,FALSE);
//dstAType=stripTemplateSpecifiersFromScope(dstAType,FALSE);
- //printf("srcA=%s|%s dstA=%s|%s\n",srcAType.data(),srcA->name.data(),
- // dstAType.data(),dstA->name.data());
+ //printf("srcA=`%s|%s' dstA=`%s|%s'\n",srcAType.data(),srcAName.data(),
+ // dstAType.data(),dstAName.data());
if (srcA->array!=dstA->array) // nomatch for char[] against char
{
@@ -2326,17 +2349,17 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
}
}
- //printf("2. srcA=%s|%s dstA=%s|%s\n",srcAType.data(),srcA->name.data(),
- // dstAType.data(),dstA->name.data());
+ //printf("2. srcA=%s|%s dstA=%s|%s\n",srcAType.data(),srcAName.data(),
+ // dstAType.data(),dstAName.data());
- if (!srcA->name.isEmpty() && !dstA->type.isEmpty() &&
- (srcAType+" "+srcA->name)==dstAType)
+ if (!srcAName.isEmpty() && !dstA->type.isEmpty() &&
+ (srcAType+" "+srcAName)==dstAType)
{
MATCH
return TRUE;
}
- else if (!dstA->name.isEmpty() && !srcA->type.isEmpty() &&
- (dstAType+" "+dstA->name)==srcAType)
+ else if (!dstAName.isEmpty() && !srcA->type.isEmpty() &&
+ (dstAType+" "+dstAName)==srcAType)
{
MATCH
return TRUE;
@@ -2365,7 +2388,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
{
//printf("partial match srcPos=%d dstPos=%d!\n",srcPos,dstPos);
// check if a name if already found -> if no then there is no match
- if (!srcA->name.isEmpty() || !dstA->name.isEmpty())
+ if (!srcAName.isEmpty() || !dstAName.isEmpty())
{
NOMATCH
return FALSE;
@@ -2404,7 +2427,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
{
if (!isspace((uchar)dstAType.at(dstPos))) // maybe the names differ
{
- if (!dstA->name.isEmpty()) // dst has its name separated from its type
+ if (!dstAName.isEmpty()) // dst has its name separated from its type
{
NOMATCH
return FALSE;
@@ -2420,7 +2443,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
{
dstPos++;
while (dstPos<dstAType.length() && isId(dstAType.at(dstPos))) dstPos++;
- if (dstPos!=dstAType.length() || !srcA->name.isEmpty())
+ if (dstPos!=dstAType.length() || !srcAName.isEmpty())
{
NOMATCH
return FALSE; // nope not a name -> no match
@@ -2431,7 +2454,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
{
if (!isspace((uchar)srcAType.at(srcPos))) // maybe the names differ
{
- if (!srcA->name.isEmpty()) // src has its name separated from its type
+ if (!srcAName.isEmpty()) // src has its name separated from its type
{
NOMATCH
return FALSE;
@@ -2447,7 +2470,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
{
srcPos++;
while (srcPos<srcAType.length() && isId(srcAType.at(srcPos))) srcPos++;
- if (srcPos!=srcAType.length() || !dstA->name.isEmpty())
+ if (srcPos!=srcAType.length() || !dstAName.isEmpty())
{
NOMATCH
return FALSE; // nope not a name -> no match
@@ -2588,6 +2611,20 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
//printf("Defval changing `%s'->`%s'\n",dstA->defval.data(),srcA->defval.data());
dstA->defval=srcA->defval.copy();
}
+
+ // fix wrongly detected const or volatile specificiers before merging.
+ // example: "const A *const" is detected as type="const A *" name="const"
+ if (srcA->name=="const" || srcA->name=="volatile")
+ {
+ srcA->type+=" "+srcA->name;
+ srcA->name.resize(0);
+ }
+ if (dstA->name=="const" || dstA->name=="volatile")
+ {
+ dstA->type+=" "+dstA->name;
+ dstA->name.resize(0);
+ }
+
if (srcA->type==dstA->type)
{
if (srcA->name.isEmpty() && !dstA->name.isEmpty())
@@ -2671,8 +2708,11 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
{
dstA->docs = srcA->docs.copy();
}
+ //printf("Merge argument `%s|%s' `%s|%s'\n",
+ // srcA->type.data(),srcA->name.data(),
+ // dstA->type.data(),dstA->name.data());
}
- //printf("result mergeArguments `%s', `%s'\n",
+ //printf("result mergeArguments `%s|%s', `%s|%s'\n",
// argListToString(srcAl).data(),argListToString(dstAl).data());
}
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index ae853b4..7f0181e 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -750,6 +750,8 @@ void XmlDocVisitor::visitPost(DocParamSect *)
void XmlDocVisitor::visitPre(DocParamList *pl)
{
if (m_hide) return;
+ m_t << "<parameteritem>" << endl;
+ m_t << "<parameternamelist>" << endl;
QStrListIterator li(pl->parameters());
const char *s;
for (li.toFirst();(s=li.current());++li)
@@ -776,13 +778,15 @@ void XmlDocVisitor::visitPre(DocParamList *pl)
filter(s);
m_t << "</parametername>" << endl;
}
+ m_t << "</parameternamelist>" << endl;
m_t << "<parameterdescription>" << endl;
}
void XmlDocVisitor::visitPost(DocParamList *)
{
if (m_hide) return;
- m_t << "</parameterdescription>";
+ m_t << "</parameterdescription>" << endl;
+ m_t << "</parameteritem>" << endl;
}
void XmlDocVisitor::visitPre(DocXRefItem *x)
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 27f278a..c5345a6 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -718,7 +718,9 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
t << " <param><defname>" << a->type << "</defname></param>" << endl;
}
}
- if (!md->initializer().isEmpty())
+ // avoid that extremely large tables are written to the output.
+ // todo: it's better to adhere to MAX_INITIALIZER_LINES.
+ if (!md->initializer().isEmpty() && md->initializer().length()<2000)
{
t << " <initializer>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),md->initializer());