summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2000-04-30 17:13:40 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2000-04-30 17:13:40 (GMT)
commit3b8b750f05f52572bc72e6e3538345a51d51844a (patch)
treee8fc87186141ebce1c8547a44d7adcd0ec122e14
parenta790b4aefe37b616ec4563877e01aa5f99447c85 (diff)
downloadDoxygen-3b8b750f05f52572bc72e6e3538345a51d51844a.zip
Doxygen-3b8b750f05f52572bc72e6e3538345a51d51844a.tar.gz
Doxygen-3b8b750f05f52572bc72e6e3538345a51d51844a.tar.bz2
Release-1.1.2-20000430
-rw-r--r--INSTALL8
-rw-r--r--README4
-rw-r--r--VERSION2
-rw-r--r--addon/configgen/config_templ.l106
-rw-r--r--addon/configgen/configgen.cpp15
-rw-r--r--addon/doxywizard/pagewidget.cpp2
-rw-r--r--doc/htmlcmds.doc1
-rw-r--r--doc/language.doc18
-rw-r--r--packages/rpm/doxygen.spec2
-rw-r--r--src/classdef.cpp22
-rw-r--r--src/classlist.cpp59
-rw-r--r--src/classlist.h1
-rw-r--r--src/code.l184
-rw-r--r--src/config.l276
-rw-r--r--src/declinfo.l2
-rw-r--r--src/definition.h7
-rw-r--r--src/diagram.cpp9
-rw-r--r--src/dot.cpp16
-rw-r--r--src/doxygen.cpp81
-rw-r--r--src/filedef.cpp73
-rw-r--r--src/groupdef.cpp60
-rw-r--r--src/htmlgen.cpp3
-rw-r--r--src/htmlgen.h3
-rw-r--r--src/index.cpp5
-rw-r--r--src/language.cpp5
-rw-r--r--src/latexgen.cpp6
-rw-r--r--src/latexgen.h3
-rw-r--r--src/mangen.h3
-rw-r--r--src/memberdef.cpp85
-rw-r--r--src/memberdef.h17
-rw-r--r--src/memberlist.cpp54
-rw-r--r--src/namespacedef.cpp75
-rw-r--r--src/outputgen.h3
-rw-r--r--src/outputlist.h5
-rw-r--r--src/pre.l17
-rw-r--r--src/rtfgen.cpp39
-rw-r--r--src/rtfgen.h3
-rw-r--r--src/scanner.l24
-rw-r--r--src/translator_de.h2
-rw-r--r--src/util.cpp28
-rw-r--r--src/util.h1
41 files changed, 759 insertions, 570 deletions
diff --git a/INSTALL b/INSTALL
index 9138291..5cc2a56 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.1.2-20000423
+DOXYGEN Version 1.1.2-20000430
CONTENTS
--------
@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have:
- gunzip doxygen-1.1.2-20000423.src.tar.gz # uncompress the archive
- tar xf doxygen-1.1.2-20000423.src.tar # unpack it
+ gunzip doxygen-1.1.2-20000430.src.tar.gz # uncompress the archive
+ tar xf doxygen-1.1.2-20000430.src.tar # unpack it
2. Run the configure script:
@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy,
-Dimitri van Heesch (23 April 2000)
+Dimitri van Heesch (30 April 2000)
diff --git a/README b/README
index 61b4b34..7ade403 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.1.2-20000423
+DOXYGEN Version 1.1.2-20000430
Please read INSTALL for compilation instructions.
@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
-Dimitri van Heesch (23 April 2000)
+Dimitri van Heesch (30 April 2000)
diff --git a/VERSION b/VERSION
index d6a9c3c..d8ba001 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.2-20000423
+1.1.2-20000430
diff --git a/addon/configgen/config_templ.l b/addon/configgen/config_templ.l
index a86156c..3588a42 100644
--- a/addon/configgen/config_templ.l
+++ b/addon/configgen/config_templ.l
@@ -335,65 +335,79 @@ static void substEnvVarsInStrList(QStrList &sl)
while (s)
{
QCString result(s);
+ bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1);
substEnvVarsInString(result);
-
- int l=result.length();
- int i,p=0;
- // skip spaces
- // search for a "word"
- for (i=0;i<l;i++)
+
+ if (!wasQuoted) /* as a result of the expansion, a single string
+ may have expanded into a list, which we'll
+ add to sl. If the orginal string already
+ contained multiple elements no splitting is done! */
{
- char c;
- // skip until start of new word
- for (;i<l && ((c=result.at(i))==' ' || c=='\t');i++)
- p=i; // p marks the start index of the word
- // skip until end of a word
- for (;i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"');i++);
- if (i<l) // not at the end of the string
+
+
+
+ int l=result.length();
+ int i,p=0;
+ // skip spaces
+ // search for a "word"
+ for (i=0;i<l;i++)
{
- if (c=='"') // word within quotes
+ char c;
+ // skip until start of new word
+ for (;i<l && ((c=result.at(i))==' ' || c=='\t');i++)
+ p=i; // p marks the start index of the word
+ // skip until end of a word
+ for (;i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"');i++);
+ if (i<l) // not at the end of the string
{
- p=i+1;
- for (i++;i<l;i++)
+ if (c=='"') // word within quotes
{
- c=result.at(i);
- if (c=='"') // end quote
+ p=i+1;
+ for (i++;i<l;i++)
{
- // replace the string in the list and go to the next item.
- sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
- sl.next(); // current item is now the old item
- p=i+1;
- break;
- }
- else if (c=='\\') // skip escaped stuff
- {
- i++;
+ c=result.at(i);
+ if (c=='"') // end quote
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ p=i+1;
+ break;
+ }
+ else if (c=='\\') // skip escaped stuff
+ {
+ i++;
+ }
}
}
- }
- else if (c==' ' || c=='\t') // separator
- {
- // replace the string in the list and go to the next item.
- sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
- sl.next(); // current item is now the old item
- p=i+1;
+ else if (c==' ' || c=='\t') // separator
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ p=i+1;
+ }
}
}
+ if (p!=l) // add the leftover as a string
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.right(l-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ }
+
+ // remove the old unexpanded string from the list
+ i=sl.at();
+ sl.remove(); // current item index changes if the last element is removed.
+ if (sl.at()==i) // not last item
+ s = sl.current();
+ else // just removed last item
+ s = 0;
}
- if (p!=l) // add the leftover as a string
+ else // just goto the next element in the list
{
- // replace the string in the list and go to the next item.
- sl.insert(sl.at(),result.right(l-p)); // insert new item before current item.
- sl.next(); // current item is now the old item
+ s=sl.next();
}
-
- // remove the old unexpanded string from the list
- i=sl.at();
- sl.remove(); // current item index changes if the last element is removed.
- if (sl.at()==i) // not last item
- s = sl.current();
- else // just removed last item
- s = 0;
}
}
diff --git a/addon/configgen/configgen.cpp b/addon/configgen/configgen.cpp
index 553db76..e4f9806 100644
--- a/addon/configgen/configgen.cpp
+++ b/addon/configgen/configgen.cpp
@@ -21,9 +21,10 @@
#include <qfile.h>
#include <qlist.h>
#include <qdict.h>
-#include <qstringlist.h>
+#include <qstrlist.h>
#include <stdio.h>
+#include <stdlib.h>
static QString spaces=" ";
@@ -122,7 +123,9 @@ class ConfigOption
stringToC(t,longDesc," t << \"# ","\\n\";");
t << " t << \"\\n\";" << endl;
t << " }" << endl;
- t << " t << \"" << cfgName << " = \";" << endl;
+ t << " t << \"" << cfgName;
+ t << spaces.left(22-cfgName.length());
+ t << "= \";" << endl;
t << " " << writeFunc << "(t,Config::" << varName << ");" << endl;
t << " t << \"\\n\";" << endl;
}
@@ -406,9 +409,11 @@ class ConfigString : public ConfigOption
<< ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
if (m_values.count()>0)
{
- for ( QStringList::Iterator it = m_values.begin(); it != m_values.end(); ++it )
+ char *s = m_values.first();
+ while (s)
{
- t << " " << varName << "->addValue(\"" << (*it) << "\");" << endl;
+ t << " " << varName << "->addValue(\"" << s << "\");" << endl;
+ s = m_values.next();
}
}
}
@@ -434,7 +439,7 @@ class ConfigString : public ConfigOption
private:
ConfigInfo *m_parent;
WidgetType m_widgetType;
- QStringList m_values;
+ QStrList m_values;
};
class ConfigInt : public ConfigOption
diff --git a/addon/doxywizard/pagewidget.cpp b/addon/doxywizard/pagewidget.cpp
index 48ab092..8323029 100644
--- a/addon/doxywizard/pagewidget.cpp
+++ b/addon/doxywizard/pagewidget.cpp
@@ -51,7 +51,7 @@ PageWidget::PageWidget( QTabWidget *parent, const char *name )
m_parent->addTab( this, name );
}
-void PageWidget::addStretch(int stretch=0)
+void PageWidget::addStretch(int stretch)
{
lay->addStretch(stretch);
//printf("Viewport SizeHint %d,%d\n",viewport()->sizeHint().width(),viewport()->sizeHint().height());
diff --git a/doc/htmlcmds.doc b/doc/htmlcmds.doc
index 8d25c6b..b835c37 100644
--- a/doc/htmlcmds.doc
+++ b/doc/htmlcmds.doc
@@ -106,6 +106,7 @@ The special HTML characters entities that are recognized by Doxygen:
writes a character with a circumflex accent (like &acirc;).
<li>\c &?tilde; where ? is one of {A,N,O,a,n,o},
writes a character with a tilde accent (like &atilde;).
+<li>\c &szlig; write a sharp s (i.e. &szlig;) to the output.
</ul>
*/
diff --git a/doc/language.doc b/doc/language.doc
index fc3e481..df40848 100644
--- a/doc/language.doc
+++ b/doc/language.doc
@@ -164,6 +164,18 @@ Here is a list of the languages and their current maintainers:
snob@NOSPAM.int.spb.ru</a>
</TD>
</TR>
+ <TR BGCOLOR="#ffffff">
+ <TD>
+ Croatian
+ </TD>
+ <TD>
+ Boris Bralo
+ </TD>
+ <TD>
+ <a href="mailto:boris.bralo@NOSPAM.zg.tel.hr">
+ boris.bralo@NOSPAM.zg.tel.hr</a>
+ </TD>
+ </TR>
<TR BGCOLOR="#ffffff">
<TD>
@@ -205,9 +217,11 @@ Here is a list of the languages and their current maintainers:
\hline
Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} \\
\hline
- Finish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} \\
+ Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} \\
+ \hline
+ Russian & Nickolay Semyonov & {\tt snob@int.spb.ru} \\
\hline
- Russian & Vladimir Vodolazkiy & {\tt voldemarus@geocities.com} \\
+ Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} \\
\hline
Dutch & Dimitri van Heesch & {\tt dimitri@stack.nl} \\
\hline
diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec
index 6d26724..2c18022 100644
--- a/packages/rpm/doxygen.spec
+++ b/packages/rpm/doxygen.spec
@@ -1,5 +1,5 @@
Name: doxygen
-Version: 1.1.2-20000423
+Version: 1.1.2-20000430
Summary: documentation system for C, C++ and IDL
Release: 1
Source0: doxygen-%{version}.src.tar.gz
diff --git a/src/classdef.cpp b/src/classdef.cpp
index c7ac3ca..eeeee96 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -774,9 +774,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write detailed description
bool exampleFlag=hasExamples();
- if (!briefDescription().isEmpty() ||
+ if ((!briefDescription().isEmpty() && Config::repeatBriefFlag) ||
!documentation().isEmpty() ||
- (startBodyLine!=-1 && bodyDef) ||
+ /*(Config::sourceBrowseFlag && startBodyLine!=-1 && bodyDef) ||*/
exampleFlag)
{
ol.writeRuler();
@@ -884,15 +884,15 @@ void ClassDef::writeDocumentation(OutputList &ol)
enumMembers.writeDocumentation(ol,name());
}
- enumValMembers.countDocMembers();
- if (enumValMembers.totalCount()>0)
- {
- ol.writeRuler();
- ol.startGroupHeader();
- parseText(ol,theTranslator->trEnumerationValueDocumentation());
- ol.endGroupHeader();
- enumValMembers.writeDocumentation(ol,name());
- }
+ //enumValMembers.countDocMembers();
+ //if (enumValMembers.totalCount()>0)
+ //{
+ // ol.writeRuler();
+ // ol.startGroupHeader();
+ // parseText(ol,theTranslator->trEnumerationValueDocumentation());
+ // ol.endGroupHeader();
+ // enumValMembers.writeDocumentation(ol,name());
+ //}
constructors.countDocMembers();
if (constructors.totalCount()>0)
diff --git a/src/classlist.cpp b/src/classlist.cpp
index 527fa58..d037a77 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -18,6 +18,9 @@
#include "classlist.h"
#include "config.h"
#include "util.h"
+#include "outputlist.h"
+#include "language.h"
+#include "scanner.h"
ClassList::ClassList() : QList<ClassDef>()
{
@@ -43,3 +46,59 @@ ClassListIterator::ClassListIterator(const ClassList &cllist) :
QListIterator<ClassDef>(cllist)
{
}
+
+void ClassList::writeDeclaration(OutputList &ol)
+{
+ if (count()>0)
+ {
+ ClassDef *cd=first();
+ bool found=FALSE;
+ while (cd)
+ {
+ if (cd->name().find('@')==-1)
+ {
+ bool isLink = cd->isLinkable();
+ if (isLink || !Config::hideClassFlag)
+ {
+ if (!found)
+ {
+ ol.startMemberHeader();
+ parseText(ol,theTranslator->trCompounds());
+ ol.endMemberHeader();
+ ol.startMemberList();
+ found=TRUE;
+ }
+ ol.startMemberItem(FALSE);
+ switch (cd->compoundType())
+ {
+ case ClassDef::Class: ol.writeString("class"); break;
+ case ClassDef::Struct: ol.writeString("struct"); break;
+ case ClassDef::Union: ol.writeString("union"); break;
+ case ClassDef::Interface: ol.writeString("interface"); break;
+ case ClassDef::Exception: ol.writeString("exception"); break;
+ }
+ ol.writeString(" ");
+ ol.insertMemberAlign();
+ if (isLink)
+ {
+ ol.writeObjectLink(cd->getReference(),
+ cd->getOutputFileBase(),
+ 0,
+ cd->name()
+ );
+ }
+ else
+ {
+ ol.startBold();
+ ol.docify(cd->name());
+ ol.endBold();
+ }
+ ol.endMemberItem(FALSE);
+ }
+ }
+ cd=next();
+ }
+ if (found) ol.endMemberList();
+ }
+}
+
diff --git a/src/classlist.h b/src/classlist.h
index 4692ac0..7162459 100644
--- a/src/classlist.h
+++ b/src/classlist.h
@@ -30,6 +30,7 @@ class ClassList : public QList<ClassDef>
~ClassList();
int compareItems(GCI item1,GCI item2);
+ void writeDeclaration(OutputList &ol);
};
class ClassListIterator : public QListIterator<ClassDef>
diff --git a/src/code.l b/src/code.l
index a52f329..f6d7acb 100644
--- a/src/code.l
+++ b/src/code.l
@@ -34,7 +34,6 @@
#include "outputlist.h"
#include "util.h"
-#define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1
class CodeClassDef
@@ -107,12 +106,17 @@ static QCString g_exampleFile;
static int g_anchorCount;
static FileDef * g_sourceFileDef;
static bool g_includeCodeFragment;
+static const char * g_currentFontClass;
// start a new line of code, inserting a line number if g_sourceFileDef
// is TRUE. If a definition starts at the current line, then the line
// number is linked to the documentation of that definition.
static void startCodeLine(OutputList &ol)
{
+ if (g_currentFontClass)
+ {
+ g_code->endFontClass();
+ }
if (g_sourceFileDef)
{
QCString lineNumber,lineAnchor;
@@ -135,6 +139,10 @@ static void startCodeLine(OutputList &ol)
}
}
ol.startCodeLine();
+ if (g_currentFontClass)
+ {
+ g_code->startFontClass(g_currentFontClass);
+ }
}
// write a code fragment `text' that may span multiple lines, inserting
@@ -175,8 +183,7 @@ static void writeMultiLineCodeLink(OutputList &ol,
const char *anchor,const char *text)
{
bool done=FALSE;
- QCString ts = text;
- char *p=ts.data();
+ char *p=(char *)text;
while (!done)
{
char *sp=p;
@@ -226,7 +233,7 @@ static void setClassScope(const QCString &name)
QCString n=name;
n=n.simplifyWhiteSpace();
int index;
- if ((index=n.find("::"))!=-1)
+ if ((index=n.findRev("::"))!=-1)
g_classScope=n.left(index);
else
g_classScope.resize(0);
@@ -238,11 +245,17 @@ static void addVariable()
g_cvd.name=g_name.copy().simplifyWhiteSpace();
g_cvd.type=g_type.copy().simplifyWhiteSpace();
if (g_type.isEmpty())
+ {
return;
- else if ((getClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
+ }
+ else
{
- g_cvd.classScope=g_classScope;
- g_codeVarList.append(new CodeVarDef(g_cvd)); // add it to a list
+ //printf("adding variable `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
+ if ((getClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
+ {
+ g_cvd.classScope=g_classScope;
+ g_codeVarList.append(new CodeVarDef(g_cvd)); // add it to a list
+ }
}
}
@@ -251,20 +264,32 @@ static void addParameter()
g_cvd.name=g_parmName.copy().simplifyWhiteSpace();
g_cvd.type=g_parmType.copy().simplifyWhiteSpace();
if (g_cvd.type.isEmpty())
+ {
return;
- else if ((getClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
+ }
+ else
{
- g_cvd.classScope=g_classScope;
- g_codeParmList.append(new CodeVarDef(g_cvd)); // add it to a list
+ //printf("adding parameter `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
+ if ((getClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
+ {
+ g_cvd.classScope=g_classScope;
+ g_codeParmList.append(new CodeVarDef(g_cvd)); // add it to a list
+ }
}
}
-static void generateClassLink(OutputList &ol,char *clName)
+static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0)
{
+ int i=0;
QCString className=clName;
+ if (clNameLen) *clNameLen=0;
if (className.isEmpty()) return;
- ClassDef *cd;
- if ((cd=getClass(className)) && cd->isLinkable())
+ ClassDef *cd=getClass(className);
+ if (cd==0 && (i=className.find('<'))!=-1)
+ {
+ cd=getClass(className.left(i));
+ }
+ if (cd && cd->isLinkable())
{
if (g_exampleBlock)
{
@@ -285,12 +310,13 @@ static void generateClassLink(OutputList &ol,char *clName)
g_anchorCount++;
}
}
- //ol.writeCodeLink(cd->getReference(),cd->getOutputFileBase(),0,className);
writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),0,className);
+ if (clNameLen) *clNameLen=className.length()-i-1;
}
else
{
codifyLines(clName);
+ if (clNameLen) *clNameLen=className.length()-1;
}
}
@@ -330,11 +356,9 @@ static bool getLink(const char *className,
Definition *d=0;
if (cd) d=cd; else if (cd) d=nd; else if (fd) d=fd; else d=gd;
- if (d)
+ if (d && d->isLinkable())
{
//printf("d->getOutputBase()=`%s' name=`%s'\n",d->getOutputFileBase().data(),md->name().data());
- //result.writeCodeLink(d->getReference(),d->getOutputFileBase(),
- // md->anchor(),text ? text : memberName);
writeMultiLineCodeLink(result,d->getReference(),d->getOutputFileBase(),
md->anchor(),text ? text : memberName);
return TRUE;
@@ -413,7 +437,7 @@ static void generateMemberLink(OutputList &ol,const char *varName,
else
{
ClassDef *vcd = getClass(g_classScope);
- if (vcd)
+ if (vcd && vcd->isLinkable())
{
//printf("Found class for variable `%s'\n",varName);
MemberName *vmn=memberNameDict[varName];
@@ -427,7 +451,7 @@ static void generateMemberLink(OutputList &ol,const char *varName,
{
//printf("Found variable type=%s\n",vmd->typeString());
ClassDef *mcd=stripClassName(vmd->typeString());
- if (mcd)
+ if (mcd && mcd->isLinkable())
{
MemberName *mmn=memberNameDict[memName];
if (mmn)
@@ -438,8 +462,6 @@ static void generateMemberLink(OutputList &ol,const char *varName,
{
if (mmd->memberClass()==mcd)
{
- //ol.writeCodeLink(mcd->getReference(),mcd->getOutputFileBase(),
- // mmd->anchor(),memName);
writeMultiLineCodeLink(ol,mcd->getReference(),
mcd->getOutputFileBase(),mmd->anchor(),memName);
return;
@@ -519,6 +541,22 @@ static int countLines()
return count;
}
+static void endFontClass()
+{
+ if (g_currentFontClass)
+ {
+ g_code->endFontClass();
+ g_currentFontClass=0;
+ }
+}
+
+static void startFontClass(const char *s)
+{
+ endFontClass();
+ g_code->startFontClass(s);
+ g_currentFontClass=s;
+}
+
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
@@ -541,6 +579,8 @@ B [ \t]
BN [ \t\n\r]
ID [a-z_A-Z][a-z_A-Z0-9]*
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
+KEYWORD ("asm"|"auto"|"break"|"case"|"catch"|"class"|"const_cast"|"continue"|"default"|"delete"|"do"|"dynamic_cast"|"else"|"enum"|"explicit"|"extern"|"false"|"for"|"friend"|"goto"|"if"|"inline"|"mutable"|"namespace"|"new"|"operator"|"private"|"protected"|"public"|"register"|"reinterpret_cast"|"return"|"sizeof"|"static"|"static_cast"|"struct"|"switch"|"template"|"this"|"throw"|"true"|"try"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"while")
+TYPEKW ("bool"|"char"|"const"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"|"void"|"wchar_t")
%option noyywrap
@@ -564,11 +604,14 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<*>\x0d
<Body>^([ \t]*"#"[ \t]"include"[ \t]*)("<"|"\"") {
+ startFontClass("preprocessor");
g_code->codify(yytext);
BEGIN( ReadInclude );
}
<Body>("class"|"struct"|"union")[ \t\n]+ {
- codifyLines(yytext);
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
//g_code->codify(yytext);
BEGIN( ClassName );
}
@@ -589,9 +632,11 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
QCString text;
text+=c;
g_code->codify(text);
+ endFontClass();
BEGIN( Body );
}
<Body>^[ \t]*"#" {
+ startFontClass("preprocessor");
g_code->codify(yytext);
BEGIN( SkipCPP ) ;
}
@@ -603,6 +648,7 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
}
<SkipCPP>\n {
codifyLines(yytext);
+ endFontClass();
BEGIN( Body ) ;
}
<SkipCPP>"//" {
@@ -653,17 +699,10 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
}
BEGIN( Body );
}
-<Bases>"virtual" {
- g_code->codify(yytext);
- }
-<Bases>"public" {
- g_code->codify(yytext);
- }
-<Bases>"protected" {
- g_code->codify(yytext);
- }
-<Bases>"private" {
+<Bases>"virtual"|"public"|"protected"|"private" {
+ startFontClass("keyword");
g_code->codify(yytext);
+ endFontClass();
}
<Bases>{ID} {
//printf("%s:addBase(%s)\n",g_ccd.name.data(),yytext);
@@ -689,12 +728,24 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
}
-<Body>("asm"|"auto"|"break"|"case"|"catch"|"continue"|"default"|"delete"|"do"|"else"|"for"|"goto"|"if"|"new"|"return"|"switch"|"this"|"throw"|"try"|"typedef"|"while")([ \t\n]*)/"(" {
+<Body>{KEYWORD}/([^a-z_A-Z0-9]) {
+ startFontClass("keyword");
codifyLines(yytext);
- g_name.resize(0);g_type.resize(0);
+ endFontClass();
}
-<Body>("asm"|"auto"|"break"|"case"|"catch"|"continue"|"default"|"delete"|"do"|"else"|"for"|"goto"|"if"|"new"|"return"|"switch"|"this"|"throw"|"try"|"typedef"|"while")([ \t\n]*) {
+<Body>{KEYWORD}/{B}* {
+ startFontClass("keyword");
codifyLines(yytext);
+ endFontClass();
+ }
+<Body>{KEYWORD}/{B}*"(" {
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
+ g_name.resize(0);g_type.resize(0);
+ }
+<Body>[\\|\)\+\-\/\%\~\!] {
+ g_code->codify(yytext);
g_name.resize(0);g_type.resize(0);
}
/*
@@ -704,7 +755,21 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
name+=yytext;
}
*/
-<Body>{SCOPENAME}/[ \t\n]* {
+<Body>{TYPEKW}/{B}* {
+ startFontClass("keyword");
+ g_code->codify(yytext);
+ endFontClass();
+ addType();
+ g_name+=yytext;
+ }
+<Body>{SCOPENAME}{B}*"<"[^\}\{\(\)\/\n\>]*">"/{B}* {
+ int i;
+ generateClassLink(*g_code,yytext,&i);
+ addType();
+ QCString text=yytext;
+ g_name+=text.left(i);
+ }
+<Body>{SCOPENAME}/{B}* {
generateClassLink(*g_code,yytext);
//codifyLines(yytext);
addType();
@@ -778,6 +843,13 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<Body>[0-9]+ {
g_code->codify(yytext);
}
+<MemberCall2,FuncCall>({KEYWORD}|{TYPEKW})/([^a-z_A-Z0-9]) {
+ addParmType();
+ g_parmName=yytext;
+ startFontClass("keyword");
+ g_code->codify(yytext);
+ endFontClass();
+ }
<MemberCall2,FuncCall>[a-z_A-Z][:a-z_A-Z0-9]* {
addParmType();
g_parmName=yytext;
@@ -808,15 +880,21 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
g_parmType.resize(0);g_parmName.resize(0);
BEGIN( Body );
}
-<MemberCall2,FuncCall>")"[ \t\n]*"{" {
+<MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" {
addParameter();
g_parmType.resize(0);g_parmName.resize(0);
if (g_name.find("::")!=-1) setClassScope(g_name);
- codifyLines(yytext);
+ g_code->codify(")");
+ startFontClass("keyword");
+ yytext[yyleng-1]='\0';
+ codifyLines(yytext+1);
+ endFontClass();
+ g_code->codify("{");
g_curlyCount++;
g_type.resize(0); g_name.resize(0);
BEGIN( Body );
}
+ /*
<MemberCall2,FuncCall>")"[ \t\n]*":" {
addParameter();
g_parmType.resize(0);g_parmName.resize(0);
@@ -825,6 +903,7 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
g_type.resize(0); g_name.resize(0);
BEGIN( SkipInits );
}
+ */
<SkipInits>"{" {
g_code->codify(yytext);
g_curlyCount++;
@@ -861,13 +940,21 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
}
<SkipComment>[ \t]*"*/" {
g_code->codify(yytext);
+ endFontClass();
BEGIN( g_lastCContext ) ;
}
-<SkipCxxComment>.*/\n {
- //codifyLines(yytext);
+<SkipCxxComment>[^\r\n]* {
g_code->codify(yytext);
- BEGIN( g_lastCContext ) ;
}
+<SkipCxxComment>\r
+<SkipCxxComment>\n {
+ unput('\n');
+ endFontClass();
+ BEGIN( g_lastCContext ) ;
+ }
+<SkipCxxComment>. {
+ g_code->codify(yytext);
+ }
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*{B}*"/*"[*!]/[^/*] {
g_yyLineNr+=QCString(yytext).contains('\n');
}
@@ -899,7 +986,9 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
}
else
{
+ startFontClass("comment");
codifyLines(yytext);
+ endFontClass();
}
}
<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment
@@ -914,7 +1003,9 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
}
else
{
+ startFontClass("comment");
codifyLines(yytext);
+ endFontClass();
}
}
<*>"//"[!/][^\n]*\n { // strip special one-line comment
@@ -925,7 +1016,9 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
}
else
{
+ startFontClass("comment");
codifyLines(yytext);
+ endFontClass();
}
}
<*>\n{B}*"/*"[!*]/[^/*] {
@@ -938,6 +1031,7 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
else
{
g_lastCContext = YY_START ;
+ startFontClass("comment");
codifyLines(yytext);
BEGIN(SkipComment);
}
@@ -951,6 +1045,7 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
else
{
g_lastCContext = YY_START ;
+ startFontClass("comment");
g_code->codify(yytext);
BEGIN(SkipComment);
}
@@ -964,21 +1059,26 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
else
{
g_lastCContext = YY_START ;
+ startFontClass("comment");
g_code->codify(yytext);
BEGIN(SkipComment);
}
}
<*>"/*"("!"?)"*/" { if (!Config::stripCommentsFlag)
{
+ startFontClass("comment");
g_code->codify(yytext);
+ endFontClass();
}
}
<*>"/*" {
+ startFontClass("comment");
g_code->codify(yytext);
g_lastCContext = YY_START ;
BEGIN( SkipComment ) ;
}
<*>"//" {
+ startFontClass("comment");
g_code->codify(yytext);
g_lastCContext = YY_START ;
BEGIN( SkipCxxComment ) ;
@@ -1025,6 +1125,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s,
if (s.isEmpty()) return;
g_inputString = s;
g_inputPosition = 0;
+ g_currentFontClass = 0;
if (endLine!=-1)
g_inputLines = endLine+1;
else
@@ -1051,6 +1152,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s,
codeYYrestart( codeYYin );
BEGIN( Body );
codeYYlex();
+ endFontClass();
//if (g_yyLineNr<=g_inputLines) code->endCodeLine();
ol+=*g_code;
delete g_code;
diff --git a/src/config.l b/src/config.l
index 2600a26..05ae799 100644
--- a/src/config.l
+++ b/src/config.l
@@ -740,7 +740,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# by quotes) that should identify the project. \n";
t << "\n";
}
- t << "PROJECT_NAME = ";
+ t << "PROJECT_NAME = ";
writeStringValue(t,Config::projectName);
t << "\n";
if (!sl)
@@ -751,7 +751,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# if some version control system is used.\n";
t << "\n";
}
- t << "PROJECT_NUMBER = ";
+ t << "PROJECT_NUMBER = ";
writeStringValue(t,Config::projectNumber);
t << "\n";
if (!sl)
@@ -763,7 +763,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# where doxygen was started. If left blank the current directory will be used.\n";
t << "\n";
}
- t << "OUTPUT_DIRECTORY = ";
+ t << "OUTPUT_DIRECTORY = ";
writeStringValue(t,Config::outputDir);
t << "\n";
if (!sl)
@@ -777,7 +777,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# Spanish and Russian\n";
t << "\n";
}
- t << "OUTPUT_LANGUAGE = ";
+ t << "OUTPUT_LANGUAGE = ";
writeStringValue(t,Config::outputLanguage);
t << "\n";
if (!sl)
@@ -787,7 +787,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# by doxygen. Possible values are YES and NO. If left blank NO is used. \n";
t << "\n";
}
- t << "QUIET = ";
+ t << "QUIET = ";
writeBoolValue(t,Config::quietFlag);
t << "\n";
if (!sl)
@@ -798,7 +798,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# NO is used. \n";
t << "\n";
}
- t << "WARNINGS = ";
+ t << "WARNINGS = ";
writeBoolValue(t,Config::warningFlag);
t << "\n";
if (!sl)
@@ -809,7 +809,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# the value YES disables it. \n";
t << "\n";
}
- t << "DISABLE_INDEX = ";
+ t << "DISABLE_INDEX = ";
writeBoolValue(t,Config::noIndexFlag);
t << "\n";
if (!sl)
@@ -819,7 +819,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# included in the documentation, even if no documentation was available. \n";
t << "\n";
}
- t << "EXTRACT_ALL = ";
+ t << "EXTRACT_ALL = ";
writeBoolValue(t,Config::extractAllFlag);
t << "\n";
if (!sl)
@@ -829,7 +829,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# will be included in the documentation. \n";
t << "\n";
}
- t << "EXTRACT_PRIVATE = ";
+ t << "EXTRACT_PRIVATE = ";
writeBoolValue(t,Config::extractPrivateFlag);
t << "\n";
if (!sl)
@@ -839,7 +839,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# undocumented members inside documented classes or files. \n";
t << "\n";
}
- t << "HIDE_UNDOC_MEMBERS = ";
+ t << "HIDE_UNDOC_MEMBERS = ";
writeBoolValue(t,Config::hideMemberFlag);
t << "\n";
if (!sl)
@@ -849,7 +849,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# undocumented classes. \n";
t << "\n";
}
- t << "HIDE_UNDOC_CLASSES = ";
+ t << "HIDE_UNDOC_CLASSES = ";
writeBoolValue(t,Config::hideClassFlag);
t << "\n";
if (!sl)
@@ -861,7 +861,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# Set to NO to disable this. \n";
t << "\n";
}
- t << "BRIEF_MEMBER_DESC = ";
+ t << "BRIEF_MEMBER_DESC = ";
writeBoolValue(t,Config::briefMemDescFlag);
t << "\n";
if (!sl)
@@ -873,7 +873,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# brief descriptions will be completely suppressed. \n";
t << "\n";
}
- t << "REPEAT_BRIEF = ";
+ t << "REPEAT_BRIEF = ";
writeBoolValue(t,Config::repeatBriefFlag);
t << "\n";
if (!sl)
@@ -884,7 +884,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# description. \n";
t << "\n";
}
- t << "ALWAYS_DETAILED_SEC = ";
+ t << "ALWAYS_DETAILED_SEC = ";
writeBoolValue(t,Config::alwaysDetailsFlag);
t << "\n";
if (!sl)
@@ -895,7 +895,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# to NO the shortest path that makes the file name unique will be used. \n";
t << "\n";
}
- t << "FULL_PATH_NAMES = ";
+ t << "FULL_PATH_NAMES = ";
writeBoolValue(t,Config::fullPathNameFlag);
t << "\n";
if (!sl)
@@ -907,7 +907,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# the path. \n";
t << "\n";
}
- t << "STRIP_FROM_PATH = ";
+ t << "STRIP_FROM_PATH = ";
writeStringList(t,Config::stripFromPath);
t << "\n";
if (!sl)
@@ -919,7 +919,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# Set it to YES to include the internal documentation. \n";
t << "\n";
}
- t << "INTERNAL_DOCS = ";
+ t << "INTERNAL_DOCS = ";
writeBoolValue(t,Config::internalDocsFlag);
t << "\n";
if (!sl)
@@ -930,7 +930,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# super classes. Setting the tag to NO turns the diagrams off. \n";
t << "\n";
}
- t << "CLASS_DIAGRAMS = ";
+ t << "CLASS_DIAGRAMS = ";
writeBoolValue(t,Config::classDiagramFlag);
t << "\n";
if (!sl)
@@ -940,7 +940,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# be generated. Documented entities will be cross-referenced with these sources. \n";
t << "\n";
}
- t << "SOURCE_BROWSER = ";
+ t << "SOURCE_BROWSER = ";
writeBoolValue(t,Config::sourceBrowseFlag);
t << "\n";
if (!sl)
@@ -950,7 +950,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# of functions and classes directly in the documentation. \n";
t << "\n";
}
- t << "INLINE_SOURCES = ";
+ t << "INLINE_SOURCES = ";
writeBoolValue(t,Config::inlineSourceFlag);
t << "\n";
if (!sl)
@@ -961,7 +961,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# fragments. Normal C and C++ comments will always remain visible. \n";
t << "\n";
}
- t << "STRIP_CODE_COMMENTS = ";
+ t << "STRIP_CODE_COMMENTS = ";
writeBoolValue(t,Config::stripCommentsFlag);
t << "\n";
if (!sl)
@@ -974,7 +974,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# supports case sensitive file names. \n";
t << "\n";
}
- t << "CASE_SENSE_NAMES = ";
+ t << "CASE_SENSE_NAMES = ";
writeBoolValue(t,Config::caseSensitiveNames);
t << "\n";
if (!sl)
@@ -985,7 +985,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# which an include is specified. Set to NO to disable this. \n";
t << "\n";
}
- t << "VERBATIM_HEADERS = ";
+ t << "VERBATIM_HEADERS = ";
writeBoolValue(t,Config::verbatimHeaderFlag);
t << "\n";
if (!sl)
@@ -996,7 +996,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# of that file. \n";
t << "\n";
}
- t << "SHOW_INCLUDE_FILES = ";
+ t << "SHOW_INCLUDE_FILES = ";
writeBoolValue(t,Config::showIncFileFlag);
t << "\n";
if (!sl)
@@ -1008,7 +1008,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# behave just like the Qt-style comments. \n";
t << "\n";
}
- t << "JAVADOC_AUTOBRIEF = ";
+ t << "JAVADOC_AUTOBRIEF = ";
writeBoolValue(t,Config::autoBriefFlag);
t << "\n";
if (!sl)
@@ -1019,7 +1019,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# reimplements. \n";
t << "\n";
}
- t << "INHERIT_DOCS = ";
+ t << "INHERIT_DOCS = ";
writeBoolValue(t,Config::inheritDocsFlag);
t << "\n";
if (!sl)
@@ -1029,7 +1029,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# is inserted in the documentation for inline members. \n";
t << "\n";
}
- t << "INLINE_INFO = ";
+ t << "INLINE_INFO = ";
writeBoolValue(t,Config::inlineInfoFlag);
t << "\n";
if (!sl)
@@ -1041,7 +1041,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# declaration order. \n";
t << "\n";
}
- t << "SORT_MEMBER_DOCS = ";
+ t << "SORT_MEMBER_DOCS = ";
writeBoolValue(t,Config::sortMembersFlag);
t << "\n";
if (!sl)
@@ -1051,7 +1051,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# Doxygen uses this value to replace tabs by spaces in code fragments. \n";
t << "\n";
}
- t << "TAB_SIZE = ";
+ t << "TAB_SIZE = ";
writeIntValue(t,Config::tabSize);
t << "\n";
if (!sl)
@@ -1061,7 +1061,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# documentation sections, marked by \\if sectionname ... \\endif. \n";
t << "\n";
}
- t << "ENABLED_SECTIONS = ";
+ t << "ENABLED_SECTIONS = ";
writeStringList(t,Config::sectionFilterList);
t << "\n";
if (!sl)
@@ -1080,7 +1080,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# with spaces. \n";
t << "\n";
}
- t << "INPUT = ";
+ t << "INPUT = ";
writeStringList(t,Config::inputSources);
t << "\n";
if (!sl)
@@ -1092,7 +1092,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# blank all files are included. \n";
t << "\n";
}
- t << "FILE_PATTERNS = ";
+ t << "FILE_PATTERNS = ";
writeStringList(t,Config::filePatternList);
t << "\n";
if (!sl)
@@ -1103,7 +1103,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# If left blank NO is used. \n";
t << "\n";
}
- t << "RECURSIVE = ";
+ t << "RECURSIVE = ";
writeBoolValue(t,Config::recursiveFlag);
t << "\n";
if (!sl)
@@ -1114,7 +1114,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# subdirectory from a directory tree whose root is specified with the INPUT tag. \n";
t << "\n";
}
- t << "EXCLUDE = ";
+ t << "EXCLUDE = ";
writeStringList(t,Config::excludeSources);
t << "\n";
if (!sl)
@@ -1125,7 +1125,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# certain files from those directories. \n";
t << "\n";
}
- t << "EXCLUDE_PATTERNS = ";
+ t << "EXCLUDE_PATTERNS = ";
writeStringList(t,Config::excludePatternList);
t << "\n";
if (!sl)
@@ -1136,7 +1136,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# the \\include command). \n";
t << "\n";
}
- t << "EXAMPLE_PATH = ";
+ t << "EXAMPLE_PATH = ";
writeStringList(t,Config::examplePath);
t << "\n";
if (!sl)
@@ -1148,7 +1148,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# blank all files are included. \n";
t << "\n";
}
- t << "EXAMPLE_PATTERNS = ";
+ t << "EXAMPLE_PATTERNS = ";
writeStringList(t,Config::examplePatternList);
t << "\n";
if (!sl)
@@ -1159,7 +1159,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# the \\image command). \n";
t << "\n";
}
- t << "IMAGE_PATH = ";
+ t << "IMAGE_PATH = ";
writeStringList(t,Config::imagePath);
t << "\n";
if (!sl)
@@ -1173,7 +1173,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# to standard output. \n";
t << "\n";
}
- t << "INPUT_FILTER = ";
+ t << "INPUT_FILTER = ";
writeStringValue(t,Config::inputFilter);
t << "\n";
if (!sl)
@@ -1191,7 +1191,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# contains a lot of classes, structs, unions or interfaces. \n";
t << "\n";
}
- t << "ALPHABETICAL_INDEX = ";
+ t << "ALPHABETICAL_INDEX = ";
writeBoolValue(t,Config::alphaIndexFlag);
t << "\n";
if (!sl)
@@ -1202,7 +1202,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# in which this list will be split (can be a number in the range [1..20]) \n";
t << "\n";
}
- t << "COLS_IN_ALPHA_INDEX = ";
+ t << "COLS_IN_ALPHA_INDEX = ";
writeIntValue(t,Config::colsInAlphaIndex);
t << "\n";
if (!sl)
@@ -1214,7 +1214,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# should be ignored while generating the index headers. \n";
t << "\n";
}
- t << "IGNORE_PREFIX = ";
+ t << "IGNORE_PREFIX = ";
writeStringList(t,Config::ignorePrefixList);
t << "\n";
if (!sl)
@@ -1231,7 +1231,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# generate HTML output. \n";
t << "\n";
}
- t << "GENERATE_HTML = ";
+ t << "GENERATE_HTML = ";
writeBoolValue(t,Config::generateHtml);
t << "\n";
if (!sl)
@@ -1242,7 +1242,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# put in front of it. If left blank `html' will be used as the default path. \n";
t << "\n";
}
- t << "HTML_OUTPUT = ";
+ t << "HTML_OUTPUT = ";
writeStringValue(t,Config::htmlOutputDir);
t << "\n";
if (!sl)
@@ -1253,7 +1253,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# standard header.\n";
t << "\n";
}
- t << "HTML_HEADER = ";
+ t << "HTML_HEADER = ";
writeStringValue(t,Config::headerFile);
t << "\n";
if (!sl)
@@ -1264,7 +1264,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# standard footer.\n";
t << "\n";
}
- t << "HTML_FOOTER = ";
+ t << "HTML_FOOTER = ";
writeStringValue(t,Config::footerFile);
t << "\n";
if (!sl)
@@ -1276,7 +1276,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# will generate a default style sheet \n";
t << "\n";
}
- t << "HTML_STYLESHEET = ";
+ t << "HTML_STYLESHEET = ";
writeStringValue(t,Config::htmlStyleSheet);
t << "\n";
if (!sl)
@@ -1287,7 +1287,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# NO a bullet list will be used. \n";
t << "\n";
}
- t << "HTML_ALIGN_MEMBERS = ";
+ t << "HTML_ALIGN_MEMBERS = ";
writeBoolValue(t,Config::htmlAlignMemberFlag);
t << "\n";
if (!sl)
@@ -1299,7 +1299,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# of the generated HTML documentation. \n";
t << "\n";
}
- t << "GENERATE_HTMLHELP = ";
+ t << "GENERATE_HTMLHELP = ";
writeBoolValue(t,Config::htmlHelpFlag);
t << "\n";
if (!sl)
@@ -1316,7 +1316,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# generate Latex output. \n";
t << "\n";
}
- t << "GENERATE_LATEX = ";
+ t << "GENERATE_LATEX = ";
writeBoolValue(t,Config::generateLatex);
t << "\n";
if (!sl)
@@ -1327,7 +1327,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# put in front of it. If left blank `latex' will be used as the default path. \n";
t << "\n";
}
- t << "LATEX_OUTPUT = ";
+ t << "LATEX_OUTPUT = ";
writeStringValue(t,Config::latexOutputDir);
t << "\n";
if (!sl)
@@ -1338,7 +1338,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# save some trees in general. \n";
t << "\n";
}
- t << "COMPACT_LATEX = ";
+ t << "COMPACT_LATEX = ";
writeBoolValue(t,Config::compactLatexFlag);
t << "\n";
if (!sl)
@@ -1349,7 +1349,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# executive. If left blank a4wide will be used. \n";
t << "\n";
}
- t << "PAPER_TYPE = ";
+ t << "PAPER_TYPE = ";
writeStringValue(t,Config::paperType);
t << "\n";
if (!sl)
@@ -1359,7 +1359,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# packages that should be included in the LaTeX output. \n";
t << "\n";
}
- t << "EXTRA_PACKAGES = ";
+ t << "EXTRA_PACKAGES = ";
writeStringList(t,Config::extraPackageList);
t << "\n";
if (!sl)
@@ -1371,7 +1371,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# standard header. Notice: only use this tag if you know what you are doing! \n";
t << "\n";
}
- t << "LATEX_HEADER = ";
+ t << "LATEX_HEADER = ";
writeStringValue(t,Config::latexHeaderFile);
t << "\n";
if (!sl)
@@ -1383,7 +1383,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# This makes the output suitable for online browsing using a pdf viewer. \n";
t << "\n";
}
- t << "PDF_HYPERLINKS = ";
+ t << "PDF_HYPERLINKS = ";
writeBoolValue(t,Config::pdfHyperFlag);
t << "\n";
if (!sl)
@@ -1395,7 +1395,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# This option is also used when generating formulas in HTML. \n";
t << "\n";
}
- t << "LATEX_BATCHMODE = ";
+ t << "LATEX_BATCHMODE = ";
writeBoolValue(t,Config::latexBatchModeFlag);
t << "\n";
if (!sl)
@@ -1414,7 +1414,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# or editors.\n";
t << "\n";
}
- t << "GENERATE_RTF = ";
+ t << "GENERATE_RTF = ";
writeBoolValue(t,Config::generateRTF);
t << "\n";
if (!sl)
@@ -1425,7 +1425,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# put in front of it. If left blank `rtf' will be used as the default path. \n";
t << "\n";
}
- t << "RTF_OUTPUT = ";
+ t << "RTF_OUTPUT = ";
writeStringValue(t,Config::rtfOutputDir);
t << "\n";
if (!sl)
@@ -1436,7 +1436,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# save some trees in general. \n";
t << "\n";
}
- t << "COMPACT_RTF = ";
+ t << "COMPACT_RTF = ";
writeBoolValue(t,Config::compactRTFFlag);
t << "\n";
if (!sl)
@@ -1450,7 +1450,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# Note: wordpad (write) and others do not support links. \n";
t << "\n";
}
- t << "RTF_HYPERLINKS = ";
+ t << "RTF_HYPERLINKS = ";
writeBoolValue(t,Config::rtfHyperFlag);
t << "\n";
if (!sl)
@@ -1467,7 +1467,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# generate man pages \n";
t << "\n";
}
- t << "GENERATE_MAN = ";
+ t << "GENERATE_MAN = ";
writeBoolValue(t,Config::generateMan);
t << "\n";
if (!sl)
@@ -1478,7 +1478,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# put in front of it. If left blank `man' will be used as the default path. \n";
t << "\n";
}
- t << "MAN_OUTPUT = ";
+ t << "MAN_OUTPUT = ";
writeStringValue(t,Config::manOutputDir);
t << "\n";
if (!sl)
@@ -1488,7 +1488,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# the generated man pages (default is the subroutine's section .3) \n";
t << "\n";
}
- t << "MAN_EXTENSION = ";
+ t << "MAN_EXTENSION = ";
writeStringValue(t,Config::manExtension);
t << "\n";
if (!sl)
@@ -1506,7 +1506,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# files. \n";
t << "\n";
}
- t << "ENABLE_PREPROCESSING = ";
+ t << "ENABLE_PREPROCESSING = ";
writeBoolValue(t,Config::preprocessingFlag);
t << "\n";
if (!sl)
@@ -1517,7 +1517,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# compilation will be performed. \n";
t << "\n";
}
- t << "MACRO_EXPANSION = ";
+ t << "MACRO_EXPANSION = ";
writeBoolValue(t,Config::macroExpansionFlag);
t << "\n";
if (!sl)
@@ -1527,7 +1527,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# in the INCLUDE_PATH (see below) will be search if a #include is found. \n";
t << "\n";
}
- t << "SEARCH_INCLUDES = ";
+ t << "SEARCH_INCLUDES = ";
writeBoolValue(t,Config::searchIncludeFlag);
t << "\n";
if (!sl)
@@ -1538,7 +1538,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# the preprocessor. \n";
t << "\n";
}
- t << "INCLUDE_PATH = ";
+ t << "INCLUDE_PATH = ";
writeStringList(t,Config::includePath);
t << "\n";
if (!sl)
@@ -1551,7 +1551,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# omitted =1 is assumed. \n";
t << "\n";
}
- t << "PREDEFINED = ";
+ t << "PREDEFINED = ";
writeStringList(t,Config::predefined);
t << "\n";
if (!sl)
@@ -1562,7 +1562,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# PREDEFINED tag. \n";
t << "\n";
}
- t << "EXPAND_ONLY_PREDEF = ";
+ t << "EXPAND_ONLY_PREDEF = ";
writeBoolValue(t,Config::onlyPredefinedFlag);
t << "\n";
if (!sl)
@@ -1578,7 +1578,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# The TAGFILES tag can be used to specify one or more tagfiles. \n";
t << "\n";
}
- t << "TAGFILES = ";
+ t << "TAGFILES = ";
writeStringList(t,Config::tagFileList);
t << "\n";
if (!sl)
@@ -1588,7 +1588,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# a tag file that is based on the input files it reads. \n";
t << "\n";
}
- t << "GENERATE_TAGFILE = ";
+ t << "GENERATE_TAGFILE = ";
writeStringValue(t,Config::genTagFile);
t << "\n";
if (!sl)
@@ -1599,7 +1599,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# will be listed. \n";
t << "\n";
}
- t << "ALLEXTERNALS = ";
+ t << "ALLEXTERNALS = ";
writeBoolValue(t,Config::allExtFlag);
t << "\n";
if (!sl)
@@ -1609,7 +1609,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# interpreter (i.e. the result of `which perl'). \n";
t << "\n";
}
- t << "PERL_PATH = ";
+ t << "PERL_PATH = ";
writeStringValue(t,Config::perlPath);
t << "\n";
if (!sl)
@@ -1628,7 +1628,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# have no effect if this option is set to NO (the default) \n";
t << "\n";
}
- t << "HAVE_DOT = ";
+ t << "HAVE_DOT = ";
writeBoolValue(t,Config::haveDotFlag);
t << "\n";
if (!sl)
@@ -1640,7 +1640,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# class references variables) of the class with other documented classes. \n";
t << "\n";
}
- t << "COLLABORATION_GRAPH = ";
+ t << "COLLABORATION_GRAPH = ";
writeBoolValue(t,Config::collGraphFlag);
t << "\n";
if (!sl)
@@ -1652,7 +1652,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# documented files. \n";
t << "\n";
}
- t << "INCLUDE_GRAPH = ";
+ t << "INCLUDE_GRAPH = ";
writeBoolValue(t,Config::includeGraphFlag);
t << "\n";
if (!sl)
@@ -1662,7 +1662,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# will graphical hierarchy of all classes instead of a textual one. \n";
t << "\n";
}
- t << "GRAPHICAL_HIERARCHY = ";
+ t << "GRAPHICAL_HIERARCHY = ";
writeBoolValue(t,Config::gfxHierarchyFlag);
t << "\n";
if (!sl)
@@ -1679,7 +1679,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# used. If set to NO the values of all tags below this one will be ignored. \n";
t << "\n";
}
- t << "SEARCHENGINE = ";
+ t << "SEARCHENGINE = ";
writeBoolValue(t,Config::searchEngineFlag);
t << "\n";
if (!sl)
@@ -1690,7 +1690,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# A script with this name will be generated by doxygen. \n";
t << "\n";
}
- t << "CGI_NAME = ";
+ t << "CGI_NAME = ";
writeStringValue(t,Config::cgiName);
t << "\n";
if (!sl)
@@ -1701,7 +1701,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# details. \n";
t << "\n";
}
- t << "CGI_URL = ";
+ t << "CGI_URL = ";
writeStringValue(t,Config::cgiURL);
t << "\n";
if (!sl)
@@ -1712,7 +1712,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# documentation, with file:// prepended to it, will be used. \n";
t << "\n";
}
- t << "DOC_URL = ";
+ t << "DOC_URL = ";
writeStringValue(t,Config::docURL);
t << "\n";
if (!sl)
@@ -1723,7 +1723,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# will be used. \n";
t << "\n";
}
- t << "DOC_ABSPATH = ";
+ t << "DOC_ABSPATH = ";
writeStringValue(t,Config::docAbsPath);
t << "\n";
if (!sl)
@@ -1733,7 +1733,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# is installed. \n";
t << "\n";
}
- t << "BIN_ABSPATH = ";
+ t << "BIN_ABSPATH = ";
writeStringValue(t,Config::binAbsPath);
t << "\n";
if (!sl)
@@ -1744,7 +1744,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# the documentation for these projects as well. \n";
t << "\n";
}
- t << "EXT_DOC_PATHS = ";
+ t << "EXT_DOC_PATHS = ";
writeStringList(t,Config::extDocPathList);
t << "\n";
}
@@ -1808,65 +1808,79 @@ static void substEnvVarsInStrList(QStrList &sl)
while (s)
{
QCString result(s);
+ bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1);
substEnvVarsInString(result);
-
- int l=result.length();
- int i,p=0;
- // skip spaces
- // search for a "word"
- for (i=0;i<l;i++)
+
+ if (!wasQuoted) /* as a result of the expansion, a single string
+ may have expanded into a list, which we'll
+ add to sl. If the orginal string already
+ contained multiple elements no splitting is done! */
{
- char c;
- // skip until start of new word
- for (;i<l && ((c=result.at(i))==' ' || c=='\t');i++)
- p=i; // p marks the start index of the word
- // skip until end of a word
- for (;i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"');i++);
- if (i<l) // not at the end of the string
+
+
+
+ int l=result.length();
+ int i,p=0;
+ // skip spaces
+ // search for a "word"
+ for (i=0;i<l;i++)
{
- if (c=='"') // word within quotes
+ char c;
+ // skip until start of new word
+ for (;i<l && ((c=result.at(i))==' ' || c=='\t');i++)
+ p=i; // p marks the start index of the word
+ // skip until end of a word
+ for (;i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"');i++);
+ if (i<l) // not at the end of the string
{
- p=i+1;
- for (i++;i<l;i++)
+ if (c=='"') // word within quotes
{
- c=result.at(i);
- if (c=='"') // end quote
+ p=i+1;
+ for (i++;i<l;i++)
{
- // replace the string in the list and go to the next item.
- sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
- sl.next(); // current item is now the old item
- p=i+1;
- break;
- }
- else if (c=='\\') // skip escaped stuff
- {
- i++;
+ c=result.at(i);
+ if (c=='"') // end quote
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ p=i+1;
+ break;
+ }
+ else if (c=='\\') // skip escaped stuff
+ {
+ i++;
+ }
}
}
- }
- else if (c==' ' || c=='\t') // separator
- {
- // replace the string in the list and go to the next item.
- sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
- sl.next(); // current item is now the old item
- p=i+1;
+ else if (c==' ' || c=='\t') // separator
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ p=i+1;
+ }
}
}
+ if (p!=l) // add the leftover as a string
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.right(l-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ }
+
+ // remove the old unexpanded string from the list
+ i=sl.at();
+ sl.remove(); // current item index changes if the last element is removed.
+ if (sl.at()==i) // not last item
+ s = sl.current();
+ else // just removed last item
+ s = 0;
}
- if (p!=l) // add the leftover as a string
+ else // just goto the next element in the list
{
- // replace the string in the list and go to the next item.
- sl.insert(sl.at(),result.right(l-p)); // insert new item before current item.
- sl.next(); // current item is now the old item
+ s=sl.next();
}
-
- // remove the old unexpanded string from the list
- i=sl.at();
- sl.remove(); // current item index changes if the last element is removed.
- if (sl.at()==i) // not last item
- s = sl.current();
- else // just removed last item
- s = 0;
}
}
diff --git a/src/declinfo.l b/src/declinfo.l
index 555cb0f..fe2fed0 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -56,7 +56,7 @@ static void addType()
//printf("addType() type=`%s' scope=`%s' name=`%s'\n",
// type.data(),scope.data(),name.data());
if (name.isEmpty() && scope.isEmpty()) return;
- if (!type.isEmpty()) type+=' ';
+ if (!type.isEmpty()) type+=" ";
if (!scope.isEmpty()) type+=scope+"::";
type+=name;
scope.resize(0);
diff --git a/src/definition.h b/src/definition.h
index 42213fd..e5f125d 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -48,9 +48,12 @@ class Definition
/*! sets a new \a name for the definition */
void setName(const char *name) { n=name; }
/*! sets the documentation of this definition to \a d. */
- void setDocumentation(const char *d)
+ void setDocumentation(const char *d,bool stripWhiteSpace=TRUE)
{
- doc=((QCString)d).stripWhiteSpace();
+ if (stripWhiteSpace)
+ doc=((QCString)d).stripWhiteSpace();
+ else
+ doc=d;
}
/*! sets the brief description of this definition to \a b.
* A dot is added to the sentence if not available.
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 22b2f5e..bbee306 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -196,7 +196,14 @@ DiagramItem::~DiagramItem()
QCString DiagramItem::label() const
{
- return classDef->name()+templSpec;
+ if (!templSpec.isEmpty())
+ {
+ return insertTemplateSpecifierInScope(classDef->name(),templSpec);
+ }
+ else
+ {
+ return classDef->name();
+ }
}
QCString DiagramItem::fileName() const
diff --git a/src/dot.cpp b/src/dot.cpp
index f4f5fbc..211ffa3 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -277,6 +277,19 @@ void DotNode::deleteNode(DotNodeList &deletedList)
deletedList.append(this);
}
+static QCString convertLabel(const QCString &l)
+{
+ QCString result;
+ const char *p=l.data();
+ char c;
+ while ((c=*p++))
+ {
+ if (c=='\\') result+="\\\\";
+ else result+=c;
+ }
+ return result;
+}
+
void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren)
{
const char *labCol =
@@ -284,7 +297,8 @@ void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren)
(
(hasNonReachableChildren) ? "red" : "black"
);
- t << " Node" << m_number << " [shape=\"box\",label=\"" << m_label
+ t << " Node" << m_number << " [shape=\"box\",label=\""
+ << convertLabel(m_label)
<< "\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\"";
t << ",color=\"" << labCol << "\"";
if (m_isRoot)
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 3028d67..7ce7f67 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -258,7 +258,10 @@ void buildFileList(Entry *root)
}
else
{
- fd->setDocumentation(root->doc);
+ // using FALSE in setDocumentation is small hack to make sure a file
+ // is documented even if a \file command is used without further
+ // documentation
+ fd->setDocumentation(root->doc,FALSE);
fd->setBriefDescription(root->brief);
fd->addSectionsToDefinition(root->anchors);
QListIterator<QCString> sli(*root->groups);
@@ -1729,12 +1732,13 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
if (baseClassName!=root->name) // check for base class with the same name,
// look in the outer scope for a match
{
- //printf("baseClass %s of %s found (%s and %s)\n",
- // baseClassName.data(),
- // root->name.data(),
- // (bi->prot==Private)?"private":((bi->prot==Protected)?"protected":"public"),
- // (bi->virt==Normal)?"normal":"virtual"
- // );
+ Debug::print(
+ Debug::Classes,0,"baseClass %s of %s found (%s and %s)\n",
+ baseClassName.data(),
+ root->name.data(),
+ (bi->prot==Private)?"private":((bi->prot==Protected)?"protected":"public"),
+ (bi->virt==Normal)?"normal":"virtual"
+ );
int i;
QCString templSpec;
@@ -1743,11 +1747,15 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
{
// TODO: here we should try to find the correct template specialization
// but for now, we only look for the unspecializated base class.
- templSpec=baseClassName.right(baseClassName.length()-i);
- baseClassName=baseClassName.left(i);
- baseClass=getResolvedClass(baseClassName);
- //printf("baseClass=%p baseClass=%s templSpec=%s\n",
- // baseClass,baseClassName.data(),templSpec.data());
+ int e = baseClassName.find('>');
+ if (e!=-1)
+ {
+ templSpec=baseClassName.mid(i,e-i+1);
+ baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e-1);
+ baseClass=getResolvedClass(baseClassName);
+ //printf("baseClass=%p baseClass=%s templSpec=%s\n",
+ // baseClass,baseClassName.data(),templSpec.data());
+ }
}
bool found=baseClass!=0 && baseClass!=cd;
@@ -1819,7 +1827,6 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
}
else
{
- //printf(">>> base class %s not found!\n",bi->name.data());
Debug::print(Debug::Classes,0," Base class `%s' not found\n",bi->name.data());
}
}
@@ -2064,33 +2071,6 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
}
//----------------------------------------------------------------------
-
-static QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ)
-{
- QCString result=scope.copy();
- if (!templ.isEmpty() && scope.find('<')==-1)
- {
- int si,pi=0;
- while ((si=scope.find("::",pi))!=-1 && !getClass(scope.left(si)+templ)
- && !getClass(scope.left(si)))
- { //printf("Tried `%s'\n",(scope.left(si)+templ).data());
- pi=si+2;
- }
- if (si==-1) // not nested => append template specifier
- {
- result+=templ;
- }
- else // nested => insert template specifier before after first class name
- {
- result=scope.left(si) + templ + scope.right(scope.length()-si);
- }
- }
- //printf("insertTemplateSpecifierInScope(`%s',`%s')=%s\n",
- // scope.data(),templ.data(),result.data());
- return result;
-}
-
-//----------------------------------------------------------------------
// find a class definition given the scope name and (optionally) a
// template list specifier
@@ -2573,9 +2553,6 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
QCString fullFuncDecl=funcDecl.copy();
if (isFunc) fullFuncDecl+=argListToString(root->argList);
- //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
- //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
-
// destructor => do backward class name substitution if needed
//if (!funcName.isEmpty() && funcName[0]=='~')
// funcName="~"+resolveDefines(className);
@@ -3681,12 +3658,6 @@ void generateClassDocs()
msg("Generating hierarchical class index...\n");
writeHierarchicalIndex(*outputList);
- //if (documentedIncludeFiles>0)
- //{
- // msg("Generating header index...\n");
- // writeHeaderIndex(*outputList);
- //}
-
msg("Generating member index...\n");
writeMemberIndex(*outputList);
@@ -3706,11 +3677,6 @@ void generateClassDocs()
cd->writeDocumentation(*outputList);
cd->writeMemberList(*outputList);
-
- //DotGfxUsageGraph usageIntfGraph(cd,FALSE,1);
- //usageIntfGraph.writeGraph(Config::htmlOutputDir,FALSE);
-
- //if (Config::verbatimHeaderFlag) cd->writeIncludeFile(*outputList);
}
}
}
@@ -4262,12 +4228,13 @@ void generateSearchIndex()
err("Error: Cannot open file %s for writing\n",fileName.data());
}
//outputList->generateExternalIndex();
+ outputList->pushGeneratorState();
outputList->disableAllBut(OutputGenerator::Html);
startFile(*outputList,"header.html","Search Engine",TRUE);
outputList->endPlainFile();
outputList->startPlainFile("footer.html");
endFile(*outputList,TRUE);
- outputList->enableAll();
+ outputList->popGeneratorState();
}
}
@@ -5161,9 +5128,6 @@ int main(int argc,char **argv)
msg("Generating group documentation...\n");
generateGroupDocs();
- //msg("Generating member group documentation...\n");
- //generateMemberGroupDocs();
-
msg("Generating namespace index...\n");
generateNamespaceDocs();
@@ -5186,6 +5150,7 @@ int main(int argc,char **argv)
generateSearchIndex();
msg("Generating style sheet...\n");
+ //outputList->enable(OutputGenerator::Latex);
outputList->writeStyleInfo(0); // write first part
outputList->disableAllBut(OutputGenerator::Latex);
parseText(*outputList,
diff --git a/src/filedef.cpp b/src/filedef.cpp
index d5c5d4e..657f2d9 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -247,53 +247,8 @@ void FileDef::writeDocumentation(OutputList &ol)
}
if (found) ol.endMemberList();
}
- if (classList->count()>0)
- {
- ClassDef *cd=classList->first();
- bool found=FALSE;
- while (cd)
- {
- if (cd->name().find('@')==-1)
- {
- if (!found)
- {
- ol.startMemberHeader();
- parseText(ol,theTranslator->trCompounds());
- ol.endMemberHeader();
- ol.startMemberList();
- found=TRUE;
- }
- ol.startMemberItem(FALSE);
- switch (cd->compoundType())
- {
- case ClassDef::Class: ol.writeString("class"); break;
- case ClassDef::Struct: ol.writeString("struct"); break;
- case ClassDef::Union: ol.writeString("union"); break;
- case ClassDef::Interface: ol.writeString("interface"); break;
- case ClassDef::Exception: ol.writeString("exception"); break;
- }
- ol.writeString(" ");
- ol.insertMemberAlign();
- if (cd->isLinkable())
- {
- ol.writeObjectLink(cd->getReference(),
- cd->getOutputFileBase(),
- 0,
- cd->name()
- );
- }
- else
- {
- ol.startBold();
- ol.docify(cd->name());
- ol.endBold();
- }
- ol.endMemberItem(FALSE);
- }
- cd=classList->next();
- }
- if (found) ol.endMemberList();
- }
+
+ classList->writeDeclaration(ol);
/* write user defined member groups */
MemberGroupListIterator mgli(*memberGroupList);
@@ -309,8 +264,10 @@ void FileDef::writeDocumentation(OutputList &ol)
//doc=doc.stripWhiteSpace();
//int bl=brief.length();
//int dl=doc.length();
- if (!briefDescription().isEmpty() || !documentation().isEmpty() ||
- startBodyLine!=-1)
+ if ((!briefDescription().isEmpty() && Config::repeatBriefFlag) ||
+ !documentation().isEmpty()
+ /* || startBodyLine!=-1 */
+ )
{
ol.writeRuler();
ol.pushGeneratorState();
@@ -395,15 +352,15 @@ void FileDef::writeDocumentation(OutputList &ol)
enumMembers.writeDocumentation(ol,name());
}
- enumValMembers.countDocMembers();
- if (enumValMembers.totalCount()>0 )
- {
- ol.writeRuler();
- ol.startGroupHeader();
- parseText(ol,theTranslator->trEnumerationValueDocumentation());
- ol.endGroupHeader();
- enumValMembers.writeDocumentation(ol,name());
- }
+ //enumValMembers.countDocMembers();
+ //if (enumValMembers.totalCount()>0 )
+ //{
+ // ol.writeRuler();
+ // ol.startGroupHeader();
+ // parseText(ol,theTranslator->trEnumerationValueDocumentation());
+ // ol.endGroupHeader();
+ // enumValMembers.writeDocumentation(ol,name());
+ //}
funcMembers.countDocMembers();
if (funcMembers.totalCount()>0 )
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 44a7639..a13ddd8 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -188,45 +188,9 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.endMemberList();
}
- if (classList->count()>0)
- {
- ClassDef *cd=classList->first();
- bool found=FALSE;
- while (cd)
- {
- if (!found)
- {
- ol.startMemberHeader();
- parseText(ol,theTranslator->trCompounds());
- ol.endMemberHeader();
- ol.startMemberList();
- found=TRUE;
- }
- QCString type;
- switch (cd->compoundType())
- {
- case ClassDef::Class: type="class"; break;
- case ClassDef::Struct: type="struct"; break;
- case ClassDef::Union: type="union"; break;
- case ClassDef::Interface: type="interface"; break;
- case ClassDef::Exception: type="exception"; break;
- }
- ol.startMemberItem(0);
- ol.docify(type);
- ol.insertMemberAlign();
- ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name());
- ol.endMemberItem(FALSE);
- if (!cd->briefDescription().isEmpty() && Config::briefMemDescFlag)
- {
- ol.startMemberDescription();
- parseDoc(ol,0,0,cd->briefDescription());
- ol.endMemberDescription();
- ol.newParagraph();
- }
- cd=classList->next();
- }
- if (found) ol.endMemberList();
- }
+
+ classList->writeDeclaration(ol);
+
if (allMemberList->count()>0)
{
/* write user defined member groups */
@@ -306,15 +270,15 @@ void GroupDef::writeDocumentation(OutputList &ol)
enumMembers.writeDocumentation(ol,name());
}
- enumValMembers.countDocMembers();
- if (enumValMembers.totalCount()>0 )
- {
- ol.writeRuler();
- ol.startGroupHeader();
- parseText(ol,theTranslator->trEnumerationValueDocumentation());
- ol.endGroupHeader();
- enumValMembers.writeDocumentation(ol,name());
- }
+ //enumValMembers.countDocMembers();
+ //if (enumValMembers.totalCount()>0 )
+ //{
+ // ol.writeRuler();
+ // ol.startGroupHeader();
+ // parseText(ol,theTranslator->trEnumerationValueDocumentation());
+ // ol.endGroupHeader();
+ // enumValMembers.writeDocumentation(ol,name());
+ //}
funcMembers.countDocMembers();
if (funcMembers.totalCount()>0 )
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 1ecf21a..3d4b9c3 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -207,6 +207,9 @@ void HtmlGenerator::writeStyleInfo(int part)
t << "TD.md { background-color: #f2f2ff }" << endl;
t << "DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold }" << endl;
t << "DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }" << endl;
+ t << "FONT.keyword { color: #008000 }" << endl;
+ t << "FONT.comment { color: #800000 }" << endl;
+ t << "FONT.preprocessor { color: #806020 }" << endl;
//t << "TD.groupLine { background-color: #3080ff }" << endl;
t << endl;
endPlainFile();
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 149e6dd..b111a25 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -227,6 +227,9 @@ class HtmlGenerator : public OutputGenerator
void startParameter(bool first);
void endParameter(bool last);
+ void startFontClass(const char *s) { t << "<font class=\"" << s << "\">"; }
+ void endFontClass() { t << "</font>"; }
+
private:
QCString header;
QCString footer;
diff --git a/src/index.cpp b/src/index.cpp
index bad6e18..1fdbea4 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -828,15 +828,16 @@ void writeAlphabeticalClassList(OutputList &ol)
void writeAlphabeticalIndex(OutputList &ol)
{
- ol.disableAllBut(OutputGenerator::Html);
if (annotatedClasses==0) return;
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"classes.html","Alphabetical index");
startTitle(ol,0);
parseText(ol,Config::projectName+" "+theTranslator->trCompoundIndex());
endTitle(ol,0,0);
writeAlphabeticalClassList(ol);
endFile(ol);
- ol.enableAll();
+ ol.popGeneratorState();
}
//----------------------------------------------------------------------------
diff --git a/src/language.cpp b/src/language.cpp
index e29fa22..31e0e6e 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -27,6 +27,7 @@
#include "translator_es.h"
#include "translator_fi.h"
#include "translator_ru.h"
+#include "translator_hr.h"
#endif
#define L_EQUAL(a) !stricmp(langName,a)
@@ -80,6 +81,10 @@ bool setTranslator(const char *langName)
{
theTranslator=new TranslatorRussian;
}
+ else if (L_EQUAL("croatian"))
+ {
+ theTranslator=new TranslatorCroatian;
+ }
#endif
else // use the default language (i.e. english)
{
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index f927059..7c32d86 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -195,7 +195,11 @@ void LatexGenerator::startIndexSection(IndexSections is)
{
if (theTranslator->latexBabelPackage()=="russian")
{
- t << "\\usepackage{inputenc}\n";
+#if defined(_WIN32)
+ t << "\\usepackage[cp1251]{inputenc}\n";
+#else
+ t << "\\usepackage[koi8-r]{inputenc}\n";
+#endif
}
t << "\\usepackage[" << theTranslator->latexBabelPackage() << "]{babel}\n";
}
diff --git a/src/latexgen.h b/src/latexgen.h
index 5fd278b..d66f7bc 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -221,6 +221,9 @@ class LatexGenerator : public OutputGenerator
void endTextBlock() {}
void startParameter(bool) {}
void endParameter(bool) {}
+
+ void startFontClass(const char *) {}
+ void endFontClass() {}
private:
LatexGenerator(const LatexGenerator &);
diff --git a/src/mangen.h b/src/mangen.h
index a21be05..00375c2 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -209,6 +209,9 @@ class ManGenerator : public OutputGenerator
void startParameter(bool) {}
void endParameter(bool) {}
+ void startFontClass(const char *) {}
+ void endFontClass() {}
+
private:
bool firstCol;
bool paragraph;
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 2f6aae7..7fc4b37 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -259,6 +259,7 @@ MemberDef::MemberDef(const char *t,const char *na,const char *a,const char *e,
annMemb=0;
annUsed=FALSE;
annShown=FALSE;
+ annEnumType=0;
indDepth=0;
section=0;
docEnumValues=FALSE;
@@ -463,7 +464,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
// name().data(),cd->name().data(),annScope,annMemb);
//}
- // hide members in annonymous scopes
+ // hide members in anonymous scopes
// (they are displayed by there parent placeholder)
if (annScope) return;
// hide undocumented members unless overwritten by the configuration
@@ -535,16 +536,16 @@ void MemberDef::writeDeclaration(OutputList &ol,
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag;
if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
- // search for the last annonymous scope in the member type
+ // search for the last anonymous scope in the member type
ClassDef *annoClassDef=0;
//while (i!=-1 && cname.find(type.mid(i,l))!=-1)
//{
// i=r.match(type,i+l,&l);
//}
int il=i-1,ir=i+l;
- if (i!=-1) // found annonymous scope in type
+ if (i!=-1) // found anonymous scope in type
{
- // extract annonymous scope
+ // extract anonymous scope
while (il>=0 && (isId(type.at(il)) || type.at(il)==':' || type.at(il)=='@')) il--;
if (il>0) il++;
while (ir<(int)type.length() && (isId(type.at(ir)) || type.at(ir)==':' || type.at(ir)=='@')) ir++;
@@ -569,7 +570,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
}
// start a new member declaration
- ol.startMemberItem(/* gId!=-1,*/(annoClassDef || annMemb) ? 1 : 0);
+ ol.startMemberItem((annoClassDef || annMemb || annEnumType) ? 1 : 0);
// If there is no detailed description we need to write the anchor here.
bool detailsVisible = detailsAreVisible();
@@ -605,12 +606,12 @@ void MemberDef::writeDeclaration(OutputList &ol,
writeTemplatePrefix(ol,tArgList,FALSE);
}
- if (i!=-1) // render member with annonymous componound as result type.
+ if (i!=-1) // member has an anonymous type
{
- //printf("annoClassDef=%p annMemb=%p scopeName=`%s' annonymous=`%s'\n",
+ //printf("annoClassDef=%p annMemb=%p scopeName=`%s' anonymous=`%s'\n",
// annoClassDef,annMemb,cname.data(),type.mid(i,l).data());
- if (annoClassDef)
+ if (annoClassDef) // type is an anonymous compound
{
//printf("class found!\n");
annoClassDef->writeDeclaration(ol,annMemb,inGroup);
@@ -633,8 +634,17 @@ void MemberDef::writeDeclaration(OutputList &ol,
}
else
{
- type = type.left(i) + " { ... } " + type.right(type.length()-i-l);
- linkifyText(ol,cname,name(),type,TRUE);
+ if (getAnonymousEnumType()) // type is an anonymous enum
+ {
+ linkifyText(ol,cname,name(),type.left(i),TRUE);
+ ol+=*getAnonymousEnumType()->enumDecl();
+ linkifyText(ol,cname,name(),type.right(type.length()-i-l),TRUE);
+ }
+ else
+ {
+ type = type.left(i) + " { ... } " + type.right(type.length()-i-l);
+ linkifyText(ol,cname,name(),type,TRUE);
+ }
}
}
else
@@ -749,7 +759,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.endDoxyAnchor();
}
- ol.endMemberItem(annoClassDef!=0 && indDepth==0);
+ ol.endMemberItem((annoClassDef!=0 && indDepth==0) || annEnumType);
//ol.endMemberItem(gId!=-1,gFile,gHeader,annoClassDef || annMemb);
// write brief description
@@ -775,7 +785,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
warnIfUndocumented();
}
-
+/*! Writes the "detailed documentation" section of this member to
+ * all active output formats.
+ */
void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
const char *scopeName)
{
@@ -783,37 +795,52 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
bool hasDocs = detailsAreVisible();
//printf("MemberDef::writeDocumentation(): type=`%s' def=`%s'\n",type.data(),definition());
if (
- (/*memberType()==m &&*/ // filter member type
- (Config::extractAllFlag || hasDocs)
- /*&& groupId()==-1 */ // not in a group
- ) || /* member is part of an annonymous scope that is the type of
- * another member in the list.
- */
+ Config::extractAllFlag || hasDocs
+ || /* member is part of an anonymous scope that is the type of
+ * another member in the list.
+ */
(!hasDocs && !briefDescription().isEmpty() && annUsed)
)
{
+ // get definition. TODO: make a method of this
NamespaceDef *nd=getNamespace();
ClassDef *cd=memberClass();
FileDef *fd=getFileDef();
Definition *d = 0;
if (cd) d=cd; else if (nd) d=nd; else d=fd;
+ ASSERT(d!=0);
+
QCString cname = d->name();
QCString cfname = d->getOutputFileBase();
// get member name
QCString doxyName=name().copy();
- // prepend scope if there is any
+ // prepend scope if there is any. TODO: make this optional for C only docs
if (scopeName) doxyName.prepend((QCString)scopeName+"::");
QCString def = definition();
- if (isEnumerate()) def.prepend("enum ");
- MemberDef *smd;
- if (isEnumValue() && def[0]=='@') def = def.right(def.length()-2);
- int i=0,l,dummy;
+ if (isEnumerate())
+ {
+ if (name().at(0)=='@')
+ {
+ def = "anonymous enum";
+ }
+ else
+ {
+ def.prepend("enum ");
+ }
+ }
+ int i=0,l;
static QRegExp r("@[0-9]+");
- if (isEnumerate() && r.match(def,0,&l)!=-1) return;
- if (isEnumValue() && (smd = getEnumScope())
- && r.match(smd->name(),0,&dummy)==-1) return;
+
+ //ENUM
+ if (isEnumValue()) return;
+ //if (isEnumValue() && def[0]=='@') def = def.right(def.length()-2);
+ //int dummy;
+ //if (isEnumerate() && r.match(def,0,&l)!=-1) return;
+ //MemberDef *smd;
+ //if (isEnumValue() && (smd = getEnumScope())
+ // && r.match(smd->name(),0,&dummy)==-1) return;
ol.pushGeneratorState();
@@ -823,7 +850,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if ((isVariable() || isTypedef()) && (i=r.match(def,0,&l))!=-1)
{
- // find enum type an insert it in the definition
+ // find enum type and insert it in the definition
MemberListIterator vmli(*ml);
MemberDef *vmd;
bool found=FALSE;
@@ -840,7 +867,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
linkifyText(ol,scopeName,name(),def.left(i));
ol+=*vmd->enumDecl();
linkifyText(ol,scopeName,name(),def.right(def.length()-i-l));
- //ol.endDoxyAnchor();
found=TRUE;
}
@@ -854,7 +880,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
- // strip annonymous compound names from definition
+ // strip anonymous compound names from definition
int si=def.find(' '),pi,ei=i+l;
if (si==-1) si=0;
while ((pi=r.match(def,i+l,&l))!=-1) ei=i=pi+l;
@@ -1329,6 +1355,7 @@ bool MemberDef::detailsAreVisible() const
void MemberDef::setEnumDecl(OutputList &ed)
{
enumDeclList=new OutputList(&ed);
+ *enumDeclList+=ed;
}
bool MemberDef::hasDocumentation()
diff --git a/src/memberdef.h b/src/memberdef.h
index c4e3bd2..90f0f75 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -124,15 +124,17 @@ class MemberDef : public Definition
// enumeration specific members
void insertEnumField(MemberDef *md);
- void setEnumScope(MemberDef *md) { enumScope=md; }
- MemberDef *getEnumScope() const { return enumScope; }
+ void setEnumScope(MemberDef *md) { enumScope=md; }
+ MemberDef *getEnumScope() const { return enumScope; }
void setEnumDecl(OutputList &ed);
- void setEnumUsed() { eUsed=TRUE; }
- bool enumUsed() const { return eUsed; }
- OutputList *enumDecl() const { return enumDeclList; }
- MemberList *enumFieldList() { return enumFields; }
+ void setEnumUsed() { eUsed=TRUE; }
+ bool enumUsed() const { return eUsed; }
+ OutputList *enumDecl() const { return enumDeclList; }
+ MemberList *enumFieldList() { return enumFields; }
void setDocumentedEnumValues(bool value) { docEnumValues=value; }
- bool hasDocumentedEnumValues() const { return docEnumValues; }
+ bool hasDocumentedEnumValues() const { return docEnumValues; }
+ void setAnonymousEnumType(MemberDef *md) { annEnumType = md; }
+ MemberDef *getAnonymousEnumType() { return annEnumType; }
// example related members
bool addExample(const char *anchor,const char *name,const char *file);
@@ -199,6 +201,7 @@ class MemberDef : public Definition
FileDef *fileDec; // member of file declaration
MemberDef *redefines; // the member that is redefined by this one
MemberDef *enumScope; // the enclosing scope, if this is an enum field
+ MemberDef *annEnumType; // the annonymous enum that is the type of this member
MemberList *redefinedBy; // the list of members that redefine this one
MemberDef *memDef; // member definition for this declaration
MemberDef *memDec; // member declaration for this definition
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index f1bdfd3..80cb26d 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -304,19 +304,25 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberList();
}
MemberListIterator mli(*this);
- for ( ; (md=mli.current()) ; ++mli )
+ for ( ; (md=mli.current()) ; ++mli ) // iterate through the members
{
+ // see if member is hidden by protection
if (md->protection()==Private && !Config::extractPrivateFlag) continue;
- /*bool hasDocs=md->hasDocumentation();*/
+
QCString type=md->typeString();
- type=type.stripWhiteSpace();
+ type=type.stripWhiteSpace(); // TODO: is this really needed?
+
+ // filter out enums that are in a group iff inGroup holds
if (md->isEnumerate() && inGroup==(md->getMemberGroup()!=0) /*&& (hasDocs || !Config::hideMemberFlag)*/)
{
- if (!Config::hideMemberFlag || // do not hide undocumented members or
- !md->documentation().isEmpty() || // member has detailed descr. or
- md->hasDocumentedEnumValues() || // member has documented enum vales.
- Config::briefMemDescFlag || // brief descr. is shown or
- Config::repeatBriefFlag // brief descr. is repeated.
+ // filter out invisible enums
+ if ( !Config::hideMemberFlag || // do not hide undocumented members or
+ !md->documentation().isEmpty() || // member has detailed descr. or
+ md->hasDocumentedEnumValues() || // member has documented enum vales.
+ (
+ !md->briefDescription().isEmpty() &&
+ Config::briefMemDescFlag // brief descr. is shown or
+ )
)
{
OutputList typeDecl(&ol);
@@ -325,15 +331,6 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if (i!=-1) name=name.right(name.length()-i-2); // strip scope
if (name[0]!='@') // not an anonymous enum
{
- //if (Config::extractAllFlag ||
- // (md->briefDescription().isEmpty() || !Config::briefMemDescFlag) &&
- // (!md->documentation().isEmpty() || md->hasDocumentedEnumValues() ||
- // (!md->briefDescription().isEmpty() &&
- // !Config::briefMemDescFlag &&
- // Config::repeatBriefFlag
- // )
- // )
- // )
if (md->isLinkableInProject() || md->hasDocumentedEnumValues())
{
if (!Config::genTagFile.isEmpty())
@@ -400,23 +397,29 @@ void MemberList::writePlainDeclarations(OutputList &ol,
for ( ; (vmd=vmli.current()) ; ++vmli)
{
QCString vtype=vmd->typeString();
- if ((vtype.find(name))!=-1) enumVars++;
+ if ((vtype.find(name))!=-1)
+ {
+ enumVars++;
+ vmd->setAnonymousEnumType(md);
+ }
}
}
- if (enumVars==0) // no variable of this enum type
+ // if this is an annoymous enum and there are variable of this
+ // enum type (i.e. enumVars>0), then we do not show the enum here.
+ if (enumVars==0) // show enum here
{
ol.startMemberItem(0);
ol.writeString("enum ");
ol.insertMemberAlign();
- ol+=typeDecl;
+ ol+=typeDecl; // append the enum values.
ol.endMemberItem(FALSE);
- //QCString brief=md->briefDescription();
- //brief=brief.stripWhiteSpace();
if (!md->briefDescription().isEmpty() && Config::briefMemDescFlag)
{
ol.startMemberDescription();
- parseDoc(ol,cd?cd->name().data():0,
- md->name().data(),md->briefDescription());
+ parseDoc(ol,
+ cd?cd->name().data():0,md->name().data(),
+ md->briefDescription()
+ );
if (!md->documentation().isEmpty() || md->hasDocumentedEnumValues())
{
ol.disableAllBut(OutputGenerator::Html);
@@ -429,9 +432,6 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.enableAll();
}
ol.endMemberDescription();
- //ol.disable(OutputGenerator::Man);
- //ol.newParagraph();
- //ol.enable(OutputGenerator::Man);
}
}
md->warnIfUndocumented();
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index b74f933..0507f2a 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -148,59 +148,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.endTextBlock();
ol.startMemberSections();
- if (classList->count()>0)
- {
- ClassDef *cd=classList->first();
- bool found=FALSE;
- while (cd)
- {
- if (cd->name().find('@')==-1)
- {
- if (!found)
- {
- ol.startMemberHeader();
- parseText(ol,theTranslator->trCompounds());
- ol.endMemberHeader();
- ol.startMemberList();
- found=TRUE;
- }
- QCString clName=cd->name().copy();
- if (clName.left(name().length()+2)==name()+"::")
- {
- clName = clName.right(clName.length()-name().length()-2);
- }
-
- ol.startMemberItem(0);
- switch (cd->compoundType())
- {
- case ClassDef::Class: ol.writeString("class"); break;
- case ClassDef::Struct: ol.writeString("struct"); break;
- case ClassDef::Union: ol.writeString("union"); break;
- case ClassDef::Interface: ol.writeString("interface"); break;
- case ClassDef::Exception: ol.writeString("exception"); break;
- }
- ol.writeString(" ");
- ol.insertMemberAlign();
- if (cd->isLinkable())
- {
- ol.writeObjectLink(cd->getReference(),
- cd->getOutputFileBase(),
- 0,
- clName
- );
- }
- else
- {
- ol.startBold();
- ol.docify(clName);
- ol.endBold();
- }
- ol.endMemberItem(FALSE);
- }
- cd=classList->next();
- }
- if (found) ol.endMemberList();
- }
+ classList->writeDeclaration(ol);
/* write user defined member groups */
MemberGroupListIterator mgli(*memberGroupList);
@@ -213,7 +161,8 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
allMemberList.writeDeclarations(ol,0,this,0,0,0,0);
ol.endMemberSections();
- if (!briefDescription().isEmpty() || !documentation().isEmpty())
+ if ((!briefDescription().isEmpty() && Config::repeatBriefFlag) ||
+ !documentation().isEmpty())
{
ol.writeRuler();
ol.pushGeneratorState();
@@ -281,15 +230,15 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
enumMembers.writeDocumentation(ol,name());
}
- enumValMembers.countDocMembers();
- if ( enumValMembers.totalCount()>0 )
- {
- ol.writeRuler();
- ol.startGroupHeader();
- parseText(ol,theTranslator->trEnumerationValueDocumentation());
- ol.endGroupHeader();
- enumValMembers.writeDocumentation(ol,name());
- }
+ //enumValMembers.countDocMembers();
+ //if ( enumValMembers.totalCount()>0 )
+ //{
+ // ol.writeRuler();
+ // ol.startGroupHeader();
+ // parseText(ol,theTranslator->trEnumerationValueDocumentation());
+ // ol.endGroupHeader();
+ // enumValMembers.writeDocumentation(ol,name());
+ //}
funcMembers.countDocMembers();
if ( funcMembers.totalCount()>0 )
diff --git a/src/outputgen.h b/src/outputgen.h
index d3696cf..ee0fb1e 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -213,6 +213,9 @@ class OutputGenerator
virtual void startParameter(bool) = 0;
virtual void endParameter(bool) = 0;
+ virtual void startFontClass(const char *) = 0;
+ virtual void endFontClass() = 0;
+
void clear() { b.close(); a.resize(0); b.setBuffer(a);
b.open(IO_WriteOnly); t.setDevice(&b); }
diff --git a/src/outputlist.h b/src/outputlist.h
index 191d82b..4826334 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -369,6 +369,11 @@ class OutputList
void endParameter(bool last)
{ forall(&OutputGenerator::endParameter,last); }
+ void startFontClass(const char *c)
+ { forall(&OutputGenerator::startFontClass,c); }
+ void endFontClass()
+ { forall(&OutputGenerator::endFontClass); }
+
private:
void debug();
void clear();
diff --git a/src/pre.l b/src/pre.l
index eb49f58..9e7a241 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -125,7 +125,15 @@ static void decrLevel()
static bool otherCaseDone()
{
- return g_levelGuard[g_level-1];
+ if (g_level==0)
+ {
+ err("Error: Found an #else without a preceding #if.\n");
+ return TRUE;
+ }
+ else
+ {
+ return g_levelGuard[g_level-1];
+ }
}
static void setCaseDone(bool value)
@@ -1079,7 +1087,7 @@ BN [ \t\r\n]
g_guardExpr.resize(0);
BEGIN(Guard);
}
-<Command>"elif"/[ \t(] {
+<Command>("elif"|"else"{B}*"if")/[ \t(] {
if (!otherCaseDone())
{
g_guardExpr.resize(0);
@@ -1107,7 +1115,7 @@ BN [ \t\r\n]
<Command>"undef"{B}+ {
BEGIN(Ung_defName);
}
-<Command>"elif"/[ \t(] {
+<Command>("elif"|"else"{B}*"if")/[ \t(] {
if (!otherCaseDone())
{
g_guardExpr.resize(0);
@@ -1208,7 +1216,7 @@ BN [ \t\r\n]
BEGIN(Start);
}
}
-<SkipCommand>"elif"/[ \t(] {
+<SkipCommand>("elif"|"else"{B}*"if")/[ \t(] {
if (g_ifcount==0)
{
if (!otherCaseDone())
@@ -1693,6 +1701,7 @@ void preprocessFile(const char *fileName,BufStr &output)
char *defStr = Config::predefined.first();
while (defStr)
{
+ //printf("Predefined: `%s'\n",defStr);
QCString ds = defStr;
int i_equals=ds.find('=');
int i_obrace=ds.find('(');
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index f18d33d..352049c 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -528,41 +528,44 @@ void RTFGenerator::endIndexSection(IndexSections is)
break;
case isMainPage:
t << "\\par " << Rtf_Style_Reset << endl;
+ t << "{\\tc \\v " << theTranslator->trMainPage() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"index.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isModuleIndex:
t << "\\par " << Rtf_Style_Reset << endl;
+ t << "{\\tc \\v " << theTranslator->trModuleIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"modules.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isNamespaceIndex:
t << "\\par " << Rtf_Style_Reset << endl;
+ t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"namespaces.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isClassHierarchyIndex:
t << "\\par " << Rtf_Style_Reset << endl;
- t << "{\\tc \\v Hierarchical Index}"<< endl;;
+ t << "{\\tc \\v " << theTranslator->trHierarchicalIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"hierarchy.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isCompoundIndex:
t << "\\par " << Rtf_Style_Reset << endl;
- t << "{\\tc \\v Compound Index}"<< endl;;
+ t << "{\\tc \\v " << theTranslator->trCompoundIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"annotated.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isFileIndex:
t << "\\par " << Rtf_Style_Reset << endl;
- t << "{\\tc \\v File Index}"<< endl;;
+ t << "{\\tc \\v " << theTranslator->trFileIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"files.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isPageIndex:
t << "\\par " << Rtf_Style_Reset << endl;
- t << "{\\tc \\v Page Index}"<< endl;;
+ t << "{\\tc \\v " << theTranslator->trPageIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isModuleDocumentation:
{
GroupDef *gd=groupList.first();
bool found=FALSE;
- t << "{\\tc \\v Module Documentation}"<< endl;;
+ t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}"<< endl;
while (gd && !found)
{
if (gd->isLinkableInProject() || gd->countMembers()>0)
@@ -625,7 +628,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
ClassDef *cd=classList.first();
bool found=FALSE;
- t << "{\\tc \\v Class Documentation}"<< endl;;
+ t << "{\\tc \\v " << theTranslator->trClassDocumentation() << "}"<< endl;
while (cd && !found)
{
if (cd->isLinkableInProject())
@@ -657,7 +660,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
bool isFirst=TRUE;
FileName *fn=inputNameList.first();
- t << "{\\tc \\v File Documentation}"<< endl;
+ t << "{\\tc \\v " << theTranslator->trFileDocumentation() << "}"<< endl;
while (fn)
{
FileDef *fd=fn->first();
@@ -692,6 +695,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
{
//t << "}\n";
PageInfo *pi=exampleList.first();
+ t << "{\\tc \\v " << theTranslator->trExampleDocumentation() << "}"<< endl;
if (pi)
{
t << "\\par " << Rtf_Style_Reset << endl;
@@ -713,7 +717,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
break;
case isPageDocumentation:
{
- t << "{\\tc \\v Page Documentation}"<< endl;;
+ t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl;
PageInfo *pi=pageList.first();
if (pi)
{
@@ -1346,7 +1350,7 @@ void RTFGenerator::startDescList()
{
t << "{\\comment (startDescList)}" << endl;
t << "{";
- /*if (!m_omitParagraph)*/ newParagraph();
+ ///*if (!m_omitParagraph)*/ newParagraph();
}
void RTFGenerator::endDescTitle()
@@ -1378,6 +1382,7 @@ void RTFGenerator::endDescList()
void RTFGenerator::writeSection(const char *lab,const char *title,bool sub)
{
t << "{\\comment (writeSection)}" << endl;
+ t << "{";
t<< Rtf_Style_Reset;
if (sub)
{
@@ -1404,12 +1409,19 @@ void RTFGenerator::writeSection(const char *lab,const char *title,bool sub)
newParagraph();
// make bookmark
writeAnchor(lab);
+ t << "}";
}
void RTFGenerator::writeSectionRef(const char *,const char *lab,
- const char *)
+ const char *title)
{
+ startBold();
+ docify(title);
+ endBold();
+ t << " (";
+ docify(theTranslator->trPageAbbreviation());
WriteRTFReference(lab);
+ t << ")" << endl;
}
void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
@@ -1421,13 +1433,10 @@ void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
t << endl;
}
-void RTFGenerator::writeSectionRefAnchor(const char *,const char *lab,
+void RTFGenerator::writeSectionRefAnchor(const char *name,const char *lab,
const char *title)
{
- startBold();
- docify(title);
- endBold();
- t << " (p.~\\pageref{" << lab << "})" << endl;
+ writeSectionRef(name,lab,title);
}
void RTFGenerator::docify(const char *str)
diff --git a/src/rtfgen.h b/src/rtfgen.h
index d8bec55..de4f5b4 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -211,6 +211,9 @@ class RTFGenerator : public OutputGenerator
void startParameter(bool) {}
void endParameter(bool) {}
+ void startFontClass(const char *) {}
+ void endFontClass() {}
+
static bool preProcessFileInplace(const char *path,const char *name);
private:
diff --git a/src/scanner.l b/src/scanner.l
index 171ca71..dea0bee 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -3773,16 +3773,17 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
<BasesProt>"private" { baseProt = Private; }
<BasesProt>{BN} { lineCount(); }
<BasesProt>. { unput(*yytext); BEGIN(Bases); }
-<Bases>("::")*{BN}*({ID}{BN}*"::"{BN}*)*{ID} {
+<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID} {
//current->extends->append(
// new BaseInfo(yytext,baseProt,baseVirt)
//) ;
- if (*yytext != ':')
+ bool globalScope = *yytext==':' && baseName.isEmpty();
+ if (!globalScope)
baseName += yytext;
else
baseName += (yytext+2);
current->args += ' ';
- if (*yytext != ':')
+ if (!globalScope)
current->args += yytext;
else
current->args += (yytext+2);
@@ -4492,7 +4493,7 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
);
}
<DocBaseClass>\n { yyLineNr++; BEGIN( ClassDoc ); }
-<ClassDocBrief>{BS}{BL} {
+<ClassDocBrief>{BS}({BL}|"\\n\\n") {
current->brief=current->brief.stripWhiteSpace();
if (!current->doc.isEmpty()) current->doc+="<p>";
yyLineNr++;
@@ -4659,13 +4660,26 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
unput(afterDocTerminator);
BEGIN(lastAfterDocContext);
}
-<ClassDocRelates,ClassDocFunc,ClassDocDefine,GroupDocArg1,ClassDocArg1,SectionTitle,EnumDocArg1,FileDocArg1,PageDocArg1,ExampleDocArg1,ClassDefineArgs,GroupName>"*/" {
+<ClassDocRelates,ClassDocFunc,ClassDocDefine,GroupDocArg1,ClassDocArg1,SectionTitle,EnumDocArg1,PageDocArg1,ExampleDocArg1,ClassDefineArgs,GroupName>"*/" {
current->doc += "\n\n";
err("Warning: unexpected end of "
"documentation block found in "
"file %s at line %d\n",yyFileName,yyLineNr);
BEGIN( lastDocContext );
}
+<FileDocArg1>"*/" {
+ current->name = yyFileName;
+ current->doc += "\n\n";
+ current_root->addSubEntry(current);
+ current = new Entry ;
+ current->protection = protection ;
+ current->sig = sig;
+ current->virt = virt;
+ current->stat = gstat;
+ current->slot = slot;
+ current->mGrpId = memberGroupId;
+ BEGIN( FindMembers );
+ }
<Doc>"*/" {
checkDocs();
current->doc += "\n\n";
diff --git a/src/translator_de.h b/src/translator_de.h
index 7ea3cf6..5736023 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -48,7 +48,7 @@ class TranslatorGerman : public Translator
QCString latexBabelPackage()
// returns the name of the package that is included by LaTeX
- { return "deutsch"; }
+ { return "german"; }
QCString trRelatedFunctions()
// used in the compound documentation before a list of related functions.
diff --git a/src/util.cpp b/src/util.cpp
index 7227e40..f49b761 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -248,7 +248,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
(i!=0 && i!=s.length()-1 && isId(s.at(i-1)) && isId(s.at(i+1)))
)
{
- if ((c=='*' || c=='&') &&
+ if ((c=='*' || c=='&' || c=='@') &&
!result.isEmpty() && isId(result.at(result.length()-1))
) result+=' ';
result+=c;
@@ -535,7 +535,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
//bool texEnabled = ol.isEnabled(OutputGenerator::Latex);
ol.disableAllBut(OutputGenerator::Html);
QCString extLink,absPath;
- if (ext) { extLink="_doc:"; absPath="/"; }
+ if (ext) { extLink="_doc"; absPath="/"; }
//if (manEnabled) ol.disable(OutputGenerator::Man);
//if (texEnabled) ol.disable(OutputGenerator::Latex);
if (compact) ol.startCenter(); else ol.startItemList();
@@ -2217,3 +2217,27 @@ void extractNamespaceName(const QCString &scopeName,
return;
}
+QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ)
+{
+ QCString result=scope.copy();
+ if (!templ.isEmpty() && scope.find('<')==-1)
+ {
+ int si,pi=0;
+ while ((si=scope.find("::",pi))!=-1 && !getClass(scope.left(si)+templ)
+ && !getClass(scope.left(si)))
+ { //printf("Tried `%s'\n",(scope.left(si)+templ).data());
+ pi=si+2;
+ }
+ if (si==-1) // not nested => append template specifier
+ {
+ result+=templ;
+ }
+ else // nested => insert template specifier before after first class name
+ {
+ result=scope.left(si) + templ + scope.right(scope.length()-si);
+ }
+ }
+ //printf("insertTemplateSpecifierInScope(`%s',`%s')=%s\n",
+ // scope.data(),templ.data(),result.data());
+ return result;
+}
diff --git a/src/util.h b/src/util.h
index b23a505..4037939 100644
--- a/src/util.h
+++ b/src/util.h
@@ -93,5 +93,6 @@ int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0);
QCString convertNameToFile(const char *name);
void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName);
+QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
#endif