summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp1
-rw-r--r--src/classdef.h2
-rw-r--r--src/code.l6
-rw-r--r--src/config.l24
-rw-r--r--src/defgen.cpp624
-rw-r--r--src/defgen.h20
-rw-r--r--src/doc.l110
-rw-r--r--src/dot.cpp74
-rw-r--r--src/dot.h2
-rw-r--r--src/doxygen.cpp534
-rw-r--r--src/entry.cpp10
-rw-r--r--src/entry.h54
-rw-r--r--src/filedef.cpp21
-rw-r--r--src/filedef.h9
-rw-r--r--src/groupdef.cpp16
-rw-r--r--src/groupdef.h6
-rw-r--r--src/index.cpp8
-rw-r--r--src/libdoxygen.pro.in6
-rw-r--r--src/memberdef.cpp55
-rw-r--r--src/memberdef.h4
-rw-r--r--src/membergroup.h28
-rw-r--r--src/namespacedef.h2
-rw-r--r--src/outputgen.h2
-rw-r--r--src/pre.l2
-rw-r--r--src/scanner.l97
-rw-r--r--src/translator_de.h135
-rw-r--r--src/translator_pt.h20
-rw-r--r--src/util.cpp2
-rw-r--r--src/xmlgen.cpp205
29 files changed, 1499 insertions, 580 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index a65e76b..4b35855 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1219,6 +1219,7 @@ void ClassDef::writeDocumentationForInnerClasses(OutputList &ol)
innerCd->writeDocumentation(ol);
innerCd->writeMemberList(ol);
}
+ innerCd->writeDocumentationForInnerClasses(ol);
}
}
}
diff --git a/src/classdef.h b/src/classdef.h
index bdfe4d9..d294601 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -298,6 +298,8 @@ class ClassDef : public Definition
const char *ref=0,const char *fName=0);
/*! Destroys a compound definition. */
~ClassDef();
+
+ ClassSDict *getInnerClasses() { return m_innerClasses; }
bool visited;
diff --git a/src/code.l b/src/code.l
index 804a507..acd258d 100644
--- a/src/code.l
+++ b/src/code.l
@@ -699,9 +699,11 @@ static bool getLink(const char *className,
g_anchorCount++;
}
}
- Definition *d=0;
- if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
+ //Definition *d=0;
+ //if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
+ Definition *d = md->getOuterScope()==Doxygen::globalScope ?
+ md->getBodyDef() : md->getOuterScope();
if (d && d->isLinkable())
{
g_theCallContext.setClass(stripClassName(md->typeString()));
diff --git a/src/config.l b/src/config.l
index 670be6a..98b61aa 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1527,7 +1527,7 @@ void Config::create()
"If the value of the INPUT tag contains directories, you can use the \n"
"FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
"and *.h) to filter out the source-files in the directories. If left \n"
- "blank file matching one of the following patterns are included: \n"
+ "blank the following patterns are tested: \n"
"*.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n"
"*.h++ *.idl \n"
);
@@ -1931,11 +1931,11 @@ void Config::create()
cs->addDependency("GENERATE_MAN");
cb = addBool(
"MAN_LINKS",
- "If the MAN_LINKS tag is set to YES and Doxygen generates man output,\n"
- "then it will generate one additional man file for each entity\n"
- "documented in the real man page(s). These additional files\n"
- "only source the real man page, but without them the man command\n"
- "would be unable to find the correct page. The default is NO.\n",
+ "If the MAN_LINKS tag is set to YES and Doxygen generates man output, \n"
+ "then it will generate one additional man file for each entity \n"
+ "documented in the real man page(s). These additional files \n"
+ "only source the real man page, but without them the man command \n"
+ "would be unable to find the correct page. The default is NO. \n",
FALSE
);
cb->addDependency("GENERATE_MAN");
@@ -1951,6 +1951,18 @@ void Config::create()
"moment. \n",
FALSE
);
+ //--------------------------------------------------------------------------
+ addInfo( "DEF","configuration options for the AutoGen Definitions output");
+ //--------------------------------------------------------------------------
+ cb = addBool("GENERATE_AUTOGEN_DEF",
+
+ "If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will \n"
+ "generate an AutoGen Definitions (see autogen.sf.net) file \n"
+ "that captures the structure of the code including all \n"
+ "documentation. Note that this feature is still experimental \n"
+ "and incomplete at the moment. \n",
+
+ FALSE );
//-----------------------------------------------------------------------------------------------
addInfo( "Preprocessor","Configuration options related to the preprocessor ");
//-----------------------------------------------------------------------------------------------
diff --git a/src/defgen.cpp b/src/defgen.cpp
new file mode 100644
index 0000000..5620d9c
--- /dev/null
+++ b/src/defgen.cpp
@@ -0,0 +1,624 @@
+/******************************************************************************
+ *
+ *
+ *
+ *
+ * Copyright (C) 1997-2001 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include <stdlib.h>
+
+#include "qtbc.h"
+#include "defgen.h"
+#include "doxygen.h"
+#include "message.h"
+#include "config.h"
+#include "classlist.h"
+#include "util.h"
+#include "defargs.h"
+#include "outputgen.h"
+#include "doc.h"
+#include "dot.h"
+#include "code.h"
+
+#include <qdir.h>
+#include <qfile.h>
+#include <qtextstream.h>
+
+#define DEF_DB(x)
+
+inline void writeDEFString(QTextStream &t,const char *s)
+{
+ const char* p=s;
+ char c;
+
+ t << '\'';
+ while ((c = *(p++)))
+ {
+ if (c == '\'')
+ t << '\\';
+ t << c;
+ }
+ t << '\'';
+}
+
+void generateDEFForMember(MemberDef *md,
+ QTextStream &t,
+ Definition *def,
+ const char* Prefix)
+{
+ QCString memPrefix;
+
+ // + declaration
+ // - reimplements
+ // - reimplementedBy
+ // - exceptions
+ // - const/volatile specifiers
+ // - examples
+ // + source definition
+ // - source references
+ // - source referenced by
+ // - include code
+
+ if (md->memberType()==MemberDef::EnumValue) return;
+
+ QCString scopeName;
+ if (md->getClassDef())
+ scopeName=md->getClassDef()->name();
+ else if (md->getNamespaceDef())
+ scopeName=md->getNamespaceDef()->name();
+
+ t << " " << Prefix << "-member = {" << endl;
+ memPrefix = " ";
+ memPrefix.append( Prefix );
+ memPrefix.append( "-mem-" );
+
+ QCString memType;
+ bool isFunc=FALSE;
+ switch (md->memberType())
+ {
+ case MemberDef::Define: memType="define"; break;
+ case MemberDef::EnumValue: ASSERT(0); break;
+ case MemberDef::Property: memType="property"; break;
+ case MemberDef::Variable: memType="variable"; break;
+ case MemberDef::Typedef: memType="typedef"; break;
+ case MemberDef::Enumeration: memType="enum"; break;
+ case MemberDef::Function: memType="function"; isFunc=TRUE; break;
+ case MemberDef::Signal: memType="signal"; isFunc=TRUE; break;
+ case MemberDef::Prototype: memType="prototype"; isFunc=TRUE; break;
+ case MemberDef::Friend: memType="friend"; isFunc=TRUE; break;
+ case MemberDef::DCOP: memType="dcop"; isFunc=TRUE; break;
+ case MemberDef::Slot: memType="slot"; isFunc=TRUE; break;
+ }
+
+ t << memPrefix << "kind = '" << memType << "';" << endl;
+ t << memPrefix << "id = '"
+ << def->getOutputFileBase() << "_1" << md->anchor()
+ << "';" << endl;
+
+ t << memPrefix << "virt = ";
+ switch (md->virtualness())
+ {
+ case Normal: t << "normal;" << endl; break;
+ case Virtual: t << "virtual;" << endl; break;
+ case Pure: t << "pure-virtual;" << endl; break;
+ default: ASSERT(0);
+ }
+
+ t << memPrefix << "prot = ";
+ switch(md->protection())
+ {
+ case Public: t << "public;" << endl; break;
+ case Protected: t << "protected;" << endl; break;
+ case Private: t << "private;" << endl; break;
+ }
+
+ if (md->memberType()!=MemberDef::Define &&
+ md->memberType()!=MemberDef::Enumeration
+ )
+ {
+ QCString typeStr = replaceAnonymousScopes(md->typeString());
+ t << memPrefix << "type = <<_EnD_oF_dEf_TeXt_" << endl << typeStr << endl
+ << "_EnD_oF_dEf_TeXt_;" << endl;
+ }
+
+ t << memPrefix << "name = '" << md->name() << "';" << endl;
+
+ if (isFunc) //function
+ {
+ ArgumentList *declAl = new ArgumentList;
+ ArgumentList *defAl = md->argumentList();
+ stringToArgumentList(md->argsString(),declAl);
+ QCString fcnPrefix = " " + memPrefix + "param-";
+
+ if (declAl->count()>0)
+ {
+ ArgumentListIterator declAli(*declAl);
+ ArgumentListIterator defAli(*defAl);
+ Argument *a;
+ for (declAli.toFirst();(a=declAli.current());++declAli)
+ {
+ Argument *defArg = defAli.current();
+ t << memPrefix << "param = {" << endl;
+ if (!a->attrib.isEmpty())
+ {
+ t << fcnPrefix << "attributes = ";
+ writeDEFString(t,a->attrib);
+ t << ';' << endl;
+ }
+ if (!a->type.isEmpty())
+ {
+ t << fcnPrefix << "type = <<_EnD_oF_dEf_TeXt_" << endl
+ << a->type << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ }
+ if (!a->name.isEmpty())
+ {
+ t << fcnPrefix << "declname = ";
+ writeDEFString(t,a->name);
+ t << ';' << endl;
+ }
+ if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
+ {
+ t << fcnPrefix << "defname = ";
+ writeDEFString(t,defArg->name);
+ t << ';' << endl;
+ }
+ if (!a->array.isEmpty())
+ {
+ t << fcnPrefix << "array = ";
+ writeDEFString(t,a->array);
+ t << ';' << endl;
+ }
+ if (!a->defval.isEmpty())
+ {
+ t << fcnPrefix << "defval = <<_EnD_oF_dEf_TeXt_" << endl
+ << a->defval << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ }
+ if (defArg) ++defAli;
+ t << " }; /*" << fcnPrefix << "-param */" << endl;
+ }
+ }
+ delete declAl;
+ }
+ else if ( md->memberType()==MemberDef::Define
+ && md->argsString()!=0)
+ {
+ ArgumentListIterator ali(*md->argumentList());
+ Argument *a;
+ QCString defPrefix = " " + memPrefix + "def-";
+
+ for (ali.toFirst();(a=ali.current());++ali)
+ {
+ t << memPrefix << "param = {" << endl;
+ t << defPrefix << "name = '" << a->type << "';" << endl;
+ t << " }; /*" << defPrefix << "-param */" << endl;
+ }
+ }
+
+ if (!md->initializer().isEmpty())
+ {
+ t << memPrefix << "initializer = <<_EnD_oF_dEf_TeXt_" << endl
+ << md->initializer() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ }
+ // TODO: exceptions, const volatile
+ if (md->memberType()==MemberDef::Enumeration) // enum
+ {
+ if (md->enumFieldList())
+ {
+ MemberListIterator emli(*md->enumFieldList());
+ MemberDef *emd;
+ for (emli.toFirst();(emd=emli.current());++emli)
+ {
+ t << memPrefix << "enum = { enum-name = " << emd->name() << ';';
+ if (!emd->initializer().isEmpty())
+ {
+ t << " enum-value = ";
+ writeDEFString(t,emd->initializer());
+ t << ';';
+ }
+ t << " };" << endl;
+ }
+ }
+ }
+
+ t << memPrefix << "desc-file = '" << md->getDefFileName() << "';" << endl;
+ t << memPrefix << "desc-line = '" << md->getDefLine() << "';" << endl;
+ t << memPrefix << "briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
+ << md->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << memPrefix << "documentation = <<_EnD_oF_dEf_TeXt_" << endl
+ << md->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+
+ //printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
+ if (md->getReferencesMembers())
+ {
+ MemberSDict::Iterator mdi(*md->getReferencesMembers());
+ MemberDef *rmd;
+ QCString refPrefix = " " + memPrefix + "ref-";
+
+ for (mdi.toFirst();(rmd=mdi.current());++mdi)
+ {
+ if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
+ {
+ t << memPrefix << "referenceto = {" << endl;
+ t << refPrefix << "id = '"
+ << rmd->getBodyDef()->getOutputFileBase()
+ << "_1" // encoded `:' character (see util.cpp:convertNameToFile)
+ << rmd->anchor() << "';" << endl;
+
+ t << refPrefix << "line = '"
+ << rmd->getStartBodyLine() << "';" << endl;
+
+ QCString scope = rmd->getScopeString();
+ QCString name = rmd->name();
+ if (!scope.isEmpty() && scope!=def->name())
+ {
+ name.prepend(scope+"::");
+ }
+
+ t << refPrefix << "name = ";
+ writeDEFString(t,name);
+ t << ';' << endl << " };" << endl;
+ }
+ } /* for (mdi.toFirst...) */
+ }
+ if (md->getReferencedByMembers())
+ {
+ MemberSDict::Iterator mdi(*md->getReferencedByMembers());
+ MemberDef *rmd;
+ QCString refPrefix = " " + memPrefix + "ref-";
+
+ for (mdi.toFirst();(rmd=mdi.current());++mdi)
+ {
+ if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
+ {
+ t << memPrefix << "referenceby = {" << endl;
+ t << refPrefix << "id = '"
+ << rmd->getBodyDef()->getOutputFileBase()
+ << "_1" // encoded `:' character (see util.cpp:convertNameToFile)
+ << rmd->anchor() << "';" << endl;
+
+ t << refPrefix << "line = '"
+ << rmd->getStartBodyLine() << "';" << endl;
+
+ QCString scope = rmd->getScopeString();
+ QCString name = rmd->name();
+ if (!scope.isEmpty() && scope!=def->name())
+ {
+ name.prepend(scope+"::");
+ }
+
+ t << refPrefix << "name = ";
+ writeDEFString(t,name);
+ t << ';' << endl << " };" << endl;
+ }
+ } /* for (mdi.toFirst...) */
+ }
+
+ t << " }; /* " << Prefix << "-member */" << endl;
+}
+
+
+void generateDEFClassSection(ClassDef *cd,
+ QTextStream &t,
+ MemberList *ml,
+ const char *kind)
+{
+ if (ml->count()>0)
+ {
+ t << " cp-section = {" << endl;
+ t << " sec-kind = '" << kind << "';" << endl;
+
+ MemberListIterator mli(*ml);
+ MemberDef *md;
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ generateDEFForMember(md,t,cd,"sec");
+ }
+ t << " }; /* cp-section */" << endl;
+ }
+}
+
+void generateDEFForClass(ClassDef *cd,QTextStream &t)
+{
+ // + brief description
+ // + detailed description
+ // - template arguments
+ // - include files
+ // + inheritance diagram
+ // + list of direct super classes
+ // + list of direct sub classes
+ // + collaboration diagram
+ // - list of all members
+ // + user defined member sections
+ // + standard member sections
+ // + detailed member documentation
+ // - examples
+
+ if (cd->isReference()) return; // skip external references.
+ if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
+ if (cd->templateMaster()!=0) return; // skip generated template instances.
+
+ t << cd->compoundTypeString() << " = {" << endl;
+ t << " cp-id = '" << cd->getOutputFileBase() << "';" << endl;
+ t << " cp-name = '" << cd->name() << "';" << endl;
+
+ if (cd->baseClasses()->count()>0)
+ {
+ BaseClassListIterator bcli(*cd->baseClasses());
+ BaseClassDef *bcd;
+ for (bcli.toFirst();(bcd=bcli.current());++bcli)
+ {
+ t << " cp-ref = {" << endl << " ref-type = base;" << endl;
+ t << " ref-id = '"
+ << bcd->classDef->getOutputFileBase() << "';" << endl;
+ t << " ref-prot = ";
+ switch (bcd->prot)
+ {
+ case Public: t << "public;" << endl; break;
+ case Protected: t << "protected;" << endl; break;
+ case Private: t << "private;" << endl; break;
+ }
+ t << " ref-virt = ";
+ switch(bcd->virt)
+ {
+ case Normal: t << "non-virtual;"; break;
+ case Virtual: t << "virtual;"; break;
+ case Pure: t << "pure-virtual;"; break;
+ }
+ t << endl << " };" << endl;
+ }
+ }
+
+ if (cd->subClasses()->count()>0)
+ {
+ BaseClassListIterator bcli(*cd->subClasses());
+ BaseClassDef *bcd;
+ for (bcli.toFirst();(bcd=bcli.current());++bcli)
+ {
+ t << " cp-ref = {" << endl << " ref-type = derived;" << endl;
+ t << " ref-id = '"
+ << bcd->classDef->getOutputFileBase() << "';" << endl;
+ t << " ref-prot = ";
+ switch (bcd->prot)
+ {
+ case Public: t << "public;" << endl; break;
+ case Protected: t << "protected;" << endl; break;
+ case Private: t << "private;" << endl; break;
+ }
+ t << " ref-virt = ";
+ switch(bcd->virt)
+ {
+ case Normal: t << "non-virtual;"; break;
+ case Virtual: t << "virtual;"; break;
+ case Pure: t << "pure-virtual;"; break;
+ }
+ t << endl << " };" << endl;
+ }
+ }
+
+ int numMembers =
+ cd->pubTypes.count()+cd->pubMembers.count()+cd->pubAttribs.count()+
+ cd->pubSlots.count()+cd->signals.count()+cd->dcopMethods.count()+
+ cd->pubStaticMembers.count()+
+ cd->pubStaticAttribs.count()+cd->proTypes.count()+cd->proMembers.count()+
+ cd->proAttribs.count()+cd->proSlots.count()+cd->proStaticMembers.count()+
+ cd->proStaticAttribs.count()+cd->priTypes.count()+cd->priMembers.count()+
+ cd->priAttribs.count()+cd->priSlots.count()+cd->priStaticMembers.count()+
+ cd->priStaticAttribs.count()+cd->friends.count()+cd->related.count();
+ if (numMembers>0)
+ {
+ generateDEFClassSection(cd,t,&cd->pubTypes,"public-type");
+ generateDEFClassSection(cd,t,&cd->pubMembers,"public-func");
+ generateDEFClassSection(cd,t,&cd->pubAttribs,"public-attrib");
+ generateDEFClassSection(cd,t,&cd->pubSlots,"public-slot");
+ generateDEFClassSection(cd,t,&cd->signals,"signal");
+ generateDEFClassSection(cd,t,&cd->dcopMethods,"dcop-func");
+ generateDEFClassSection(cd,t,&cd->properties,"property");
+ generateDEFClassSection(cd,t,&cd->pubStaticMembers,"public-static-func");
+ generateDEFClassSection(cd,t,&cd->pubStaticAttribs,"public-static-attrib");
+ generateDEFClassSection(cd,t,&cd->proTypes,"protected-type");
+ generateDEFClassSection(cd,t,&cd->proMembers,"protected-func");
+ generateDEFClassSection(cd,t,&cd->proAttribs,"protected-attrib");
+ generateDEFClassSection(cd,t,&cd->proSlots,"protected-slot");
+ generateDEFClassSection(cd,t,&cd->proStaticMembers,"protected-static-func");
+ generateDEFClassSection(cd,t,&cd->proStaticAttribs,"protected-static-attrib");
+ generateDEFClassSection(cd,t,&cd->priTypes,"private-type");
+ generateDEFClassSection(cd,t,&cd->priMembers,"private-func");
+ generateDEFClassSection(cd,t,&cd->priAttribs,"private-attrib");
+ generateDEFClassSection(cd,t,&cd->priSlots,"private-slot");
+ generateDEFClassSection(cd,t,&cd->priStaticMembers,"private-static-func");
+ generateDEFClassSection(cd,t,&cd->priStaticAttribs,"private-static-attrib");
+ generateDEFClassSection(cd,t,&cd->friends,"signal");
+ generateDEFClassSection(cd,t,&cd->related,"related");
+ }
+
+ t << " cp-filename = '" << cd->getDefFileName() << "';" << endl;
+ t << " cp-fileline = '" << cd->getDefLine() << "';" << endl;
+ t << " cp-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
+ << cd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+
+ t << " cp-documentation = <<_EnD_oF_dEf_TeXt_" << endl
+ << cd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+
+ DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
+ if (!inheritanceGraph.isTrivial())
+ {
+ t << " cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_" << endl;
+ inheritanceGraph.writeDEF(t);
+ t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ }
+ DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
+ if (!collaborationGraph.isTrivial())
+ {
+ t << " cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_" << endl;
+ collaborationGraph.writeDEF(t);
+ t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ }
+ t << "}; /* " << cd->compoundTypeString() << " */" << endl;
+}
+
+void generateDEFSection(Definition *d,
+ QTextStream &t,
+ MemberList *ml,
+ const char *kind)
+{
+ if (ml->count()>0)
+ {
+ t << " " << kind << " = {" << endl;
+ MemberListIterator mli(*ml);
+ MemberDef *md;
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ generateDEFForMember(md,t,d,kind);
+ }
+ t << " };" << endl;
+ }
+}
+
+void generateDEFForNamespace(NamespaceDef *nd,QTextStream &t)
+{
+ if (nd->isReference()) return; // skip external references
+ t << " namespace = {" << endl;
+ t << " ns-id = '" << nd->getOutputFileBase() << "';" << endl;
+ t << " ns-name = ";
+ writeDEFString(t,nd->name());
+ t << ';' << endl;
+
+ generateDEFSection(nd,t,&nd->decDefineMembers,"define");
+ generateDEFSection(nd,t,&nd->decProtoMembers,"prototype");
+ generateDEFSection(nd,t,&nd->decTypedefMembers,"typedef");
+ generateDEFSection(nd,t,&nd->decEnumMembers,"enum");
+ generateDEFSection(nd,t,&nd->decFuncMembers,"func");
+ generateDEFSection(nd,t,&nd->decVarMembers,"var");
+
+ t << " ns-filename = '" << nd->getDefFileName() << "';" << endl;
+ t << " ns-fileline = '" << nd->getDefLine() << "';" << endl;
+ t << " ns-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
+ << nd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+
+ t << " ns-documentation = <<_EnD_oF_dEf_TeXt_" << endl
+ << nd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+ t << " };" << endl;
+}
+
+void generateDEFForFile(FileDef *fd,QTextStream &t)
+{
+ if (fd->isReference()) return; // skip external references
+
+ t << "file = {" << endl;
+ t << " file-id = '" << fd->getOutputFileBase() << "';" << endl;
+ t << " file-name = ";
+ writeDEFString(t,fd->name());
+ t << ';' << endl;
+
+ generateDEFSection(fd,t,&fd->decDefineMembers,"define");
+ generateDEFSection(fd,t,&fd->decProtoMembers,"prototype");
+ generateDEFSection(fd,t,&fd->decTypedefMembers,"typedef");
+ generateDEFSection(fd,t,&fd->decEnumMembers,"enum");
+ generateDEFSection(fd,t,&fd->decFuncMembers,"func");
+ generateDEFSection(fd,t,&fd->decVarMembers,"var");
+
+ t << " file-full-name = '" << fd->getDefFileName() << "';" << endl;
+ t << " file-first-line = '" << fd->getDefLine() << "';" << endl;
+
+ t << " file-briefdesc = <<_EnD_oF_dEf_TeXt_" << endl
+ << fd->briefDescription() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+
+ t << " file-documentation = <<_EnD_oF_dEf_TeXt_" << endl
+ << fd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
+
+ t << "}; /* file */" << endl;
+}
+
+
+void generateDEF()
+{
+ QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
+ if (outputDirectory.isEmpty())
+ {
+ outputDirectory=QDir::currentDirPath();
+ }
+ else
+ {
+ QDir dir(outputDirectory);
+ if (!dir.exists())
+ {
+ dir.setPath(QDir::currentDirPath());
+ if (!dir.mkdir(outputDirectory))
+ {
+ err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
+ "exist and cannot be created\n",outputDirectory.data());
+ exit(1);
+ }
+ else if (!Config_getBool("QUIET"))
+ {
+ err("Notice: Output directory `%s' does not exist. "
+ "I have created it for you.\n", outputDirectory.data());
+ }
+ dir.cd(outputDirectory);
+ }
+ outputDirectory=dir.absPath();
+ }
+
+ QDir dir(outputDirectory);
+ if (!dir.exists())
+ {
+ dir.setPath(QDir::currentDirPath());
+ if (!dir.mkdir(outputDirectory))
+ {
+ err("Cannot create directory %s\n",outputDirectory.data());
+ return;
+ }
+ }
+ QDir defDir(outputDirectory+"/def");
+ if (!defDir.exists() && !defDir.mkdir(outputDirectory+"/def"))
+ {
+ err("Could not create def directory in %s\n",outputDirectory.data());
+ return;
+ }
+
+ QCString fileName=outputDirectory+"/def/doxygen.def";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ QTextStream t(&f);
+ t << "AutoGen Definitions dummy;" << endl;
+
+ if (Doxygen::classSDict.count()+Doxygen::inputNameList.count()>0)
+ {
+ ClassSDict::Iterator cli(Doxygen::classSDict);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ generateDEFForClass(cd,t);
+ }
+ FileNameListIterator fnli(Doxygen::inputNameList);
+ FileName *fn;
+ for (;(fn=fnli.current());++fnli)
+ {
+ FileNameIterator fni(*fn);
+ FileDef *fd;
+ for (;(fd=fni.current());++fni)
+ {
+ generateDEFForFile(fd,t);
+ }
+ }
+ }
+ else
+ {
+ t << "dummy_value = true;" << endl;
+ }
+}
diff --git a/src/defgen.h b/src/defgen.h
new file mode 100644
index 0000000..7fd7641
--- /dev/null
+++ b/src/defgen.h
@@ -0,0 +1,20 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 1997-2001 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.
+ *
+ */
+
+#ifndef DEFGEN_H
+#define DEFGEN_H
+
+void generateDEF();
+
+#endif
diff --git a/src/doc.l b/src/doc.l
index 8499513..e5a2453 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -489,21 +489,21 @@ static bool inBlock()
static void endBlock()
{
- if (inParamBlock || inRetValBlock || inExceptionBlock)
- {
- outDoc->endDescTableData();
- outDoc->endDescTable();
- outDoc->endParamList();
- }
- else
- {
- outDoc->endDescList();
- }
- currentListIndent.pop();
- inParamBlock=inRetValBlock=inSeeBlock=inReturnBlock=inAuthorBlock=
- inVersionBlock=inSinceBlock=inDateBlock=inBugBlock=inNoteBlock=inWarningBlock=
- inParBlock=inExceptionBlock=inDeprecatedBlock=inPreBlock=inPostBlock=
- inInvarBlock=inRemarkBlock=inAttentionBlock=FALSE;
+ if (inParamBlock || inRetValBlock || inExceptionBlock)
+ {
+ outDoc->endDescTableData();
+ outDoc->endDescTable();
+ outDoc->endParamList();
+ }
+ else
+ {
+ outDoc->endDescList();
+ }
+ currentListIndent.pop();
+ inParamBlock=inRetValBlock=inSeeBlock=inReturnBlock=inAuthorBlock=
+ inVersionBlock=inSinceBlock=inDateBlock=inBugBlock=inNoteBlock=inWarningBlock=
+ inParBlock=inExceptionBlock=inDeprecatedBlock=inPreBlock=inPostBlock=
+ inInvarBlock=inRemarkBlock=inAttentionBlock=FALSE;
}
//-----------------------------------------------------------------
@@ -625,17 +625,10 @@ static void forceEndItemList()
{
case 'O': outDoc->endEnumList(); break;
case 'U': outDoc->endItemList(); break;
- case 'D':
- if (inBlock())
- {
- currentListIndent.push("D"); // hack!
- endBlock();
- }
- else
- {
- outDoc->endDescription();
- }
- break;
+ case 'D': outDoc->endDescription(); break;
+ case 'P': break; // do not end paragraphs
+ default:
+ err("Unexpected list indent token `%c'\n",c);
}
}
insideItemList=FALSE;
@@ -1030,9 +1023,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->writeString(yytext);
}
<DocHtmlScan,DocLatexScan>.|\n {
- char c[2];
- c[0]=*yytext;c[1]='\0';
- outDoc->writeString(c);
+ outDoc->writeString(yytext);
}
<DocScan>"\\postheader"/{BN}
<DocScan>"\\functionindex"/{BN} { /* writeMemberList(*outDoc,FALSE);*/ }
@@ -1077,13 +1068,18 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->codify(c);
}
<DocScan>{CMD}"internal"/{BN} {
- if (!Config_getBool("INTERNAL_DOCS"))
- {
+ //if (!Config_getBool("INTERNAL_DOCS"))
+ //{
+ // BEGIN( DocInternal );
+ //}
+ //else
+ //{
outDoc->newParagraph();
+ outDoc->startBold();
scanString(theTranslator->trForInternalUseOnly()+"\n");
- //outDoc->writeString("For internal use only.\n");
- BEGIN( DocInternal );
- }
+ outDoc->endBold();
+ outDoc->newParagraph();
+ //}
}
<DocScan>"\\reimp"/{BN} {
outDoc->newParagraph();
@@ -1172,7 +1168,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (b) endBlock();
inParBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Par);
outDoc->docify(title);
outDoc->endDescTitle();
@@ -1190,7 +1186,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inWarningBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Warning);
scanString(theTranslator->trWarning()+": ");
outDoc->endDescTitle();
@@ -1207,7 +1203,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inRemarkBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Remark);
scanString(theTranslator->trRemarks()+": ");
outDoc->endDescTitle();
@@ -1224,7 +1220,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inAttentionBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Attention);
scanString(theTranslator->trAttention()+": ");
outDoc->endDescTitle();
@@ -1241,7 +1237,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inNoteBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Note);
scanString(theTranslator->trNote()+": ");
outDoc->endDescTitle();
@@ -1258,7 +1254,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inPreBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Pre);
scanString(theTranslator->trPrecondition()+": ");
outDoc->endDescTitle();
@@ -1275,7 +1271,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inPostBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Post);
scanString(theTranslator->trPostcondition()+": ");
outDoc->endDescTitle();
@@ -1292,7 +1288,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inInvarBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Invar);
scanString(theTranslator->trInvariant()+": ");
outDoc->endDescTitle();
@@ -1309,7 +1305,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inVersionBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Version);
scanString(theTranslator->trVersion()+": ");
outDoc->endDescTitle();
@@ -1326,7 +1322,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inSinceBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Since);
scanString(theTranslator->trSince()+": ");
outDoc->endDescTitle();
@@ -1343,7 +1339,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inDateBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Date);
scanString(theTranslator->trDate()+": ");
outDoc->endDescTitle();
@@ -1364,7 +1360,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
ASSERT(item!=0);
endArgumentList();
if (inBlock()) endBlock();
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Todo);
outDoc->writeObjectLink(0,"todo",item->listAnchor,theTranslator->trTodo()+": ");
outDoc->endDescTitle();
@@ -1384,7 +1380,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
ASSERT(item!=0);
endArgumentList();
if (inBlock()) endBlock();
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Test);
outDoc->writeObjectLink(0,"test",item->listAnchor,theTranslator->trTest()+": ");
outDoc->endDescTitle();
@@ -1404,7 +1400,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
ASSERT(item!=0);
endArgumentList();
if (inBlock()) endBlock();
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Bug);
outDoc->writeObjectLink(0,"bug",item->listAnchor,theTranslator->trBug()+": ");
outDoc->endDescTitle();
@@ -1420,7 +1416,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inDeprecatedBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Deprecated);
scanString(theTranslator->trDeprecated()+": ");
outDoc->endDescTitle();
@@ -1439,7 +1435,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
tagText=tagText.left(tagText.length()-1);
endArgumentList();
if (inBlock()) endBlock();
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::RCS);
scanString(tagName+": ");
outDoc->endDescTitle();
@@ -1454,7 +1450,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inAuthorBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Author);
bool singular = ((QString)yytext).find('s')==-1;
scanString(theTranslator->trAuthor(TRUE,singular)+": ");
@@ -1472,7 +1468,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inReturnBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::Return);
scanString(theTranslator->trReturns()+": ");
outDoc->endDescTitle();
@@ -1485,7 +1481,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inSeeBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startDescList(BaseOutputDocInterface::See);
scanString(theTranslator->trSeeAlso()+": ");
outDoc->endDescTitle();
@@ -1498,7 +1494,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
}
<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"param"{BSEP} {
QCString t=yytext;
- if (/*t.contains('\n')>1 &&*/ insideItemList)
+ if (insideItemList)
{
forceEndItemList();
}
@@ -1507,7 +1503,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inParamBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startParamList(BaseOutputDocInterface::Param);
scanString(theTranslator->trParameters()+": ");
outDoc->endDescTitle();
@@ -1531,7 +1527,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inRetValBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startParamList(BaseOutputDocInterface::RetVal);
scanString(theTranslator->trReturnValues()+": ");
outDoc->endDescTitle();
@@ -1555,7 +1551,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
{
if (inBlock()) endBlock();
inExceptionBlock=TRUE;
- currentListIndent.push("D");
+ currentListIndent.push("P");
outDoc->startParamList(BaseOutputDocInterface::Exception);
scanString(theTranslator->trExceptions()+": ");
outDoc->endDescTitle();
diff --git a/src/dot.cpp b/src/dot.cpp
index 9849426..d1494a7 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -490,6 +490,70 @@ void DotNode::writeXML(QTextStream &t)
}
+void DotNode::writeDEF(QTextStream &t)
+{
+ char* nodePrefix = " node-";
+
+ t << " node = {" << endl;
+ t << nodePrefix << "id = " << m_number << ';' << endl;
+ t << nodePrefix << "label = '" << m_label << "';" << endl;
+
+ if (!m_url.isEmpty())
+ {
+ QCString url(m_url);
+ char *refPtr = url.data();
+ char *urlPtr = strchr(url.data(),'$');
+ if (urlPtr)
+ {
+ *urlPtr++='\0';
+ t << nodePrefix << "link = {" << endl << " "
+ << nodePrefix << "link-id = '" << urlPtr << "';" << endl;
+
+ if (*refPtr!='\0')
+ {
+ t << " " << nodePrefix << "link-external = '"
+ << refPtr << "';" << endl;
+ }
+ t << " };" << endl;
+ }
+ }
+ if (m_children)
+ {
+ QListIterator<DotNode> nli(*m_children);
+ QListIterator<EdgeInfo> eli(*m_edgeInfo);
+ DotNode *childNode;
+ EdgeInfo *edgeInfo;
+ for (;(childNode=nli.current());++nli,++eli)
+ {
+ edgeInfo=eli.current();
+ t << " node-child = {" << endl;
+ t << " child-id = '" << childNode->m_number << "';" << endl;
+ t << " relation = ";
+
+ switch(edgeInfo->m_color)
+ {
+ case EdgeInfo::Blue: t << "public-inheritance"; break;
+ case EdgeInfo::Green: t << "protected-inheritance"; break;
+ case EdgeInfo::Red: t << "private-inheritance"; break;
+ case EdgeInfo::Purple: t << "usage"; break;
+ case EdgeInfo::Orange: t << "template-instance"; break;
+ case EdgeInfo::Grey: ASSERT(0); break;
+ }
+ t << ';' << endl;
+
+ if (!edgeInfo->m_label.isEmpty())
+ {
+ t << " edgelabel = <<_EnD_oF_dEf_TeXt_" << endl
+ << edgeInfo->m_label << endl
+ << "_EnD_oF_dEf_TeXt_;" << endl;
+ }
+ t << " }; /* node-child */" << endl;
+ } /* for (;childNode...) */
+ }
+ t << " }; /* node */" << endl;
+}
+
+
void DotNode::clearWriteFlag()
{
m_written=FALSE;
@@ -1313,6 +1377,16 @@ void DotClassGraph::writeXML(QTextStream &t)
}
}
+void DotClassGraph::writeDEF(QTextStream &t)
+{
+ QDictIterator<DotNode> dni(*m_usedNodes);
+ DotNode *node;
+ for (;(node=dni.current());++dni)
+ {
+ node->writeDEF(t);
+ }
+}
+
//--------------------------------------------------------------------
int DotInclDepGraph::m_curNodeNumber;
diff --git a/src/dot.h b/src/dot.h
index 796f6e4..5dfa624 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -77,6 +77,7 @@ class DotNode
int m_subgraphId;
void clearWriteFlag();
void writeXML(QTextStream &t);
+ void writeDEF(QTextStream &t);
private:
void colorConnectedNodes(int curColor);
@@ -126,6 +127,7 @@ class DotClassGraph
bool TBRank=TRUE,bool imageMap=TRUE);
void writeXML(QTextStream &t);
+ void writeDEF(QTextStream &t);
QCString diskName() const;
private:
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index a5f40ac..83c640e 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -55,6 +55,7 @@
#include "defargs.h"
#include "rtfgen.h"
#include "xmlgen.h"
+#include "defgen.h"
#include "reflist.h"
#include "page.h"
#include "packagedef.h"
@@ -70,16 +71,10 @@ static QDict<Entry> classEntries(1009);
ClassSDict Doxygen::classSDict(1009);
ClassSDict Doxygen::hiddenClasses(257);
-//NamespaceList Doxygen::namespaceList; // all namespaces
-//NamespaceDict Doxygen::namespaceDict(257);
NamespaceSDict Doxygen::namespaceSDict(20);
-//MemberNameList Doxygen::memberNameList; // class member + related functions
-//MemberNameDict Doxygen::memberNameDict(10007);
MemberNameSDict Doxygen::memberNameSDict(10000);
-//MemberNameList Doxygen::functionNameList; // all global function/namespace members
-//MemberNameDict Doxygen::functionNameDict(10007);
MemberNameSDict Doxygen::functionNameSDict(10000);
FileNameList Doxygen::inputNameList; // all input files
@@ -129,21 +124,15 @@ void clearAll()
Doxygen::namespaceSDict.clear();
Doxygen::pageSDict->clear();
Doxygen::exampleSDict->clear();
- //Doxygen::memberNameList.clear();
- //Doxygen::functionNameList.clear();
Doxygen::inputNameList.clear();
- //Doxygen::groupList.clear();
Doxygen::formulaList.clear();
Doxygen::classSDict.clear();
- //Doxygen::memberNameDict.clear();
- //Doxygen::functionNameDict.clear();
Doxygen::sectionDict.clear();
Doxygen::inputNameDict->clear();
Doxygen::includeNameDict->clear();
Doxygen::exampleNameDict->clear();
Doxygen::imageNameDict->clear();
Doxygen::dotFileNameDict->clear();
- //Doxygen::groupDict.clear();
Doxygen::formulaDict.clear();
Doxygen::formulaNameDict.clear();
Doxygen::tagDestinationDict.clear();
@@ -163,20 +152,13 @@ void statistics()
Doxygen::imageNameDict->statistics();
fprintf(stderr,"--- dotFileNameDict stats ----\n");
Doxygen::dotFileNameDict->statistics();
- //fprintf(stderr,"--- memberNameDict stats ----\n");
- //Doxygen::memberNameDict.statistics();
- //fprintf(stderr,"--- functionNameDict stats ----\n");
- //Doxygen::functionNameDict.statistics();
fprintf(stderr,"--- excludeNameDict stats ----\n");
excludeNameDict.statistics();
fprintf(stderr,"--- aliasDict stats ----\n");
Doxygen::aliasDict.statistics();
fprintf(stderr,"--- typedefDict stats ----\n");
- //Doxygen::typedefDict.statistics();
fprintf(stderr,"--- namespaceAliasDict stats ----\n");
Doxygen::namespaceAliasDict.statistics();
- //fprintf(stderr,"--- groupDict stats ----\n");
- //Doxygen::groupDict.statistics();
fprintf(stderr,"--- formulaDict stats ----\n");
Doxygen::formulaDict.statistics();
fprintf(stderr,"--- formulaNameDict stats ----\n");
@@ -229,7 +211,7 @@ static void buildGroupList(Entry *root)
if ((gd=Doxygen::groupSDict[root->name]))
{
- if ( root->groupdoctype==Entry::GROUPDOC_NORMAL )
+ if ( root->groupDocType==Entry::GROUPDOC_NORMAL )
{
warn(root->fileName,root->startLine,
"Warning: group %s already documented. "
@@ -264,8 +246,6 @@ static void buildGroupList(Entry *root)
gd->setBriefDescription(root->brief);
gd->setDocumentation(root->doc);
gd->addSectionsToDefinition(root->anchors);
- //Doxygen::groupList.append(gd);
- //Doxygen::groupDict.insert(root->name,gd);
Doxygen::groupSDict.append(root->name,gd);
gd->setRefItems(root->todoId,root->testId,root->bugId);
}
@@ -1619,6 +1599,148 @@ nextMember:
// Searches the Entry tree for Function sections.
// If found they are stored in their class or in the global list.
+void addNewMemberToClass(Entry *root,ClassDef *cd,
+ const QCString &rname,const QCString &scope,bool isFriend)
+{
+ int l,i;
+ static QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*");
+
+ if (!root->type.isEmpty() && (i=re.match(root->type,0,&l))!=-1) // function variable
+ {
+ root->args+=root->type.right(root->type.length()-i-l);
+ root->type=root->type.left(i+l);
+ }
+
+ QCString name=removeRedundantWhiteSpace(rname);
+ if (name.left(2)=="::") name=name.right(name.length()-2);
+
+ MemberDef::MemberType mtype;
+ if (isFriend) mtype=MemberDef::Friend;
+ else if (root->mtype==Signal) mtype=MemberDef::Signal;
+ else if (root->mtype==Slot) mtype=MemberDef::Slot;
+ else if (root->mtype==DCOP) mtype=MemberDef::DCOP;
+ else mtype=MemberDef::Function;
+
+ // strip redundant template specifier for constructors
+ if ((i=name.find('<'))!=-1 && name.find('>')!=-1)
+ {
+ name=name.left(i);
+ }
+
+ MemberDef *md=new MemberDef(
+ root->fileName,root->startLine,
+ root->type,name,root->args,root->exception,
+ root->protection,root->virt,root->stat,!root->relates.isEmpty(),
+ mtype,root->tArgLists ? root->tArgLists->last() : 0,root->argList);
+ if (root->tagInfo)
+ {
+ md->setAnchor(root->tagInfo->anchor);
+ md->setReference(root->tagInfo->tagName);
+ }
+ md->setMemberClass(cd);
+ md->setDocumentation(root->doc);
+ md->setBriefDescription(root->brief);
+ md->setBodySegment(root->bodyLine,root->endBodyLine);
+ md->setMemberSpecifiers(root->memSpec);
+ md->setMemberGroupId(root->mGrpId);
+ bool ambig;
+ md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
+ //md->setScopeTemplateArguments(root->tArgList);
+ md->addSectionsToDefinition(root->anchors);
+ QCString def;
+ if (!root->relates.isEmpty() || isFriend || Config_getBool("HIDE_SCOPE_NAMES"))
+ {
+ if (!root->type.isEmpty())
+ {
+ if (root->argList)
+ {
+ def=root->type+" "+name;
+ }
+ else
+ {
+ def=root->type+" "+name+root->args;
+ }
+ }
+ else
+ {
+ if (root->argList)
+ {
+ def=name;
+ }
+ else
+ {
+ def=name+root->args;
+ }
+ }
+ }
+ else
+ {
+ QCString qualScope = cd->qualifiedNameWithTemplateParameters();
+ if (!root->type.isEmpty())
+ {
+ if (root->argList)
+ {
+ def=root->type+" "+qualScope+"::"+name;
+ }
+ else
+ {
+ def=root->type+" "+qualScope+"::"+name+root->args;
+ }
+ }
+ else
+ {
+ if (root->argList)
+ {
+ def=qualScope+"::"+name;
+ }
+ else
+ {
+ def=qualScope+"::"+name+root->args;
+ }
+ }
+ }
+ if (def.left(7)=="friend ") def=def.right(def.length()-7);
+ md->setDefinition(def);
+
+ Debug::print(Debug::Functions,0,
+ " Func Member:\n"
+ " `%s' `%s'::`%s' `%s' proto=%d\n"
+ " def=`%s'\n",
+ root->type.data(),
+ scope.data(),
+ rname.data(),
+ root->args.data(),
+ root->proto,
+ def.data()
+ );
+
+ // add member to the global list of all members
+ //printf("Adding member=%s class=%s\n",md->name().data(),cd->name().data());
+ MemberName *mn;
+ if ((mn=Doxygen::memberNameSDict[name]))
+ {
+ mn->append(md);
+ }
+ else
+ {
+ mn = new MemberName(name);
+ mn->append(md);
+ //Doxygen::memberNameDict.insert(name,mn);
+ //Doxygen::memberNameList.append(mn);
+ Doxygen::memberNameSDict.append(name,mn);
+ }
+
+ // add member to the class cd
+ cd->insertMember(md);
+ // add file to list of used files
+ cd->insertUsedFile(root->fileName);
+
+ addMemberToGroups(root,md);
+ root->section = Entry::EMPTY_SEC;
+ md->setRefItems(root->todoId,root->testId,root->bugId);
+}
+
+
static void buildFunctionList(Entry *root)
{
if (root->section==Entry::FUNCTION_SEC)
@@ -1649,7 +1771,7 @@ static void buildFunctionList(Entry *root)
ClassDef *cd=0;
// check if this function's parent is a class
- QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*");
+ static QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*");
//printf("root->parent=`%s' cd=%p root->type.find(re,0)=%d\n",
// root->parent->name.data(),getClass(root->parent->name),
// root->type.find(re,0));
@@ -1672,7 +1794,6 @@ static void buildFunctionList(Entry *root)
}
}
- int i;
if (root->parent &&
!root->parent->name.isEmpty() &&
(root->parent->section & Entry::COMPOUND_MASK) &&
@@ -1683,151 +1804,7 @@ static void buildFunctionList(Entry *root)
)
)
{
- int l;
- if (!root->type.isEmpty() && (i=re.match(root->type,0,&l))!=-1) // function variable
- {
- root->args+=root->type.right(root->type.length()-i-l);
- root->type=root->type.left(i+l);
- }
-
- QCString name=removeRedundantWhiteSpace(rname);
- if (name.left(2)=="::") name=name.right(name.length()-2);
-
- MemberDef::MemberType mtype;
- if (isFriend) mtype=MemberDef::Friend;
- else if (root->mtype==Signal) mtype=MemberDef::Signal;
- else if (root->mtype==Slot) mtype=MemberDef::Slot;
- else if (root->mtype==DCOP) mtype=MemberDef::DCOP;
- else mtype=MemberDef::Function;
-
- // strip redundant template specifier for constructors
- if ((i=name.find('<'))!=-1 && name.find('>')!=-1)
- {
- name=name.left(i);
- }
-
- //if (Config::instance()->get("") && !root->body.isEmpty())
- //{
- // printf("Function: %s\n-----------------\n%s\n------------------\n",
- // rname.data(),root->body.data());
- //}
-
- // new member function, signal or slot.
- //printf("new member: %s member template args=`%s'\n",
- // root->args.data(),
- // argListToString(root->mtArgList).data());
-
- MemberDef *md=new MemberDef(
- root->fileName,root->startLine,
- root->type,name,root->args,root->exception,
- root->protection,root->virt,root->stat,!root->relates.isEmpty(),
- mtype,root->tArgLists ? root->tArgLists->last() : 0,root->argList);
- if (root->tagInfo)
- {
- md->setAnchor(root->tagInfo->anchor);
- md->setReference(root->tagInfo->tagName);
- }
- md->setMemberClass(cd);
- md->setDocumentation(root->doc);
- md->setBriefDescription(root->brief);
- md->setBodySegment(root->bodyLine,root->endBodyLine);
- md->setMemberSpecifiers(root->memSpec);
- md->setMemberGroupId(root->mGrpId);
- bool ambig;
- md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
- //md->setScopeTemplateArguments(root->tArgList);
- md->addSectionsToDefinition(root->anchors);
- QCString def;
- if (!root->relates.isEmpty() || isFriend || Config_getBool("HIDE_SCOPE_NAMES"))
- {
- if (!root->type.isEmpty())
- {
- if (root->argList)
- {
- def=root->type+" "+name;
- }
- else
- {
- def=root->type+" "+name+root->args;
- }
- }
- else
- {
- if (root->argList)
- {
- def=name;
- }
- else
- {
- def=name+root->args;
- }
- }
- }
- else
- {
- QCString qualScope = cd->qualifiedNameWithTemplateParameters();
- if (!root->type.isEmpty())
- {
- if (root->argList)
- {
- def=root->type+" "+qualScope+"::"+name;
- }
- else
- {
- def=root->type+" "+qualScope+"::"+name+root->args;
- }
- }
- else
- {
- if (root->argList)
- {
- def=qualScope+"::"+name;
- }
- else
- {
- def=qualScope+"::"+name+root->args;
- }
- }
- }
- if (def.left(7)=="friend ") def=def.right(def.length()-7);
- md->setDefinition(def);
-
- Debug::print(Debug::Functions,0,
- " Func Member:\n"
- " `%s' `%s'::`%s' `%s' proto=%d\n"
- " def=`%s'\n",
- root->type.data(),
- scope.data(),
- rname.data(),
- root->args.data(),
- root->proto,
- def.data()
- );
-
- // add member to the global list of all members
- //printf("Adding member=%s class=%s\n",md->name().data(),cd->name().data());
- MemberName *mn;
- if ((mn=Doxygen::memberNameSDict[name]))
- {
- mn->append(md);
- }
- else
- {
- mn = new MemberName(name);
- mn->append(md);
- //Doxygen::memberNameDict.insert(name,mn);
- //Doxygen::memberNameList.append(mn);
- Doxygen::memberNameSDict.append(name,mn);
- }
-
- // add member to the class cd
- cd->insertMember(md);
- // add file to list of used files
- cd->insertUsedFile(root->fileName);
-
- addMemberToGroups(root,md);
- root->section = Entry::EMPTY_SEC;
- md->setRefItems(root->todoId,root->testId,root->bugId);
+ addNewMemberToClass(root,cd,rname,scope,isFriend);
}
else if (root->parent &&
!(root->parent->section & Entry::COMPOUND_MASK) &&
@@ -3077,74 +3054,6 @@ static void computeMemberReferences()
//----------------------------------------------------------------------
-#if 0
-static void addClassMemberTodoTestBugReferences(Definition *compound)
-{
- MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict);
- MemberName *mn=0;
- for (mnli.toFirst();(mn=mnli.current());++mnli)
- {
- MemberNameIterator mni(*mn);
- MemberDef *md=0;
- for (mni.toFirst();(md=mni.current());++mni)
- {
- Definition *d=md->getClassDef();
- QCString scopeName;
- if (d) scopeName=d->name();
- if (d==0) d=md->getGroupDef();
- if (d==0) d=md->getFileDef();
- if (d!=0 && ((compound==0 && !md->visited) || compound==d))
- {
- QCString memLabel;
- md->visited=TRUE;
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- {
- memLabel=theTranslator->trField(TRUE,TRUE);
- }
- else
- {
- memLabel=theTranslator->trMember(TRUE,TRUE);
- }
- addRefItem(md->todoId(),md->testId(),md->bugId(),memLabel,d->getOutputFileBase()+":"+md->anchor(),scopeName+"::"+md->name(),md->argsString());
- }
- }
- }
-}
-
-static void addFileMemberTodoTestBugReferences(Definition *compound)
-{
- MemberNameSDict::Iterator fnli(Doxygen::functionNameSDict);
- MemberName *mn=0;
- for (fnli.toFirst();(mn=fnli.current());++fnli)
- {
- MemberNameIterator mni(*mn);
- MemberDef *md=0;
- for (mni.toFirst();(md=mni.current());++mni)
- {
- Definition *d=md->getNamespaceDef();
- QCString scopeName;
- if (d) scopeName=d->name();
- if (d==0) d=md->getGroupDef();
- if (d==0) d=md->getFileDef();
- if (d!=0 && ((compound==0 && !md->visited) || compound==d))
- {
- QCString memLabel;
- md->visited=TRUE;
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- {
- memLabel=theTranslator->trGlobal(TRUE,TRUE);
- }
- else
- {
- memLabel=theTranslator->trMember(TRUE,TRUE);
- }
- addRefItem(md->todoId(),md->testId(),md->bugId(),memLabel,d->getOutputFileBase()+":"+md->anchor(),md->name(),md->argsString());
- }
- }
- }
-}
-#endif
-
static void addListReferences()
{
MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict);
@@ -3292,33 +3201,33 @@ static void addMemberDocs(Entry *root,
//printf("overwrite!\n");
md->setBriefDescription(root->brief);
}
-
- if (md->initializer().isEmpty() && !root->initializer.isEmpty())
- {
- md->setInitializer(root->initializer);
- md->setMaxInitLines(root->initLines);
- }
-
- //if (md->bodyCode().isEmpty() && !root->body.isEmpty()) /* no body yet */
- //{
- // md->setBody(root->body);
- //}
- bool ambig;
- FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
- if (fd)
- {
+ }
- if ((md->getStartBodyLine()==-1 && root->bodyLine!=-1) ||
- (md->isVariable() && !root->explicitExternal))
- {
- md->setBodySegment(root->bodyLine,root->endBodyLine);
- md->setBodyDef(fd);
- }
+ if (md->initializer().isEmpty() && !root->initializer.isEmpty())
+ {
+ md->setInitializer(root->initializer);
+ md->setMaxInitLines(root->initLines);
+ }
- md->setRefItems(root->todoId,root->testId,root->bugId);
+ //if (md->bodyCode().isEmpty() && !root->body.isEmpty()) /* no body yet */
+ //{
+ // md->setBody(root->body);
+ //}
+ bool ambig;
+ FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
+ if (fd)
+ {
+
+ if ((md->getStartBodyLine()==-1 && root->bodyLine!=-1) ||
+ (md->isVariable() && !root->explicitExternal))
+ {
+ md->setBodySegment(root->bodyLine,root->endBodyLine);
+ md->setBodyDef(fd);
}
-
+
+ md->setRefItems(root->todoId,root->testId,root->bugId);
}
+
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
md->mergeMemberSpecifiers(root->memSpec);
@@ -3587,10 +3496,6 @@ static void substituteTemplatesInArgList(
/*! This function tries to find a member (in a documented class/file/namespace)
* that corresponds to the function/variable declaration given in \a funcDecl.
*
- * The \a related field may be used to specify a related class name.
- * It is only used if the class name cannot be extracted from the function
- * declaration.
- *
* The boolean \a overloaded is used to specify whether or not a standard
* overload documentation line should be generated.
*
@@ -3599,7 +3504,6 @@ static void substituteTemplatesInArgList(
*/
static void findMember(Entry *root,
QCString funcDecl,
- QCString related,
bool overloaded,
bool isFunc
)
@@ -3607,21 +3511,15 @@ static void findMember(Entry *root,
Debug::print(Debug::FindMembers,0,
"findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d,"
"isFunc=%d mGrpId=%d tArgList=%p (#=%d) "
- "scopeSpec=%s memberSpec=%s memSpec=%d\n",
- root,funcDecl.data(),related.data(),overloaded,isFunc,root->mGrpId,
+ "memSpec=%d\n",
+ root,funcDecl.data(),root->relates.data(),overloaded,isFunc,root->mGrpId,
root->tArgLists,root->tArgLists ? root->tArgLists->count() : 0,
- root->scopeSpec.data(),root->memberSpec.data(),root->memSpec
+ root->memSpec
);
- //if (Config::instance()->get("") && !root->body.isEmpty())
- //{
- // //printf("Function: %s\n-----------------\n%s\n------------------\n",
- // //root->name.data(),root->body.data());
- //}
QCString scopeName;
QCString className;
QCString namespaceName;
- //QCString classTempList;
QCString funcType;
QCString funcName;
QCString funcArgs;
@@ -3711,16 +3609,16 @@ static void findMember(Entry *root,
// related field.
//printf("scopeName=`%s' className=`%s' namespaceName=`%s'\n",
// scopeName.data(),className.data(),namespaceName.data());
- if (!related.isEmpty() && !isRelated)
+ if (!root->relates.isEmpty())
{ // related member, prefix user specified scope
isRelated=TRUE;
- if (getClass(related)==0 && !scopeName.isEmpty())
- scopeName= mergeScopes(scopeName,related);
+ if (getClass(root->relates)==0 && !scopeName.isEmpty())
+ scopeName= mergeScopes(scopeName,root->relates);
else
- scopeName = related.copy();
+ scopeName = root->relates.copy();
}
- if (related.isEmpty() && root->parent &&
+ if (root->relates.isEmpty() && root->parent &&
(root->parent->section&Entry::SCOPE_MASK) &&
!root->parent->name.isEmpty())
{
@@ -3776,7 +3674,7 @@ static void findMember(Entry *root,
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
// rebuild the function declaration (needed to get the scope right).
- if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config_getBool("HIDE_SCOPE_NAMES"))
+ if (!scopeName.isEmpty() && /*!isRelated &&*/ !isFriend && !Config_getBool("HIDE_SCOPE_NAMES"))
{
if (!funcType.isEmpty())
{
@@ -3849,7 +3747,7 @@ static void findMember(Entry *root,
" isFunc=%d\n\n",
namespaceName.data(),className.data(),
funcType.data(),funcName.data(),funcArgs.data(),funcTempList.data(),
- funcDecl.data(),related.data(),exceptions.data(),isRelated,isFriend,
+ funcDecl.data(),root->relates.data(),exceptions.data(),isRelated,isFriend,
isFunc
);
@@ -4010,19 +3908,43 @@ static void findMember(Entry *root,
}
if (count==0 && !(isFriend && funcType=="class"))
{
- warn(root->fileName,root->startLine,
- "Warning: no matching class member found for \n %s",
- fullFuncDecl.data()
- );
int candidates=0;
if (mn->count()>0)
{
for (mni.toFirst();(md=mni.current());++mni)
{
ClassDef *cd=md->getClassDef();
- if (cd!=0 && cd->name()==className) candidates++;
+ if (cd!=0 && cd->name()==className)
+ {
+ if (root->tArgLists && md->templateArguments() &&
+ root->tArgLists->getLast()->count()<=md->templateArguments()->count())
+ { // assume we have found a template specialization
+ // for which there is only a definition, no declaration in
+ // the class. TODO: we should actually check whether
+ // the arguments match!
+ addNewMemberToClass(root,cd,md->name(),cd->name(),isFriend);
+ return;
+ }
+ candidates++;
+ }
}
}
+
+ warn(root->fileName,root->startLine,
+ "Warning: no matching class member found for"
+ );
+
+ if (root->tArgLists)
+ {
+ QListIterator<ArgumentList> alli(*root->tArgLists);
+ ArgumentList *al;
+ for (;(al=alli.current());++alli)
+ {
+ warn_cont(" template %s\n",tempArgListToString(al).data());
+ }
+ }
+ warn_cont(" %s\n",fullFuncDecl.data());
+
if (candidates>0)
{
warn_cont("Possible candidates:\n");
@@ -4031,7 +3953,13 @@ static void findMember(Entry *root,
ClassDef *cd=md->getClassDef();
if (cd!=0 && cd->name()==className)
{
- warn_cont(" %s\n",md->declaration());
+ if (md->templateArguments())
+ {
+ warn_cont(" template %s\n",tempArgListToString(md->templateArguments()).data());
+ }
+ warn_cont(" %s %s::%s%s\n",
+ md->typeString(),cd->name().data(),
+ md->name().data(),md->argsString());
}
}
}
@@ -4066,6 +3994,7 @@ static void findMember(Entry *root,
// new overloaded member function
ArgumentList *tArgList =
getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists);
+ //printf("new related member %s args=`%s'\n",md->name().data(),funcArgs.data());
MemberDef *md=new MemberDef(
root->fileName,root->startLine,
funcType,funcName,funcArgs,exceptions,
@@ -4107,9 +4036,10 @@ static void findMember(Entry *root,
}
}
}
- else if (isRelated && !related.isEmpty())
+ else if (isRelated && !root->relates.isEmpty())
{
- if (className.isEmpty()) className=related.copy();
+ Debug::print(Debug::FindMembers,0,"2. related function\n");
+ if (className.isEmpty()) className=root->relates.copy();
ClassDef *cd;
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
if ((cd=getClass(scopeName)))
@@ -4147,9 +4077,12 @@ static void findMember(Entry *root,
mtype=MemberDef::Slot;
else if (root->mtype==DCOP)
mtype=MemberDef::DCOP;
- else
+ else
mtype=MemberDef::Function;
+ //printf("New related name `%s' `%d'\n",funcName.data(),
+ // root->argList ? (int)root->argList->count() : -1);
+
// new related (member) function
ArgumentList *tArgList =
getTemplateArgumentsFromName(scopeName+"::"+funcName,root->tArgLists);
@@ -4157,7 +4090,7 @@ static void findMember(Entry *root,
root->fileName,root->startLine,
funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,TRUE,
- mtype,tArgList,root->argList);
+ mtype,tArgList,funcArgs.isEmpty() ? 0 : root->argList);
if (root->tagInfo)
{
md->setAnchor(root->tagInfo->anchor);
@@ -4300,12 +4233,12 @@ static void findMemberDocumentation(Entry *root)
//printf("Documentation for inline member `%s' found args=`%s'\n",
// root->name.data(),root->args.data());
//if (root->relates.length()) printf(" Relates %s\n",root->relates.data());
- findMember(root,root->name+root->args+root->exception,root->relates,FALSE,isFunc);
+ findMember(root,root->name+root->args+root->exception,FALSE,isFunc);
}
else if (root->section==Entry::OVERLOADDOC_SEC)
{
//printf("Overloaded member %s found\n",root->name.data());
- findMember(root,root->name,root->relates,TRUE,isFunc);
+ findMember(root,root->name,TRUE,isFunc);
}
else if
((root->section==Entry::FUNCTION_SEC // function
@@ -4328,7 +4261,6 @@ static void findMemberDocumentation(Entry *root)
findMember(root,
root->type+" "+
root->name,
- root->relates,
FALSE,FALSE);
}
@@ -4340,7 +4272,6 @@ static void findMemberDocumentation(Entry *root)
root->name+
root->args+
root->exception,
- root->relates,
FALSE,isFunc);
}
else
@@ -4350,19 +4281,23 @@ static void findMemberDocumentation(Entry *root)
root->name+
root->args+
root->exception,
- root->relates,
FALSE,isFunc);
}
}
+ else if (root->section==Entry::DEFINE_SEC && !root->relates.isEmpty())
+ {
+ findMember(root,root->name+root->args,FALSE,!root->args.isEmpty());
+ }
else if (root->section==Entry::VARIABLEDOC_SEC)
{
//printf("Documentation for variable %s found\n",root->name.data());
//if (!root->relates.isEmpty()) printf(" Relates %s\n",root->relates.data());
- findMember(root,root->name,root->relates,FALSE,FALSE);
+ findMember(root,root->name,FALSE,FALSE);
}
else
{
// skip section
+ //printf("skip section\n");
}
EntryListIterator eli(*root->sublist);
Entry *e;
@@ -7247,5 +7182,10 @@ void generateOutput()
msg("Generating XML output...\n");
generateXML();
}
+ if (Config_getBool("GENERATE_AUTOGEN_DEF"))
+ {
+ msg("Generating AutoGen DEF output...\n");
+ generateDEF();
+ }
}
diff --git a/src/entry.cpp b/src/entry.cpp
index 44081c2..26113aa 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -41,7 +41,7 @@ Entry::Entry()
//mtArgList = 0;
mGrpId = -1;
tagInfo = 0;
- groupdoctype = GROUPDOC_NORMAL;
+ groupDocType = GROUPDOC_NORMAL;
reset();
}
@@ -93,7 +93,7 @@ Entry::Entry(const Entry &e)
//printf("Entry::Entry(copy) tArgList=0\n");
tArgLists = 0;
//mtArgList = 0;
- groupdoctype = e.groupdoctype;
+ groupDocType = e.groupDocType;
// deep copy of the child entry list
QListIterator<Entry> eli(*e.sublist);
@@ -210,8 +210,8 @@ void Entry::reset()
brief.resize(0);
inside.resize(0);
fileName.resize(0);
- scopeSpec.resize(0);
- memberSpec.resize(0);
+ //scopeSpec.resize(0);
+ //memberSpec.resize(0);
initializer.resize(0);
initLines = -1;
startLine = 1;
@@ -230,7 +230,7 @@ void Entry::reset()
memSpec = 0;
subGrouping = TRUE;
protection = Public;
- groupdoctype = GROUPDOC_NORMAL;
+ groupDocType = GROUPDOC_NORMAL;
sublist->clear();
extends->clear();
groups->clear();
diff --git a/src/entry.h b/src/entry.h
index 3646d40..08ed956 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -254,10 +254,8 @@ class Entry
QCString bitfields; //!< member's bit fields
ArgumentList *argList; //!< member arguments as a list
QList<ArgumentList> *tArgLists; //!< template argument declarations
- //ArgumentList *tArgList; //!< template argument lists (for each scope)
- //ArgumentList *mtArgList; //!< member template argument list
- QCString scopeSpec; //!< template specialization of the scope
- QCString memberSpec; //!< template specialization of the member
+ //QCString scopeSpec; //!< template specialization of the scope
+ //QCString memberSpec; //!< template specialization of the member
QCString program; //!< the program text
QCString initializer; //!< initial value (for variables)
QCString includeFile; //!< include file (2 arg of \class, must be unique)
@@ -281,32 +279,36 @@ class Entry
int bugId; //!< id of the bug list item of this entry
TagInfo *tagInfo; //!< tag file info
static int num; //!< counts the total number of entries
- enum {
- GROUPDOC_NORMAL, //<! @defgroup
- GROUPDOC_ADD, //<! @addgroup
- GROUPDOC_WEAK //<! @weakgroup
- } groupdoctype; //!< kind of group
+ enum
+ {
+ GROUPDOC_NORMAL, //<! defgroup
+ GROUPDOC_ADD, //<! addgroup
+ GROUPDOC_WEAK //<! weakgroup
+ } groupDocType; //!< kind of group
/// return the command name used to define GROUPDOC_SEC
- const char *groupdoccmd() const
+ const char *groupDocCmd() const
{
- switch( this->groupdoctype ) {
- case GROUPDOC_NORMAL: return "\\defgroup"; break;
- case GROUPDOC_ADD: return "\\addgroup"; break;
- case GROUPDOC_WEAK: return "\\weakgroup"; break;
- default: return "unknown group command";
- }
+ switch( groupDocType )
+ {
+ case GROUPDOC_NORMAL: return "\\defgroup"; break;
+ case GROUPDOC_ADD: return "\\addgroup"; break;
+ case GROUPDOC_WEAK: return "\\weakgroup"; break;
+ default: return "unknown group command";
+ }
}
- Grouping::GroupPri_t groupingpri() const
+ Grouping::GroupPri_t groupingPri() const
{
- if( this->section != GROUPDOC_SEC ) {
- return Grouping::GROUPING_LOWEST;
- }
- switch( this->groupdoctype ) {
- case GROUPDOC_NORMAL: return Grouping::GROUPING_AUTO_DEF; break;
- case GROUPDOC_ADD: return Grouping::GROUPING_AUTO_ADD; break;
- case GROUPDOC_WEAK: return Grouping::GROUPING_AUTO_WEAK; break;
- default: return Grouping::GROUPING_LOWEST;
- }
+ if( section != GROUPDOC_SEC )
+ {
+ return Grouping::GROUPING_LOWEST;
+ }
+ switch( groupDocType )
+ {
+ case GROUPDOC_NORMAL: return Grouping::GROUPING_AUTO_DEF; break;
+ case GROUPDOC_ADD: return Grouping::GROUPING_AUTO_ADD; break;
+ case GROUPDOC_WEAK: return Grouping::GROUPING_AUTO_WEAK; break;
+ default: return Grouping::GROUPING_LOWEST;
+ }
}
private:
Entry &operator=(const Entry &);
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 32d14d0..620c8a9 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -51,8 +51,7 @@ FileDef::FileDef(const char *p,const char *nm,const char *lref)
includedByList = new QList<IncludeInfo>;
includedByList->setAutoDelete(TRUE);
includedByDict = new QDict<IncludeInfo>(61);
- namespaceList = new NamespaceList;
- namespaceDict = new NamespaceDict(7);
+ namespaceSDict = new NamespaceSDict;
srcDefDict = 0;
srcMemberDict = 0;
usingDirList = 0;
@@ -74,8 +73,7 @@ FileDef::~FileDef()
delete classSDict;
delete includeDict;
delete includeList;
- delete namespaceList;
- delete namespaceDict;
+ delete namespaceSDict;
delete srcDefDict;
delete srcMemberDict;
delete usingDirList;
@@ -267,11 +265,12 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startMemberSections();
- if (namespaceList->count()>0)
+ if (namespaceSDict->count()>0)
{
- NamespaceDef *nd=namespaceList->first();
+ NamespaceSDict::Iterator ndi(*namespaceSDict);
+ NamespaceDef *nd;
bool found=FALSE;
- while (nd)
+ for (ndi.toFirst();(nd=ndi.current());++ndi)
{
if (nd->name().find('@')==-1)
{
@@ -306,7 +305,6 @@ void FileDef::writeDocumentation(OutputList &ol)
}
ol.endMemberItem(FALSE);
}
- nd=namespaceList->next();
}
if (found) ol.endMemberList();
}
@@ -533,13 +531,12 @@ void FileDef::insertClass(ClassDef *cd)
/*! Adds namespace definition \a nd to the list of all compounds of this file */
void FileDef::insertNamespace(NamespaceDef *nd)
{
- if (!nd->name().isEmpty() && namespaceDict->find(nd->name())==0)
+ if (!nd->name().isEmpty() && namespaceSDict->find(nd->name())==0)
{
if (Config_getBool("SORT_MEMBER_DOCS"))
- namespaceList->inSort(nd);
+ namespaceSDict->inSort(nd->name(),nd);
else
- namespaceList->append(nd);
- namespaceDict->insert(nd->name(),nd);
+ namespaceSDict->append(nd->name(),nd);
}
}
diff --git a/src/filedef.h b/src/filedef.h
index 906e208..fc0bdb7 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -35,8 +35,7 @@ class ClassList;
class MemberDef;
class OutputList;
class NamespaceDef;
-class NamespaceList;
-class NamespaceDict;
+class NamespaceSDict;
class MemberGroupSDict;
class PackageDef;
@@ -171,15 +170,15 @@ class FileDef : public Definition
/* user defined member groups */
MemberGroupSDict *memberGroupSDict;
+ NamespaceSDict *namespaceSDict;
+ ClassSDict *classSDict;
+
private:
- ClassSDict *classSDict;
QDict<IncludeInfo> *includeDict;
QList<IncludeInfo> *includeList;
QDict<IncludeInfo> *includedByDict;
QList<IncludeInfo> *includedByList;
- NamespaceDict *namespaceDict;
- NamespaceList *namespaceList;
NamespaceList *usingDirList;
ClassList *usingDeclList;
//DefineList *defineList;
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 50d846b..f879d60 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -309,10 +309,10 @@ bool GroupDef::containsGroup(const GroupDef *def)
void GroupDef::addGroup(const GroupDef *def)
{
- if (Config_getBool("SORT_MEMBER_DOCS"))
- groupList->inSort(def);
- else
- groupList->append(def);
+ //if (Config_getBool("SORT_MEMBER_DOCS"))
+ // groupList->inSort(def);
+ //else
+ groupList->append(def);
}
void GroupDef::addParentGroup(const GroupDef *def)
@@ -382,6 +382,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.startMemberSections();
+
+ // write list of files
if (fileList->count()>0)
{
ol.startMemberHeader();
@@ -411,6 +413,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.endMemberList();
}
+
+ // write list of namespaces
if (namespaceList->count()>0)
{
ol.startMemberHeader();
@@ -440,6 +444,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.endMemberList();
}
+
+ // write list of groups
if (groupList->count()>0)
{
ol.startMemberHeader();
@@ -469,8 +475,10 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.endMemberList();
}
+ // write list of classes
classSDict->writeDeclaration(ol);
+ // write list of members
if (allMemberList->count()>0)
{
/* write user defined member groups */
diff --git a/src/groupdef.h b/src/groupdef.h
index 8a0088f..d32f781 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -100,6 +100,12 @@ class GroupDef : public Definition
/* user defined member groups */
MemberGroupSDict *memberGroupSDict;
+
+ FileList * getFiles() const { return fileList; }
+ ClassSDict * getClasses() const { return classSDict; }
+ NamespaceList * getNamespaces() const { return namespaceList; }
+ GroupList * getSubGroups() const { return groupList; }
+ PageSDict * getPages() const { return pageDict; }
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
diff --git a/src/index.cpp b/src/index.cpp
index afcd154..cc1bc99 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -2338,14 +2338,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
// write subgroups
if (hasSubGroups)
{
- ol.startItemList();
+ ol.startIndexList();
QListIterator<GroupDef> gli(*gd->groupList);
GroupDef *subgd = 0;
for (gli.toLast();(subgd=gli.current());--gli)
{
writeGroupTreeNode(ol,subgd,TRUE);
}
- ol.endItemList();
+ ol.endIndexList();
}
@@ -2544,14 +2544,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
void writeGroupHierarchy(OutputList &ol)
{
- ol.startItemList();
+ ol.startIndexList();
GroupSDict::Iterator gli(Doxygen::groupSDict);
GroupDef *gd;
for (gli.toFirst();(gd=gli.current());++gli)
{
writeGroupTreeNode(ol,gd,FALSE);
}
- ol.endItemList();
+ ol.endIndexList();
}
//----------------------------------------------------------------------------
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index 1a6de48..6b73443 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -23,6 +23,7 @@ HEADERS = bufstr.h \
constexp.h \
cppvalue.h \
debug.h \
+ defgen.h \
doxygen.h \
scanner.h \
doc.h \
@@ -92,7 +93,7 @@ HEADERS = bufstr.h \
unistd.h \
util.h \
version.h \
- xmlgen.h
+ xmlgen.h
SOURCES = ce_lex.cpp \
ce_parse.cpp \
classdef.cpp \
@@ -100,6 +101,7 @@ SOURCES = ce_lex.cpp \
code.cpp \
cppvalue.cpp \
debug.cpp \
+ defgen.cpp \
declinfo.cpp \
defargs.cpp \
define.cpp \
@@ -143,7 +145,7 @@ SOURCES = ce_lex.cpp \
translator.cpp \
util.cpp \
version.cpp \
- xmlgen.cpp
+ xmlgen.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-msvc:TMAKE_CXXFLAGS += -Zm200
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 4253ce5..edcf1e7 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -73,6 +73,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
const QCString &scopeName,MemberDef *md)
{
ArgumentList *argList=md->argumentList();
+ //printf("writeDefArgumentList `%s' %p\n",md->name().data(),argList);
if (argList==0) return; // member has no function like argument list
if (!md->isDefine()) ol.docify(" ");
@@ -442,28 +443,6 @@ QCString MemberDef::getOutputFileBase() const
return "dummy";
}
-//void MemberDef::setScopeDefTemplateArguments(ArgumentList *tal)
-//{
-// // copy function arguments (if any)
-// if (tal)
-// {
-// scopeTAL = new ArgumentList;
-// scopeTAL->setAutoDelete(TRUE);
-// copyArgumentList(tal,scopeTAL);
-// }
-//}
-//
-//void MemberDef::setMemberDefTemplateArguments(ArgumentList *tal)
-//{
-// // copy function arguments (if any)
-// if (tal)
-// {
-// membTAL = new ArgumentList;
-// membTAL->setAutoDelete(TRUE);
-// copyArgumentList(tal,membTAL);
-// }
-//}
-
void MemberDef::setDefinitionTemplateParameterLists(QList<ArgumentList> *lists)
{
if (lists)
@@ -962,6 +941,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (scopeName) doxyName.prepend((QCString)scopeName+"::");
QCString ldef = definition();
+ //printf("member `%s' def=`%s'\n",name().data(),ldef.data());
if (isEnumerate())
{
if (name().at(0)=='@')
@@ -1090,10 +1070,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName();
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef);
writeDefArgumentList(ol,cd,scopeName,this);
- if (hasOneLineInitializer()
- //!init.isEmpty() && initLines==0 && // one line initializer
- // ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
- ) // add initializer
+ if (hasOneLineInitializer()) // add initializer
{
if (!isDefine())
{
@@ -1566,19 +1543,6 @@ QCString MemberDef::getScopeString() const
return result;
}
-
-//Definition *MemberDef::getCompoundDef() const
-//{
-// NamespaceDef *nd=getNamespaceDef();
-// ClassDef *cd=getClassDef();
-// FileDef *fd=getFileDef();
-// GroupDef *gd=getGroupDef();
-// Definition *d = 0;
-// if (cd) d=cd; else if (nd) d=nd; else if (gd) d=gd; else d=fd;
-// ASSERT(d!=0);
-// return d;
-//}
-
QCString MemberDef::anchor() const
{
if (m_templateMaster) return m_templateMaster->anchor();
@@ -1649,7 +1613,7 @@ MemberDef *MemberDef::createTemplateInstanceMember(
);
imd->argList = actualArgList;
imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs);
- // TODO: init other member variables.
+ // TODO: init other member variables (if needed).
return imd;
}
@@ -1690,7 +1654,16 @@ void MemberDef::addListReference(Definition *d)
{
memLabel=theTranslator->trMember(TRUE,TRUE);
}
+ QCString memName = name();
+ if (!Config_getBool("HIDE_SCOPE_NAMES"))
+ {
+ Definition *pd=getOuterScope();
+ if (pd && pd!=Doxygen::globalScope)
+ {
+ memName.prepend(pd->name()+"::");
+ }
+ }
addRefItem(todoId(),testId(),bugId(),memLabel,
- d->getOutputFileBase()+":"+anchor(),name(),argsString());
+ d->getOutputFileBase()+":"+anchor(),memName,argsString());
}
diff --git a/src/memberdef.h b/src/memberdef.h
index a0d15b7..44fac2d 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -196,10 +196,6 @@ class MemberDef : public Definition
argList = al;
}
ArgumentList *templateArguments() const { return tArgList; }
- //void setScopeDefTemplateArguments(ArgumentList *t);
- //ArgumentList *scopeDefTemplateArguments() const { return scopeTAL; }
- //void setMemberDefTemplateArguments(ArgumentList *t);
- //ArgumentList *memberDefTemplateArguments() const { return membTAL; }
void setDefinitionTemplateParameterLists(QList<ArgumentList> *lists);
QList<ArgumentList> *definitionTemplateParameterLists() const
{ return m_defTmpArgLists; }
diff --git a/src/membergroup.h b/src/membergroup.h
index c67f960..b1dce56 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -91,13 +91,6 @@ class MemberGroupListIterator : public QListIterator<MemberGroup>
QListIterator<MemberGroup>(l) {}
};
-class MemberGroupDict : public QIntDict<MemberGroup>
-{
- public:
- MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {}
- ~MemberGroupDict() {}
-};
-
class MemberGroupSDict : public SIntDict<MemberGroup>
{
public:
@@ -105,12 +98,19 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
~MemberGroupSDict() {}
};
-class MemberGroupDictIterator : public QIntDictIterator<MemberGroup>
-{
- public:
- MemberGroupDictIterator(const MemberGroupDict &d) :
- QIntDictIterator<MemberGroup>(d) {}
- ~MemberGroupDictIterator() {}
-};
+//class MemberGroupDict : public QIntDict<MemberGroup>
+//{
+// public:
+// MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {}
+// ~MemberGroupDict() {}
+//};
+
+//class MemberGroupDictIterator : public QIntDictIterator<MemberGroup>
+//{
+// public:
+// MemberGroupDictIterator(const MemberGroupDict &d) :
+// QIntDictIterator<MemberGroup>(d) {}
+// ~MemberGroupDictIterator() {}
+//};
#endif
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 93ade90..0e3b510 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -147,7 +147,7 @@ class NamespaceDict : public QDict<NamespaceDef>
class NamespaceSDict : public SDict<NamespaceDef>
{
public:
- NamespaceSDict(int size) : SDict<NamespaceDef>(size) {}
+ NamespaceSDict(int size=17) : SDict<NamespaceDef>(size) {}
~NamespaceSDict() {}
int compareItems(GCI item1,GCI item2)
{
diff --git a/src/outputgen.h b/src/outputgen.h
index 1e8e509..1e061e6 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -272,7 +272,7 @@ class BaseOutputDocInterface
class OutputGenerator : public BaseOutputDocInterface
{
public:
- enum OutputType { Html, Latex, Man, RTF, XML };
+ enum OutputType { Html, Latex, Man, RTF, XML, DEF };
OutputGenerator();
virtual ~OutputGenerator();
diff --git a/src/pre.l b/src/pre.l
index 2ddb120..8586270 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -832,6 +832,8 @@ Define *newDefine()
void addDefine()
{
//printf("addDefine %s %s\n",g_defName.data(),g_defArgsStr.data());
+ //ArgumentList *al = new ArgumentList;
+ //stringToArgumentList(g_defArgsStr,al);
MemberDef *md=new MemberDef(
g_yyFileName,g_yyLineNr,
"#define",g_defName,g_defArgsStr,0,
diff --git a/src/scanner.l b/src/scanner.l
index 04bb08f..5615224 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -76,6 +76,7 @@ static int lastInitializerContext;
static int lastClassTemplSpecContext;
static int lastSkipHtmlCommentContext;
static int lastIfContext;
+static int lastInternalDocContext;
static int nextDefContext;
static int overloadContext;
static Protection protection;
@@ -135,7 +136,7 @@ static QCString *copyArgString;
static QCString fullArgString;
static ArgumentList *currentArgumentList;
-static QCString *currentTemplateSpec;
+//static QCString *currentTemplateSpec;
static char lastCopyArgChar;
static QCString *pCopyRoundString;
static QCString *pCopyCurlyString;
@@ -525,6 +526,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x ClassDocBrief
%x ClassDocOverload
%x ClassDefineArgs
+%x DocInternal
+%x DocInternalLine
%x DocBaseClass
%x CppQuote
%x EndCppQuote
@@ -1034,15 +1037,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
sharpCount=0;
lineCount();
addType( current );
- //if (current->mtArgList && current->tArgList==0)
- //{
- // current->tArgList=current->mtArgList;
- // current->mtArgList=0;
- //}
current->name=yytext;
current->name=current->name.stripWhiteSpace();
- current->scopeSpec.resize(0);
- currentTemplateSpec = &current->scopeSpec;
+ //current->scopeSpec.resize(0);
+ // currentTemplateSpec = &current->scopeSpec;
if (nameIsOperator(current->name))
BEGIN( Operator );
else
@@ -1052,8 +1050,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
sharpCount=0;
lineCount();
current->name+=((QCString)yytext).stripWhiteSpace();
- current->memberSpec.resize(0);
- currentTemplateSpec = &current->memberSpec;
+ //current->memberSpec.resize(0);
+ // currentTemplateSpec = &current->memberSpec;
if (nameIsOperator(current->name))
BEGIN( Operator );
else
@@ -1061,20 +1059,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<EndTemplate>"<<" {
current->name+=yytext;
- *currentTemplateSpec+=yytext;
+ // *currentTemplateSpec+=yytext;
}
<EndTemplate>"<" {
current->name+='<';
- *currentTemplateSpec+='<';
+ // *currentTemplateSpec+='<';
sharpCount++;
}
<EndTemplate>">>" {
current->name+=yytext;
- *currentTemplateSpec+=yytext;
+ // *currentTemplateSpec+=yytext;
}
<EndTemplate>">" {
current->name+='>';
- *currentTemplateSpec+='>';
+ // *currentTemplateSpec+='>';
if (--sharpCount<=0)
{
//printf("Found %s\n",current->name.data());
@@ -1084,7 +1082,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<EndTemplate>">"{BN}*"(" {
lineCount();
current->name+='>';
- *currentTemplateSpec+='>';
+ // *currentTemplateSpec+='>';
if (--sharpCount<=0)
{
current->args = "(";
@@ -1098,7 +1096,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<EndTemplate>">"{BN}*/"::" {
lineCount();
current->name+='>';
- *currentTemplateSpec+='>';
+ // *currentTemplateSpec+='>';
if (--sharpCount<=0)
{
BEGIN(FindMemberName);
@@ -1106,7 +1104,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<EndTemplate>. {
current->name+=*yytext;
- *currentTemplateSpec+=*yytext;
+ // *currentTemplateSpec+=*yytext;
}
<FindMembers,FindMemberName>{SCOPENAME} {
lineCount();
@@ -1203,11 +1201,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCPP>[\r]*\n[\r]* { yyLineNr++ ;
BEGIN( lastCPPContext) ;
}
-<Define>{ID}/"(" {
- current->bodyLine = yyLineNr;
+<Define>{ID}{B}*"(" {
current->name = yytext;
- BEGIN( DefineArg );
+ current->name = current->name.left(current->name.length()-1).stripWhiteSpace();
+ current->args = "(";
+ current->bodyLine = yyLineNr;
+ currentArgumentContext = DefineEnd;
+ fullArgString=current->args.copy();
+ copyArgString=&current->args;
+ BEGIN( ReadFuncArgType ) ;
}
+ /*
<DefineArg>")" {
//printf("Define with args\n");
current->args += ')';
@@ -1216,6 +1220,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<DefineArg>. {
current->args += *yytext;
}
+ */
<Define>{ID} {
//printf("Define `%s' without args\n",yytext);
current->bodyLine = yyLineNr;
@@ -2849,21 +2854,21 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
- current->groupdoctype = Entry::GROUPDOC_NORMAL;
+ current->groupDocType = Entry::GROUPDOC_NORMAL;
BEGIN( GroupDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"addtogroup"{B}+ {
current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
- current->groupdoctype = Entry::GROUPDOC_ADD;
+ current->groupDocType = Entry::GROUPDOC_ADD;
BEGIN( GroupDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"weakgroup"{B}+ {
current->section = Entry::GROUPDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
- current->groupdoctype = Entry::GROUPDOC_WEAK;
+ current->groupDocType = Entry::GROUPDOC_WEAK;
BEGIN( GroupDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"namespace"{B}+ {
@@ -3139,7 +3144,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<GroupDocArg1>{ID}(".html"?) {
current->name = yytext;
lastDefGroup.groupname = yytext;
- lastDefGroup.pri = current->groupingpri();
+ lastDefGroup.pri = current->groupingPri();
// the .html stuff is for Qt compatibility
if (current->name.right(5)==".html")
current->name=current->name.left(current->name.length()-5);
@@ -3149,7 +3154,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<GroupDocArg1>"\n" {
warn(yyFileName,yyLineNr,
"Warning: missing group name after %s",
- current->groupdoccmd()
+ current->groupDocCmd()
);
yyLineNr++;
BEGIN( Doc );
@@ -3165,7 +3170,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->type = current->type.stripWhiteSpace();
}
<GroupDocArg2>"\n" {
- if( current->groupdoctype == Entry::GROUPDOC_NORMAL &&
+ if( current->groupDocType == Entry::GROUPDOC_NORMAL &&
current->type.length() == 0 )
warn(yyFileName,yyLineNr,
"Warning: missing title after "
@@ -3417,7 +3422,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
if (current->section==Entry::GROUPDOC_SEC )
{
autoGroupStack.push(new Grouping(current->name,
- current->groupingpri()
+ current->groupingPri()
));
}
else if (current->section == Entry::MEMBERGRP_SEC)
@@ -3899,12 +3904,42 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(lastAfterDocContext);
}
<AfterDocBrief>"."/{BN} { BEGIN(AfterDoc); }
-<LineDoc,AfterDocBrief,AfterDocLine>{CMD}"internal" {
- current->brief+="\\internal";
+<LineDoc,AfterDocLine>{CMD}"internal" {
+ if (!Config_getBool("INTERNAL_DOCS"))
+ {
+ lastInternalDocContext = YY_START;
+ BEGIN( DocInternalLine );
+ }
+ else
+ {
+ current->doc+="\\internal";
+ }
}
-<Doc,AfterDoc>{CMD}"internal" {
- current->doc+="\\internal";
+<Doc,JavaDoc,ExampleDoc,PageDoc,ClassDoc,AfterDoc>{CMD}"internal" {
+ if (!Config_getBool("INTERNAL_DOCS"))
+ {
+ lastInternalDocContext = YY_START;
+ BEGIN( DocInternal );
+ }
+ else
+ {
+ current->doc+="\\internal";
+ }
}
+<DocInternal>.
+<DocInternal>\n { yyLineNr++; }
+<DocInternal>"/*"|"//"
+<DocInternal>"*/" {
+ unput('/');
+ unput('*');
+ BEGIN( lastInternalDocContext );
+ }
+<DocInternalLine>.
+<DocInternalLine>\n {
+ yyLineNr++;
+ unput('\n');
+ BEGIN( lastInternalDocContext );
+ }
<AfterDoc>{CMD}"brief" { BEGIN(AfterDocBrief); }
<AfterDoc>"/*"|"//" { current->doc+=yytext; }
<AfterDoc>^{B}*"*"+/[^/]
diff --git a/src/translator_de.h b/src/translator_de.h
index aacd20e..8df6c33 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -27,7 +27,7 @@
// - changed trPageDocumentation() "Seitenbeschreibung" to
// "Zusätzliche Informationen"
// - removed old trGeneratedFrom()
-// - changed "/*!" to "/*" (documentation is inherited from translator.h
+// - changed "/*!" to "/*" (documentation is inherited from translator_en.h
// (INHERIT_DOCS = YES), there's no need to make changes twice)
// - Update for "new since 1.2.4" version
//
@@ -52,20 +52,21 @@
// 2001/07/24 Jens Seidel (jensseidel@users.sourceforge.net)
// - trClassDocumentation() updated as in the English translator.
//
-// Todo:
+// 2001/11/30 Oliver Brandt (o.brandt@tu-bs.de) and
+// Jens Seidel (jensseidel@users.sourceforge.net)
+// - trReferences() implemented.
+// - trCompoundReference(), trLegendDocs() updated
+// - Removed some TODO's
+//
+// Todo:
// - translation of all Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
// strings (see translator_en.h)
-// - translation of "compound"
// - see FIXME
-// - was ist richtig: "Liste aller dokumentierter Elemente" oder
-// "Liste aller dokumentierten Elemente" (aktuell)
-// (nach "aller" suchen)
-// "Mithilfe" oder "Mit Hilfe"
#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H
-class TranslatorGerman : public TranslatorAdapter_1_2_11
+class TranslatorGerman : public Translator
{
public:
@@ -180,7 +181,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
/* This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
- { return "Übersicht"; }
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datenstrukturen";
+ }
+ else
+ {
+ return "Übersicht";
+ }
+ }
/* This is put above each page as a link to the list of documented files */
virtual QCString trFileList()
@@ -192,7 +202,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
/* This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
- { return "Elementübersicht"; }
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datenstruktur-Elemente";
+ }
+ else
+ {
+ return "Datenstruktur-Elemente";
+ }
+ }
/* This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
@@ -232,8 +251,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
return "Hier folgt die Aufzählung aller Datenstrukturen "
"mit einer Kurzbeschreibung:";
else
- return "Hier folgt die Aufzählung aller Klassen, Strukturen "
- "und Varianten mit einer Kurzbeschreibung:"; // FIXME: "interfaces" = ??
+ return "Hier folgt die Aufzählung aller Klassen, Strukturen, "
+ "Varianten und Schnittstellen mit einer Kurzbeschreibung:";
}
/* This is an introduction to the page with all class members. */
@@ -247,7 +266,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
result+="Klassenelemente mit Verweisen auf ";
if (extractAll) {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- result+="die struct/union Dokumentation zu jedem Element:";
+ result+="die Dokumentation zu jedem Element:";
else
result+="die Klassendokumentation zu jedem Element:";
} else {
@@ -264,8 +283,15 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
{
QCString result="Hier folgt die Aufzählung aller ";
if (!extractAll) result+="dokumentierten ";
- result+="Dateielemente mit Verweisen auf ";
- if (extractAll) result+="die Dateidokumentation zu jedem Element:";
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ result+="Funktionen, Variablen, Makros, Aufzählungen und Typendefinitionen mit Verweisen auf ";
+ }
+ else
+ {
+ result+="Dateielemente mit Verweisen auf ";
+ }
+ if (extractAll) result+="die Dokumentation zu jedem Element:";
else result+="die zugehörigen Dateien:";
return result;
}
@@ -314,11 +340,11 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
* annotated compound index.
*/
virtual QCString trCompoundIndex()
- {
+ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- return "Datenstruktur-Verzeichnis";
+ return "Datenstruktur-Verzeichnis";
else
- return "Datenstruktur-Verzeichnis"; // FIXME: war compound
+ return "Datenstruktur-Verzeichnis";
}
/* This is used in LaTeX as the title of the chapter with the
@@ -454,7 +480,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
* the list of links to documented compounds
*/
virtual QCString trCompounds()
- { return "Übersicht"; }
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datenstrukturen";
+ }
+ else
+ {
+ return "Übersicht";
+ }
+ }
/* This is used in the standard footer of each page and indicates when
* the page was generated
@@ -565,16 +600,17 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
/* used as the title of the HTML page of a class/struct/union */
virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType,
- bool /*isTemplate*/) // FIXME
+ bool isTemplate)
{
QCString result=(QCString)clName+" ";
+ if (isTemplate) result+="Template ";
switch(compType)
{
- case ClassDef::Class: result+=" Klassen"; break;
- case ClassDef::Struct: result+=" Strukturen"; break;
- case ClassDef::Union: result+=" Varianten"; break;
- case ClassDef::Interface: result+=" Interface"; break;
- case ClassDef::Exception: result+=" Exception"; break;
+ case ClassDef::Class: result+="Klassen"; break;
+ case ClassDef::Struct: result+="Struktur"; break;
+ case ClassDef::Union: result+="Varianten"; break;
+ case ClassDef::Interface: result+="Schnittstellen"; break;
+ case ClassDef::Exception: result+="Ausnahmen"; break;
}
result+="referenz";
return result;
@@ -742,7 +778,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
case ClassDef::Class: result+=" Klasse"; break;
case ClassDef::Struct: result+=" Struktur"; break;
case ClassDef::Union: result+=" Variante"; break;
- case ClassDef::Interface: result+="s Interface"; break;
+ case ClassDef::Interface: result+=" Schnittstelle"; break;
case ClassDef::Exception: result+=" Ausnahme"; break;
}
result+=" wurde erzeugt aufgrund der Datei";
@@ -904,7 +940,14 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
virtual QCString trPublicAttribs()
{
- return "Öffentliche Attribute";
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datenfelder";
+ }
+ else
+ {
+ return "Öffentliche Attribute";
+ }
}
virtual QCString trStaticPublicAttribs()
@@ -1015,6 +1058,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
"class Undocumented { };\n\n"
"/*! Mithilfe öffentlicher Vererbung vererbte Klasse */\n"
"class PublicBase : public Truncated { };\n\n"
+ "/*! Eine Template Klasse */\n"
+ "template<class T> class Templ { };\n\n"
"/*! Mithilfe geschützter Vererbung vererbte Klasse */\n"
"class ProtectedBase { };\n\n"
"/*! Mithilfe privater Vererbung vererbte Klasse */\n"
@@ -1026,13 +1071,14 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
" protected ProtectedBase,\n"
" private PrivateBase,\n"
" public Undocumented\n"
+ " public Templ<int>\n"
"{\n"
" private:\n"
" Used *m_usedClass;\n"
"};\n"
- "\\endcode\n"
+ "\\endcode\n\n"
"Setzen des Tags \\c MAX_DOT_GRAPH_HEIGHT in der Konfigurationsdatei "
- "auf 200 liefert den folgenden Graphen:"
+ "auf 240 liefert den folgenden Graphen:"
"<p><center><img src=\"graph_legend.gif\"></center>\n"
"<p>\n"
"Die Rechtecke in obigem Graphen bedeuten:\n"
@@ -1046,7 +1092,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
"<li>Ein Rechteck mit rotem Rahmen kennzeichnet eine dokumentierte "
"Struktur oder Klasse, für die nicht alle Vererbungs-/"
"Enthaltenseinsbeziehungen dargestellt werden. Ein Graph wird gekürzt, "
- "wenn er nicht in die angegebenen Schranken passt."
+ "wenn er nicht in die angegebenen Schranken passt.\n"
"</ul>\n"
"Die Pfeile bedeuten:\n"
"<ul>\n"
@@ -1054,10 +1100,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
"zwischen zwei Klassen dar.\n"
"<li>Ein dunkelgrüner Pfeil stellt geschützte Vererbung dar.\n"
"<li>Ein dunkelroter Pfeil stellt private Vererbung dar.\n"
- "<li>Ein gestrichelter violetter Pfeil bedeutet, dass eine Klasse in einer "
- "anderen enthalten ist oder von einer anderen benutzt wird. Am Pfeil "
- "stehen die Variable(n), mit deren Hilfe auf die Struktur oder Klasse "
- "an der Pfeilspitze zugegriffen werden kann.\n"
+ "<li>Ein gestrichelter violetter Pfeil bedeutet, dass eine Klasse in "
+ "einer anderen enthalten ist oder von einer anderen benutzt wird. Am "
+ "Pfeil stehen die Variable(n), mit deren Hilfe auf die Struktur oder "
+ "Klasse an der Pfeilspitze zugegriffen werden kann.\n"
+ "<li>Ein gestrichelter gelber Pfeil kennzeichnet eine Verknüpfung "
+ "zwischen einer Template Instanz und der Template Klasse von welcher "
+ "es abstammt. Neben dem Pfeil sind die Template Parameter aufgeführt.\n"
"</ul>\n";
}
@@ -1171,13 +1220,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
/* Used as a marker that is put before a \bug item */
virtual QCString trBug()
{
- return "Bug";
+ return "Fehler";
}
/* Used as the header of the bug list */
virtual QCString trBugList()
{
- return "Bug Liste";
+ return "Liste der bekannten Fehler";
}
//////////////////////////////////////////////////////////////////////////
@@ -1280,7 +1329,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
*/
virtual QCString trField(bool, bool singular)
{
- QCString result("Feld"); // FIXME
+ QCString result("Feld");
if (!singular) result+="er";
return result;
}
@@ -1309,7 +1358,17 @@ class TranslatorGerman : public TranslatorAdapter_1_2_11
if (!singular) result+="en";
return result;
}
-
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.11
+//////////////////////////////////////////////////////////////////////////
+
+ /* This text is put before the list of members referenced by a member
+ */
+ virtual QCString trReferences()
+ {
+ return "Benutzt";
+ }
};
#endif
diff --git a/src/translator_pt.h b/src/translator_pt.h
index 4f3ffa8..05ade1a 100644
--- a/src/translator_pt.h
+++ b/src/translator_pt.h
@@ -18,6 +18,8 @@
*
* VERSION HISTORY
* ---------------
+ * 003 23 november 2001
+ * - Removed some obsolete methods (latexBabelPackage, trAuthor, trAuthors and trFiles)
* 002 19 november 2001
* ! Updated for doxygen v1.2.12
* 001 20 july 2001
@@ -61,10 +63,6 @@ class TranslatorPortuguese : public Translator
virtual QCString latexLanguageSupportCommand()
{ return "Portuguese"; }
- /*! returns the name of the package that is included by LaTeX */
- QCString latexBabelPackage()
- { return "portuguese"; }
-
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
{ return "iso-8859-1"; }
@@ -449,10 +447,6 @@ class TranslatorPortuguese : public Translator
QCString trEnumerationValues()
{ return "Valores da enumeração"; }
- /*! This is used in man pages as the author section. */
- QCString trAuthor()
- { return "Autor"; }
-
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
@@ -510,12 +504,6 @@ class TranslatorPortuguese : public Translator
}
}
- /*! This is used in the documentation of a group before the list of
- * links to documented files
- */
- QCString trFiles()
- { return "Ficheiros"; }
-
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
@@ -564,10 +552,6 @@ class TranslatorPortuguese : public Translator
QCString trDate()
{ return "Data"; }
- /*! this text is generated when the \\author command is used. */
- QCString trAuthors()
- { return "Autor(es)"; }
-
/*! this text is generated when the \\return command is used. */
QCString trReturns()
{ return "Retorna"; }
diff --git a/src/util.cpp b/src/util.cpp
index 0baf3f7..4381c54 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -842,7 +842,7 @@ QCString argListToString(ArgumentList *al)
QCString tempArgListToString(ArgumentList *al)
{
QCString result;
- if (!al || al->count()==0) return result;
+ if (al==0) return result;
result="<";
Argument *a=al->first();
while (a)
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 0c3a5da..9ab3e33 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -30,6 +30,8 @@
#include "doc.h"
#include "dot.h"
#include "code.h"
+#include "page.h"
+#include "filename.h"
#include <qdir.h>
#include <qfile.h>
@@ -164,6 +166,7 @@ template<class T> class ValStack
* Its methods are called when some XML text or markup
* needs to be written.
*/
+// TODO: htmlonly, latexonly
class XMLGenerator : public OutputDocInterface
{
public:
@@ -228,7 +231,8 @@ class XMLGenerator : public OutputDocInterface
void writeString(const char *text)
{
startParMode();
- m_t << text;
+ //m_t << text;
+ docify(text);
}
void startItemList()
{
@@ -823,6 +827,8 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
// + source references
// + source referenced by
// - body code
+ // - template arguments
+ // (templateArguments(), definitionTemplateParameterLists())
if (md->memberType()==MemberDef::EnumValue) return;
@@ -1115,11 +1121,11 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t)
// + detailed description
// - template arguments
// - include file
- // - member groups
+ // + member groups
// + inheritance diagram
// + list of direct super classes
// + list of direct sub classes
- // - list of inner classes
+ // + list of inner classes
// + collaboration diagram
// - list of all members
// + user defined member sections
@@ -1188,6 +1194,17 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t)
}
}
+ ClassSDict *cl = cd->getInnerClasses();
+ if (cl)
+ {
+ ClassSDict::Iterator cli(*cl);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ t << " <innerclass refid=\"" << cd->getOutputFileBase()
+ << "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
+ }
+ }
MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
@@ -1247,9 +1264,9 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t)
static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &t)
{
- // - contained class definitions
- // - contained namespace definitions
- // - member groups
+ // + contained class definitions
+ // + contained namespace definitions
+ // + member groups
// + normal members
// + brief desc
// + detailed desc
@@ -1263,6 +1280,28 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &t)
writeXMLString(t,nd->name());
t << "</compoundname>" << endl;
+ ClassSDict *cl = nd->classSDict;
+ if (cl)
+ {
+ ClassSDict::Iterator cli(*cl);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ t << " <innerclass refid=\"" << cd->getOutputFileBase()
+ << "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
+ }
+ }
+ NamespaceSDict *nl = nd->namespaceSDict;
+ if (nl)
+ {
+ NamespaceSDict::Iterator nli(*nl);
+ NamespaceDef *nd;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ t << " <innernamespace refid=\"" << nd->getOutputFileBase()
+ << "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
+ }
+ }
MemberGroupSDict::Iterator mgli(*nd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
@@ -1295,9 +1334,9 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t)
// + includedby files
// + include graph
// + included by graph
- // - contained class definitions
- // - contained namespace definitions
- // - member groups
+ // + contained class definitions
+ // + contained namespace definitions
+ // + member groups
// + normal members
// + brief desc
// + detailed desc
@@ -1356,6 +1395,29 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t)
t << " </invincdepgraph>" << endl;
}
+ ClassSDict *cl = fd->classSDict;
+ if (cl)
+ {
+ ClassSDict::Iterator cli(*cl);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ t << " <innerclass refid=\"" << cd->getOutputFileBase()
+ << "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
+ }
+ }
+ NamespaceSDict *nl = fd->namespaceSDict;
+ if (nl)
+ {
+ NamespaceSDict::Iterator nli(*nl);
+ NamespaceDef *nd;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ t << " <innernamespace refid=\"" << nd->getOutputFileBase()
+ << "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
+ }
+ }
+
MemberGroupSDict::Iterator mgli(*fd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
@@ -1383,6 +1445,113 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t)
t << " </compounddef>" << endl;
}
+static void generateXMLForGroup(GroupDef *gd,QTextStream &t)
+{
+ // + members
+ // + member groups
+ // + files
+ // + classes
+ // + namespaces
+ // - packages
+ // + pages
+ // + child groups
+ // - examples
+ // + brief description
+ // + detailed description
+
+ t << " <compounddef id=\""
+ << gd->getOutputFileBase() << "\" kind=\"group\">" << endl;
+ t << " <name>" << convertToXML(gd->name()) << "</name>" << endl;
+ t << " <title>" << convertToXML(gd->groupTitle()) << "</title>" << endl;
+
+ FileList *fl = gd->getFiles();
+ if (fl)
+ {
+ QListIterator<FileDef> fli(*fl);
+ FileDef *fd = fl->first();
+ for (fli.toFirst();(fd=fli.current());++fli)
+ {
+ t << " <innerfile refid=\"" << fd->getOutputFileBase()
+ << "\">" << convertToXML(fd->name()) << "</innerfile>" << endl;
+ }
+ }
+ ClassSDict *cl = gd->getClasses();
+ if (cl)
+ {
+ ClassSDict::Iterator cli(*cl);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ t << " <innerclass refid=\"" << cd->getOutputFileBase()
+ << "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
+ }
+ }
+ NamespaceList *nl = gd->getNamespaces();
+ if (nl)
+ {
+ NamespaceListIterator nli(*nl);
+ NamespaceDef *nd;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ t << " <innernamespace refid=\"" << nd->getOutputFileBase()
+ << "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
+ }
+ }
+ PageSDict *pl = gd->getPages();
+ if (pl)
+ {
+ PageSDict::Iterator pli(*pl);
+ PageInfo *pi;
+ for (pli.toFirst();(pi=pli.current());++pli)
+ {
+ t << " <innerpage refid=\"" << pi->getOutputFileBase()
+ << "\"/>" << convertToXML(pi->title) << "</innerpage>" << endl;
+ }
+ }
+
+ MemberGroupSDict::Iterator mgli(*gd->memberGroupSDict);
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ generateXMLSection(gd,t,mg->members(),"user-defined",mg->header());
+ }
+
+ generateXMLSection(gd,t,&gd->decDefineMembers,"define");
+ generateXMLSection(gd,t,&gd->decProtoMembers,"prototype");
+ generateXMLSection(gd,t,&gd->decTypedefMembers,"typedef");
+ generateXMLSection(gd,t,&gd->decEnumMembers,"enum");
+ generateXMLSection(gd,t,&gd->decFuncMembers,"func");
+ generateXMLSection(gd,t,&gd->decVarMembers,"var");
+
+ t << " <briefdescription>" << endl;
+ writeXMLDocBlock(t,gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription());
+ t << " </briefdescription>" << endl;
+ t << " <detaileddescription>" << endl;
+ writeXMLDocBlock(t,gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation());
+ t << " </detaileddescription>" << endl;
+ t << " </compounddef>" << endl;
+}
+
+static void generateXMLForPage(PageInfo *pi,QTextStream &t)
+{
+ // + name
+ // + title
+ // + documentation
+
+ t << " <compounddef id=\"";
+ if (Config_getBool("CASE_SENSE_NAMES")) t << pi->name; else t << pi->name.lower();
+ t << "\">" << endl;
+ t << " <name>" << pi->name << "</name>" << endl;
+ SectionInfo *si = Doxygen::sectionDict.find(pi->name);
+ if (si)
+ {
+ t << " <title>" << si->title << "</title>" << endl;
+ }
+ t << " <detaileddescription>" << endl;
+ writeXMLDocBlock(t,pi->defFileName,pi->defLine,0,0,pi->doc);
+ t << " </detaileddescription>" << endl;
+ t << " </compounddef>" << endl;
+}
void generateXML()
{
@@ -1391,8 +1560,9 @@ void generateXML()
// + namespaces
// + files
// - packages
- // - groups
- // - related pages
+ // + groups
+ // + related pages
+ // - examples
QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if (outputDirectory.isEmpty())
@@ -1475,6 +1645,19 @@ void generateXML()
generateXMLForFile(fd,t);
}
}
+ GroupSDict::Iterator gli(Doxygen::groupSDict);
+ GroupDef *gd;
+ for (;(gd=gli.current());++gli)
+ {
+ generateXMLForGroup(gd,t);
+ }
+ PageSDict::Iterator pdi(*Doxygen::pageSDict);
+ PageInfo *pi=0;
+ for (pdi.toFirst();(pi=pdi.current());++pdi)
+ {
+ generateXMLForPage(pi,t);
+ }
+
//t << " </compoundlist>" << endl;
}
t << "</doxygen>" << endl;