summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp6
-rw-r--r--src/config.h3
-rw-r--r--src/config.l35
-rw-r--r--src/doc.l14
-rw-r--r--src/doxygen.cpp94
-rw-r--r--src/filedef.cpp10
-rw-r--r--src/ftvhelp.cpp39
-rw-r--r--src/ftvhelp.h6
-rw-r--r--src/htmlgen.cpp1
-rw-r--r--src/index.cpp49
-rw-r--r--src/instdox.cpp15
-rw-r--r--src/pre.l29
-rw-r--r--src/scanner.l71
-rw-r--r--src/translator_cn.h13
-rw-r--r--src/treeview.h43
-rw-r--r--src/treeview.js43
16 files changed, 313 insertions, 158 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 239ae3f..775b84f 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -604,6 +604,7 @@ ArgumentList *ClassDef::outerTemplateArguments() const
int ti;
ClassDef *pcd=0;
int pi=0;
+ if (tempArgs) return tempArgs;
// find the outer most class scope
while ((ti=name().find("::",pi))!=-1 &&
(pcd=getClass(name().left(ti)))==0
@@ -612,10 +613,7 @@ ArgumentList *ClassDef::outerTemplateArguments() const
{
return pcd->templateArguments();
}
- else
- {
- return tempArgs;
- }
+ return 0;
}
diff --git a/src/config.h b/src/config.h
index 176c1ad..9e5c906 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Sat Nov 25 21:38:08 2000
+/* This file was generated by configgen on Sun Dec 3 18:27:54 2000
* from config_templ.h
*
* DO NOT EDIT!
@@ -98,6 +98,7 @@ struct Config
static bool noIndexFlag; // generate condensed index flag
static int enumValuesPerLine; // number of enum values that are put on one line
static bool ftvHelpFlag; // should a folder tree view be generated?
+ static int treeViewWidth; // What is the width of the treeview panel?
static bool generateLatex; // generate Latex output
static QCString latexOutputDir; // the directory to put the Latex files
static bool compactLatexFlag; // generate compact LaTeX documentation.
diff --git a/src/config.l b/src/config.l
index 6d4d834..2fcef2f 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1,4 +1,4 @@
-/* This file was generated by configgen on Sat Nov 25 21:38:08 2000
+/* This file was generated by configgen on Sun Dec 3 19:18:43 2000
* from config_templ.l
*
* DO NOT EDIT!
@@ -135,6 +135,7 @@ bool Config::htmlHelpFlag = FALSE;
bool Config::noIndexFlag = FALSE;
int Config::enumValuesPerLine = 4;
bool Config::ftvHelpFlag = FALSE;
+int Config::treeViewWidth = 250;
bool Config::generateLatex = TRUE;
QCString Config::latexOutputDir = "latex";
bool Config::compactLatexFlag = FALSE;
@@ -215,6 +216,7 @@ static int includeDepth;
static QCString tabSizeString;
static QCString colsInAlphaIndexString;
static QCString enumValuesPerLineString;
+static QCString treeViewWidthString;
static QCString maxDotGraphWidthString;
static QCString maxDotGraphHeightString;
@@ -413,6 +415,7 @@ static void readIncludeFile(const char *incName)
<Start>"DISABLE_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::noIndexFlag; }
<Start>"ENUM_VALUES_PER_LINE"[ \t]*"=" { BEGIN(GetString); s=&enumValuesPerLineString; s->resize(0); }
<Start>"GENERATE_TREEVIEW"[ \t]*"=" { BEGIN(GetBool); b=&Config::ftvHelpFlag; }
+<Start>"TREEVIEW_WIDTH"[ \t]*"=" { BEGIN(GetString); s=&treeViewWidthString; s->resize(0); }
<Start>"GENERATE_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateLatex; }
<Start>"LATEX_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::latexOutputDir; s->resize(0); }
<Start>"COMPACT_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactLatexFlag; }
@@ -713,6 +716,7 @@ void dumpConfig()
printf("noIndexFlag=`%d'\n",Config::noIndexFlag);
printf("enumValuesPerLine=`%d'\n",Config::enumValuesPerLine);
printf("ftvHelpFlag=`%d'\n",Config::ftvHelpFlag);
+ printf("treeViewWidth=`%d'\n",Config::treeViewWidth);
printf("# configuration options related to the LaTeX output\n");
printf("generateLatex=`%d'\n",Config::generateLatex);
printf("latexOutputDir=`%s'\n",Config::latexOutputDir.data());
@@ -882,6 +886,7 @@ void Config::init()
Config::noIndexFlag = FALSE;
Config::enumValuesPerLine = 4;
Config::ftvHelpFlag = FALSE;
+ Config::treeViewWidth = 250;
Config::generateLatex = TRUE;
Config::latexOutputDir = "latex";
Config::compactLatexFlag = FALSE;
@@ -1725,6 +1730,17 @@ void writeTemplateConfig(QFile *f,bool sl)
if (!sl)
{
t << "\n";
+ t << "# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be \n";
+ t << "# used to set the initial width (in pixels) of the frame in which the tree \n";
+ t << "# is shown. \n";
+ t << "\n";
+ }
+ t << "TREEVIEW_WIDTH = ";
+ writeIntValue(t,Config::treeViewWidth);
+ t << "\n";
+ if (!sl)
+ {
+ t << "\n";
}
t << "#---------------------------------------------------------------------------\n";
t << "# configuration options related to the LaTeX output\n";
@@ -2356,6 +2372,23 @@ void configStrToVal()
Config::enumValuesPerLine=cols;
}
+ if (treeViewWidthString.isEmpty())
+ {
+ Config::treeViewWidth=250;
+ }
+ else
+ {
+ bool ok;
+ int width = treeViewWidthString.toInt(&ok);
+ if (!ok || width<0 || width>1500)
+ {
+ warn_cont("Warning: argument of TREEVIEW_WIDTH is not a valid number in the range [0..1500]!\n"
+ "Using the default of 250!\n");
+ width = 250;
+ }
+ Config::treeViewWidth=width;
+ }
+
if (maxDotGraphWidthString.isEmpty())
{
Config::maxDotGraphWidth=1024;
diff --git a/src/doc.l b/src/doc.l
index 274844f..82883ee 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -561,10 +561,14 @@ static void addListItemMarker(const char *marker,int dashPos,bool enumerated)
}
else // end sub item list
{
- pPrevInfo->endList();
- listIndentStack.pop();
- currentListIndent.pop();
- delete pPrevInfo;
+ while (pPrevInfo && pPrevInfo->indent>indent)
+ {
+ pPrevInfo->endList();
+ listIndentStack.pop();
+ currentListIndent.pop();
+ delete pPrevInfo;
+ pPrevInfo = listIndentStack.top();
+ }
// safe guard against wrong indenting
if (listIndentStack.isEmpty())
{
@@ -855,7 +859,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
int dashPos = text.findRev('-');
//printf("dashPos=%d char='%c'\n",dashPos,text.at(dashPos+1));
bool isEnumerated = text.at(dashPos+1)=='#';
- addListItemMarker(yytext,dashPos,isEnumerated);
+ addListItemMarker(yytext,dashPos+1,isEnumerated);
}
<DocScan>\n{B}*(("//"{B}*)?)"*"*{B}*"-"("#")?{B}+ { /* found list item marker */
QCString text=yytext;
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 14901c7..4e951bd 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -731,7 +731,7 @@ static void buildClassList(Entry *root)
ClassDef *cd=new ClassDef(root->fileName,root->startLine,fullName,sec);
cd->setDocumentation(root->doc); // copy docs to definition
cd->setBriefDescription(root->brief);
- //printf("new ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
+ //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
cd->setTemplateArguments(root->tArgList);
cd->setProtection(root->protection);
cd->addSectionsToDefinition(root->anchors);
@@ -1364,7 +1364,7 @@ static MemberDef *addVariableToFile(
void buildVarList(Entry *root)
{
- QRegExp re("([^)]*)");
+ static const QRegExp re("([^)]*)");
int i=-1;
if (!root->name.isEmpty() &&
//root->type!="class" && root->type!="interface" &&
@@ -1397,9 +1397,9 @@ void buildVarList(Entry *root)
{
// recover from parse error caused by redundant braces
root->type=root->name;
- QRegExp re("[a-z_A-Z][a-z_A-Z0-9]*");
+ static const QRegExp reName("[a-z_A-Z][a-z_A-Z0-9]*");
int l;
- i=root->args.isEmpty() ? -1 : re.match(root->args,0,&l);
+ i=root->args.isEmpty() ? -1 : reName.match(root->args,0,&l);
root->name=root->args.mid(i,l);
root->args=root->args.mid(i+l,root->args.find(')',i+l)-i-l);
//printf("new: type=`%s' name=`%s' args=`%s'\n",
@@ -1408,10 +1408,19 @@ void buildVarList(Entry *root)
else
{
i=root->type.find(re,0);
- if (i!=-1) // function variable
+ if (i!=-1) // function pointer
{
- root->type=root->type.left(root->type.length()-1);
- root->args.prepend(")");
+ int ai = root->type.find('[',i);
+ if (ai>i) // function pointer array
+ {
+ root->args.prepend(root->type.right(root->type.length()-ai));
+ root->type=root->type.left(ai);
+ }
+ else
+ {
+ root->type=root->type.left(root->type.length()-1);
+ root->args.prepend(")");
+ }
}
}
@@ -2047,39 +2056,48 @@ static void transferFunctionDocumentation()
matchArguments(mdef->argumentList(),mdec->argumentList())
) /* match found */
{
- //printf("Found member %s: def in %s and dec in %s\n",
- // mn->memberName(),mdef->getFileDef()->name().data(),
- // mdec->getFileDef()->name().data());
-
- /* copy documentation between function definition and declaration */
- if (mdec->briefDescription())
- {
- mdef->setBriefDescription(mdec->briefDescription());
- }
- else if (mdef->briefDescription())
- {
- mdec->setBriefDescription(mdef->briefDescription());
- }
- if (mdef->documentation())
- {
- mdec->setDocumentation(mdef->documentation());
- }
- else if (mdec->documentation())
- {
- mdef->setDocumentation(mdec->documentation());
- }
- if (mdec->getStartBodyLine()!=-1 && mdef->getStartBodyLine()==-1)
- {
- mdef->setBodySegment(mdec->getStartBodyLine(),mdec->getEndBodyLine());
- mdef->setBodyDef(mdec->getFileDef());
- }
- else if (mdef->getStartBodyLine()!=-1 && mdec->getStartBodyLine()==-1)
+ FileDef *fdef = mdef->getFileDef();
+ FileDef *fdec = mdec->getFileDef();
+
+ // check if not in different but documented files
+ if (Config::extractAllFlag ||
+ fdef==fdec ||
+ !fdef->hasDocumentation() || !mdec->hasDocumentation())
{
- mdec->setBodySegment(mdef->getStartBodyLine(),mdef->getEndBodyLine());
- mdec->setBodyDef(mdef->getFileDef());
+ //printf("Found member %s: def in %s and dec in %s\n",
+ // mn->memberName(),mdef->getFileDef()->name().data(),
+ // mdec->getFileDef()->name().data());
+
+ /* copy documentation between function definition and declaration */
+ if (mdec->briefDescription())
+ {
+ mdef->setBriefDescription(mdec->briefDescription());
+ }
+ else if (mdef->briefDescription())
+ {
+ mdec->setBriefDescription(mdef->briefDescription());
+ }
+ if (mdef->documentation())
+ {
+ mdec->setDocumentation(mdef->documentation());
+ }
+ else if (mdec->documentation())
+ {
+ mdef->setDocumentation(mdec->documentation());
+ }
+ if (mdec->getStartBodyLine()!=-1 && mdef->getStartBodyLine()==-1)
+ {
+ mdef->setBodySegment(mdec->getStartBodyLine(),mdec->getEndBodyLine());
+ mdef->setBodyDef(mdec->getFileDef());
+ }
+ else if (mdef->getStartBodyLine()!=-1 && mdec->getStartBodyLine()==-1)
+ {
+ mdec->setBodySegment(mdef->getStartBodyLine(),mdef->getEndBodyLine());
+ mdec->setBodyDef(mdef->getFileDef());
+ }
+ mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers());
+ mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers());
}
- mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers());
- mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers());
}
}
}
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 580749d..bb75335 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -164,6 +164,10 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.docify(ii->includeName);
ol.enableAll();
ol.disableAllBut(OutputGenerator::Html);
+
+ // Here we use the include file name as it appears in the file.
+ // we could also we the name as it is used within doxygen,
+ // then we should have used fd->docName() instead of ii->includeName
if (fd && fd->isLinkable() && fd->generateSourceFile())
{
ol.writeObjectLink(fd->getReference(),fd->includeName(),0,ii->includeName);
@@ -172,6 +176,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{
ol.docify(ii->includeName);
}
+
ol.enableAll();
if (ii->local)
ol.docify("\"");
@@ -438,7 +443,10 @@ void FileDef::writeSource(OutputList &ol)
initParseCodeContext();
ol.startCodeFragment();
- parseCode(ol,0,fileToString(absFilePath(),TRUE),FALSE,0,this);
+ parseCode(ol,0,
+ fileToString(absFilePath(),Config::filterForSourceFlag),
+ FALSE,0,this
+ );
ol.endCodeFragment();
endFile(ol);
ol.enableAll();
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index 25ca875..cac212b 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -16,6 +16,7 @@
#include "ftvhelp.h"
#include "config.h"
#include "message.h"
+#include "doxygen.h"
const char treeview_data[]=
@@ -272,7 +273,7 @@ static void generateFolderTreeViewData()
{
QTextStream t(&f);
t << "<html><head><title>" << Config::projectName << "</title></head>" << endl;
- t << "<frameset cols=\"250,*\">" << endl;
+ t << "<frameset cols=\"" << Config::treeViewWidth << ",*\">" << endl;
t << " <frame src=\"tree.html\" name=\"treefrm\">" << endl;
t << " <frame src=\"main.html\" name=\"basefrm\">" << endl;
t << "</frameset>" << endl;
@@ -360,7 +361,7 @@ void FTVHelp::initialize()
}
/* Write the header of the contents file */
m_cts.setDevice(m_cf);
- m_cts << "foldersTree = gFld(\"<b>";
+ m_cts << "foldersTree = gFld(\"\", \"<b>";
if (Config::projectName.isEmpty())
{
m_cts << "Root";
@@ -409,18 +410,35 @@ int FTVHelp::decContentsDepth()
* \param name the name of the item.
* \param ref the URL of to the item.
*/
-void FTVHelp::addContentsItem(bool isDir,const char *name,const char *ref,
- const char *anchor)
+void FTVHelp::addContentsItem(bool isDir,
+ const char *ref,
+ const char *file,
+ const char *anchor,
+ const char *name
+ )
{
int i; for (i=0;i<m_dc;i++) m_cts << " ";
QCString parent;
+ QCString tagName = ref;
+ QCString tagDir;
+ if (ref)
+ {
+ tagName += ":";
+ QCString *s = tagDestinationDict[ref];
+ if (s)
+ {
+ tagDir = *s + "/";
+ tagName += tagDir;
+ }
+ }
if (m_dc==0) parent="foldersTree"; else parent.sprintf("aux%d",m_dc);
if (isDir) // directory entry
{
- m_cts << "aux" << m_dc+1 << " = insFld(" << parent << ", gFld(\"" << name << "\", ";
- if (ref) // ref optional param
+ m_cts << "aux" << m_dc+1 << " = insFld(" << parent << ", gFld(\""
+ << name << "\", \"" << tagName << "\", ";
+ if (file) // file optional param
{
- m_cts << "\"" << ref << ".html\"))";
+ m_cts << "\"" << tagDir << file << ".html\"))";
}
else
{
@@ -429,10 +447,11 @@ void FTVHelp::addContentsItem(bool isDir,const char *name,const char *ref,
}
else // text entry
{
- m_cts << " insDoc(" << parent << ", gLnk(0, \"" << name << "\", ";
- if (ref) // ref optional param
+ m_cts << " insDoc(" << parent << ", gLnk(\""
+ << name << "\", \"" << tagName << "\", ";
+ if (file) // ref optional param
{
- m_cts << "\"" << ref << ".html";
+ m_cts << "\"" << tagDir << file << ".html";
if (anchor) m_cts << "#" << anchor;
m_cts << "\"))";
}
diff --git a/src/ftvhelp.h b/src/ftvhelp.h
index 4e58ce1..1d6ccdf 100644
--- a/src/ftvhelp.h
+++ b/src/ftvhelp.h
@@ -32,8 +32,10 @@ class FTVHelp
/*! return the current depth of the contents tree */
int contentsDepth() { return m_dc; }
void addContentsItem(bool isDir,
- const char *name, const char *ref = 0,
- const char *anchor = 0);
+ const char *ref,
+ const char *file,
+ const char *anchor,
+ const char *name);
private:
FTVHelp();
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index a962d9f..a077ab2 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -540,6 +540,7 @@ void HtmlGenerator::codify(const char *str)
break;
case '\n': t << '\n'; col=0;
break;
+ case '\r': break;
case '<': t << "&lt;"; col++;
break;
case '>': t << "&gt;"; col++;
diff --git a/src/index.cpp b/src/index.cpp
index 9df60ad..09b2e71 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -144,7 +144,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
}
if (hasFtvHelp)
{
- ftvHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
+ ftvHelp->addContentsItem(hasChildren,cd->getReference(),cd->getOutputFileBase(),0,cd->name());
}
}
else
@@ -156,7 +156,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
}
if (hasFtvHelp)
{
- ftvHelp->addContentsItem(hasChildren,cd->name(),0);
+ ftvHelp->addContentsItem(hasChildren,0,0,0,cd->name());
}
}
if (hasChildren)
@@ -271,7 +271,7 @@ void writeClassTree(ClassList *cl)
}
if (hasFtvHelp)
{
- ftvHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
+ ftvHelp->addContentsItem(hasChildren,cd->getReference(),cd->getOutputFileBase(),0,cd->name());
}
}
if (hasChildren)
@@ -340,7 +340,7 @@ void writeClassHierarchy(OutputList &ol)
}
if (hasFtvHelp)
{
- ftvHelp->addContentsItem(hasChildren,cd->name(),cd->getOutputFileBase());
+ ftvHelp->addContentsItem(hasChildren,cd->getReference(),cd->getOutputFileBase(),0,cd->name());
}
}
else
@@ -352,7 +352,7 @@ void writeClassHierarchy(OutputList &ol)
}
if (hasFtvHelp)
{
- ftvHelp->addContentsItem(hasChildren,cd->name(),0);
+ ftvHelp->addContentsItem(hasChildren,0,0,0,cd->name());
}
}
if (hasChildren)
@@ -412,7 +412,7 @@ void writeHierarchicalIndex(OutputList &ol)
if (Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/)
{
ftvHelp = FTVHelp::getInstance();
- ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"hierarchy");
+ ftvHelp->addContentsItem(TRUE,0,"hierarchy",0,ftvHelpTitle);
}
if (Config::haveDotFlag && Config::gfxHierarchyFlag)
{
@@ -459,7 +459,7 @@ void writeGraphicalClassHierarchy(OutputList &ol)
if (Config::generateHtml && Config::ftvHelpFlag)
{
ftvHelp = FTVHelp::getInstance();
- ftvHelp->addContentsItem(FALSE,ftvHelpTitle,"inherits");
+ ftvHelp->addContentsItem(FALSE,0,"inherits",0,ftvHelpTitle);
}
ol.startTextLink("hierarchy",0);
parseText(ol,theTranslator->trGotoTextualHierarchy());
@@ -538,7 +538,7 @@ void writeFileIndex(OutputList &ol)
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
- ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"files");
+ ftvHelp->addContentsItem(TRUE,0,"files",0,ftvHelpTitle);
ftvHelp->incContentsDepth();
}
//ol.newParagraph();
@@ -638,7 +638,7 @@ void writeFileIndex(OutputList &ol)
}
if (hasFtvHelp)
{
- ftvHelp->addContentsItem(FALSE,fd->name(),fd->getOutputFileBase());
+ ftvHelp->addContentsItem(FALSE,fd->getReference(),fd->getOutputFileBase(),0,fd->name());
}
}
else
@@ -652,7 +652,7 @@ void writeFileIndex(OutputList &ol)
}
if (hasFtvHelp)
{
- ftvHelp->addContentsItem(FALSE,fd->name(),0);
+ ftvHelp->addContentsItem(FALSE,0,0,0,fd->name());
}
}
if (src)
@@ -738,7 +738,7 @@ void writeNamespaceIndex(OutputList &ol)
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
- ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"namespaces");
+ ftvHelp->addContentsItem(TRUE,0,"namespaces",0,ftvHelpTitle);
ftvHelp->incContentsDepth();
}
//ol.newParagraph();
@@ -771,7 +771,7 @@ void writeNamespaceIndex(OutputList &ol)
}
if (hasFtvHelp)
{
- ftvHelp->addContentsItem(FALSE,nd->name(),nd->getOutputFileBase());
+ ftvHelp->addContentsItem(FALSE,nd->getReference(),nd->getOutputFileBase(),0,nd->name());
}
}
nd=namespaceList.next();
@@ -851,7 +851,7 @@ void writeAnnotatedClassList(OutputList &ol)
}
if (hasFtvHelp)
{
- FTVHelp::getInstance()->addContentsItem(FALSE,cd->name(),cd->getOutputFileBase());
+ FTVHelp::getInstance()->addContentsItem(FALSE,cd->getReference(),cd->getOutputFileBase(),0,cd->name());
}
}
cd=classList.next();
@@ -1060,7 +1060,7 @@ void writeAnnotatedIndex(OutputList &ol)
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
- ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"annotated");
+ ftvHelp->addContentsItem(TRUE,0,"annotated",0,ftvHelpTitle);
ftvHelp->incContentsDepth();
}
parseText(ol,theTranslator->trCompoundListDescription());
@@ -1536,7 +1536,7 @@ void writeExampleIndex(OutputList &ol)
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
- ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"examples");
+ ftvHelp->addContentsItem(TRUE,0,"examples",0,ftvHelpTitle);
ftvHelp->incContentsDepth();
}
parseText(ol,theTranslator->trExamplesDescription());
@@ -1553,13 +1553,13 @@ void writeExampleIndex(OutputList &ol)
{
ol.writeObjectLink(0,n,0,pi->title);
if (hasHtmlHelp) htmlHelp->addContentsItem(FALSE,pi->title,n);
- if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,pi->title,n);
+ if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,0,n,0,pi->title);
}
else
{
ol.writeObjectLink(0,n,0,pi->name);
if (hasHtmlHelp) htmlHelp->addContentsItem(FALSE,pi->name,n);
- if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,pi->name,n);
+ if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,0,n,0,pi->name);
}
ol.writeString("\n");
}
@@ -1620,7 +1620,7 @@ void writePageIndex(OutputList &ol)
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
- ftvHelp->addContentsItem(TRUE,ftvHelpTitle,"pages");
+ ftvHelp->addContentsItem(TRUE,0,"pages",0,ftvHelpTitle);
ftvHelp->incContentsDepth();
}
parseText(ol,theTranslator->trRelatedPagesDescription());
@@ -1651,7 +1651,7 @@ void writePageIndex(OutputList &ol)
ol.writeEndAnnoItem(pageName);
ol.writeString("\n");
if (hasHtmlHelp) htmlHelp->addContentsItem(FALSE,pageTitle,pageName);
- if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,pageTitle,pageName);
+ if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,0,pageName,0,pageTitle);
}
}
ol.endIndexList();
@@ -1742,7 +1742,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
}
if(ftvHelp)
{
- ftvHelp->addContentsItem(hasSubGroups || hasSubPages,gd->groupTitle(),gd->getOutputFileBase());
+ ftvHelp->addContentsItem(hasSubGroups || hasSubPages,gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
ftvHelp->incContentsDepth();
}
@@ -1770,9 +1770,10 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
si ? si->label.data() : 0
);
if(ftvHelp) ftvHelp->addContentsItem(FALSE,
- convertToHtml(pi->title),
+ gd->getReference(),
gd->getOutputFileBase(),
- si ? si->label.data() : 0
+ si ? si->label.data() : 0,
+ convertToHtml(pi->title)
);
}
@@ -1972,7 +1973,7 @@ void writeGroupIndex(OutputList &ol)
ftvHelp = FTVHelp::getInstance();
//if(!Config::htmlHelpGroupsOnly)
//{
- ftvHelp->addContentsItem(TRUE,htmlHelpTitle,"modules");
+ ftvHelp->addContentsItem(TRUE,0,"modules",0,htmlHelpTitle);
ftvHelp->incContentsDepth();
//}
}
@@ -2042,7 +2043,7 @@ void writeIndex(OutputList &ol)
}
if (Config::generateHtml && Config::ftvHelpFlag)
{
- FTVHelp::getInstance()->addContentsItem(FALSE,title,indexName);
+ FTVHelp::getInstance()->addContentsItem(FALSE,0,indexName,0,title);
}
if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE);
diff --git a/src/instdox.cpp b/src/instdox.cpp
index 0ef6b6e..e891f3c 100644
--- a/src/instdox.cpp
+++ b/src/instdox.cpp
@@ -120,6 +120,7 @@ void writeInstallScript()
t << " $match = \".html\";\n";
t << " next if ( $file =~ /^\\.\\.?$/ );\n";
t << " ($file =~ /$match/) && (push @files, $file);\n";
+ t << " ($file =~ \"tree.js\") && (push @files, $file);\n";
t << " }\n";
t << " closedir(D);\n";
t << " }\n";
@@ -145,9 +146,17 @@ void writeInstallScript()
t << " print STDERR \"Error: opening file $oldf for writing\\n\";\n";
t << " exit 1;\n";
t << " }\n";
- t << " while (<F>) {\n";
- t << " s/doxygen\\=\\\"([^ \\\"\\:\\t\\>\\<]*)\\:([^ \\\"\\t\\>\\<]*)\\\" (href|src)=\\\"\\2/doxygen\\=\\\"$1:$subst{$1}\\\" \\3=\\\"$subst{$1}/g;\n";
- t << " print G \"$_\";\n";
+ t << " if ($oldf!=\"tree.js\") {\n";
+ t << " while (<F>) {\n";
+ t << " s/doxygen\\=\\\"([^ \\\"\\:\\t\\>\\<]*)\\:([^ \\\"\\t\\>\\<]*)\\\" (href|src)=\\\"\\2/doxygen\\=\\\"$1:$subst{$1}\\\" \\3=\\\"$subst{$1}/g;\n";
+ t << " print G \"$_\";\n";
+ t << " }\n";
+ t << " }\n";
+ t << " else {\n";
+ t << " while (<F>) {\n";
+ t << " s/\\\"([^ \\\"\\:\\t\\>\\<]*)\\:([^ \\\"\\t\\>\\<]*)\\\", \\\"\\2/\\\"$1:$subst{$1}\\\" ,\\\"$subst{$1}/g;\n";
+ t << " print G \"$_\";\n";
+ t << " }\n";
t << " }\n";
t << " } \n";
t << " else {\n";
diff --git a/src/pre.l b/src/pre.l
index 823e6e7..2c3c67b 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -93,6 +93,7 @@ static QCString g_lastGuardName;
static QCString g_incName;
static QCString g_guardExpr;
static int g_curlyCount;
+static bool g_nospaces; // add extra spaces during macro expansion
static void setFileName(const char *name)
{
@@ -494,6 +495,7 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
if (key.length()>1 && (subst=argTable[key]))
{
QCString substArg=*subst;
+ //printf("substArg=`%s'\n",substArg.data());
// only if no ## operator is before or after the argument
// marker we do macro expansion.
if (!hash) expandExpression(substArg,0,0);
@@ -507,7 +509,14 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
}
else
{
- resExpr+=" "+substArg+" ";
+ if (g_nospaces)
+ {
+ resExpr+=substArg;
+ }
+ else
+ {
+ resExpr+=" "+substArg+" ";
+ }
}
}
}
@@ -597,7 +606,15 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
{
// substitute the definition of the macro
//printf("macro `%s'->`%s'\n",macroName.data(),def->definition.data());
- expMacro=" "+def->definition.stripWhiteSpace()+" ";
+ if (g_nospaces)
+ {
+ expMacro=def->definition.stripWhiteSpace();
+ }
+ else
+ {
+ expMacro=" "+def->definition.stripWhiteSpace()+" ";
+ }
+ //expMacro=def->definition.stripWhiteSpace();
replaced=TRUE;
len=l;
//printf("simple macro expansion=`%s'->`%s'\n",macroName.data(),expMacro.data());
@@ -1086,6 +1103,7 @@ BN [ \t\r\n]
else // g_findDefArgContext==IncludeID
{
readIncludeFile(result);
+ g_nospaces=FALSE;
BEGIN(Start);
}
}
@@ -1339,12 +1357,14 @@ BN [ \t\r\n]
BEGIN(SkipCPPBlock);
}
<IncludeID>{ID}{B}*/"(" {
+ g_nospaces=TRUE;
g_roundCount=0;
g_defArgsStr=yytext;
g_findDefArgContext = IncludeID;
BEGIN(FindDefineArgs);
}
<IncludeID>{ID} {
+ g_nospaces=TRUE;
readIncludeFile(expandMacro(yytext));
BEGIN(Start);
}
@@ -1529,12 +1549,12 @@ BN [ \t\r\n]
int *n;
if ((n=(*g_argDict)[yytext]))
{
- if (!g_quoteArg) g_defText+=' ';
+ //if (!g_quoteArg) g_defText+=' ';
g_defText+='@';
QCString numStr;
numStr.sprintf("%d",*n);
g_defText+=numStr;
- if (!g_quoteArg) g_defText+=' ';
+ //if (!g_quoteArg) g_defText+=' ';
}
else
{
@@ -1768,6 +1788,7 @@ void preprocessFile(const char *fileName,BufStr &output)
//#endif
g_curlyCount=0;
+ g_nospaces=FALSE;
g_outputBuf=&output;
g_includeStack.setAutoDelete(TRUE);
g_includeStack.clear();
diff --git a/src/scanner.l b/src/scanner.l
index 3bee67e..eb5c5f6 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -693,6 +693,11 @@ TITLE [tT][iI][tT][lL][eE]
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
+ if (current->mtArgList) // transfer template arguments
+ {
+ current->tArgList = current->mtArgList;
+ current->mtArgList = 0;
+ }
lineCount() ;
BEGIN( CompoundName ) ;
}
@@ -749,9 +754,9 @@ TITLE [tT][iI][tT][lL][eE]
lineCount();
// class template specifier already found => member template specifier
// already inside class => member template specifier
- if (current->tArgList || (current_root->section&Entry::COMPOUND_MASK))
- {
- //printf("-------> member template\n");
+ //if (current->tArgList /*|| (current_root->section&Entry::COMPOUND_MASK)*/)
+ //{
+ // printf("-------> member template \n");
if (current->mtArgList)
{
current->mtArgList->clear();
@@ -762,26 +767,25 @@ TITLE [tT][iI][tT][lL][eE]
current->mtArgList->setAutoDelete(TRUE);
}
currentArgumentList = current->mtArgList;
- }
- else // class template specifier
- {
- //printf("-------> class template\n");
- if (current->tArgList)
- {
- current->tArgList->clear();
- }
- else
- {
- current->tArgList = new ArgumentList;
- current->tArgList->setAutoDelete(TRUE);
- }
- currentArgumentList = current->tArgList;
- }
+ //}
+ //else // class template specifier
+ //{
+ // printf("-------> class template\n");
+ // if (current->tArgList)
+ // {
+ // current->tArgList->clear();
+ // }
+ // else
+ // {
+ // current->tArgList = new ArgumentList;
+ // current->tArgList->setAutoDelete(TRUE);
+ // }
+ // currentArgumentList = current->tArgList;
+ //}
templateStr="<";
fullArgString = templateStr.copy();
copyArgString = &templateStr;
currentArgumentContext = FindMembers;
- //printf("Start template list\n");
BEGIN( ReadTempArgs );
}
<FindMembers>"namespace"{BN}+/{ID}{BN}*"=" { // namespace alias
@@ -793,7 +797,7 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN( NSAliasArg );
}
<NSAliasArg>({ID}"::")*{ID} {
- printf("Inserting namespace alias %s::%s->%s\n",current_root->name.data(),aliasName.data(),yytext);
+ //printf("Inserting namespace alias %s::%s->%s\n",current_root->name.data(),aliasName.data(),yytext);
if (current_root->name.isEmpty())
{
namespaceAliasDict.insert(aliasName,new QCString(yytext));
@@ -1616,6 +1620,7 @@ TITLE [tT][iI][tT][lL][eE]
lineCount();
addType(current);
funcPtrType=yytext;
+ roundCount=0;
//current->type += yytext;
BEGIN( FuncPtr );
}
@@ -1638,12 +1643,12 @@ TITLE [tT][iI][tT][lL][eE]
current->type+=funcPtrType.data()+1;
BEGIN(FindMembers);
}
-<EndFuncPtr>")"{BN}*/"(" { // a variable function
+<EndFuncPtr>")"{BN}*/"(" { // a function pointer
lineCount();
current->type+=funcPtrType+")";
BEGIN(FindMembers);
}
-<EndFuncPtr>")"{BN}*/"[" {
+<EndFuncPtr>")"{BN}*/"[" { // an array of variables
lineCount();
current->type+=funcPtrType.data();
current->args += ")";
@@ -1654,6 +1659,9 @@ TITLE [tT][iI][tT][lL][eE]
roundCount=0;
BEGIN( FuncFunc );
}
+<EndFuncPtr>"["[^\n\]]*"]" {
+ funcPtrType+=yytext;
+ }
<EndFuncPtr>")" {
BEGIN(FindMembers);
}
@@ -1790,7 +1798,7 @@ TITLE [tT][iI][tT][lL][eE]
<ReadTempArgs>"<" {
*copyArgString+=*yytext;
fullArgString+=*yytext;
- argSharpCount=0;
+ argSharpCount=1;
BEGIN( CopyArgSharp );
}
<ReadTempArgs>">" {
@@ -1815,16 +1823,23 @@ TITLE [tT][iI][tT][lL][eE]
}
<CopyArgSharp>"<" {
argSharpCount++;
+ //printf("argSharpCount++=%d copy\n",argSharpCount);
*copyArgString+=*yytext;
fullArgString+=*yytext;
}
<CopyArgSharp>">" {
*copyArgString+=*yytext;
fullArgString+=*yytext;
- if (argRoundCount>0)
- argRoundCount--;
+ argSharpCount--;
+ if (argSharpCount>0)
+ {
+ //printf("argSharpCount--=%d copy\n",argSharpCount);
+ }
else
+ {
BEGIN( ReadTempArgs );
+ //printf("end of argSharpCount\n");
+ }
}
<CopyArgString>\\. {
*copyArgString+=yytext;
@@ -2631,6 +2646,8 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN(ClassDocBrief);
}
<TodoParam>\n |
+<TodoParam>"//" |
+<TodoParam>"/*" |
<TodoParam>. {
if (current->todoId!=0)
{
@@ -2659,6 +2676,8 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN(todoStartContext);
}
<TestParam>\n |
+<TestParam>"//" |
+<TestParam>"/*" |
<TestParam>. {
if (current->testId!=0)
{
@@ -3008,7 +3027,7 @@ TITLE [tT][iI][tT][lL][eE]
<ExampleDoc,PageDoc,ClassDoc>. { current->doc += yytext; }
<Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>^{B}*"//"
<Doc,ExampleDoc,PageDoc,ClassDoc>"//" { current->doc += yytext; }
-<LineDoc,JavaDoc>"//" { current->brief += yytext; }
+<LineDoc,JavaDoc,ClassDocBrief>"//" { current->brief += yytext; }
<Doc,JavaDoc,LineDoc,ExampleDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>("\\\\"|"@@")"f"[$\[\]] {
current->doc += &yytext[1];
}
diff --git a/src/translator_cn.h b/src/translator_cn.h
index 9343695..dfe5a78 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -51,6 +51,13 @@ class TranslatorChinese : public Translator
{ return "成员函数文档"; }
QCString trMemberDataDocumentation()
{ return "成员数据文档"; }
+ QCString trGeneratedFrom(const char *s,bool single)
+ {
+ QCString result=(QCString)"De documentatie voor deze"+s+
+ " is gegenereerd op grond van de volgende file";
+ if (single) result+=":"; else result+="s:";
+ return result;
+ }
QCString trMore()
{ return "更多..."; }
QCString trListOfAllMembers()
@@ -495,17 +502,17 @@ class TranslatorChinese : public Translator
/*! Text for the \pre command */
QCString trPrecondition()
{
- return "前提条件";
+ return "前置条件";
}
/*! Text for the \post command */
QCString trPostcondition()
{
- return "Postcondition";
+ return "后置条件";
}
/*! Text for the \invariant command */
QCString trInvariant()
{
- return "Invariant";
+ return "不变性";
}
/*! Text shown before a multi-line variable/enum initialization */
QCString trInitialValue()
diff --git a/src/treeview.h b/src/treeview.h
index e74408a..213bc82 100644
--- a/src/treeview.h
+++ b/src/treeview.h
@@ -11,14 +11,17 @@
"// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS; \n"
"// make the ftien4 a js file \n"
"// \n"
+"// DvH: Dec 2000 - Made some minor changes to support external \n"
+"// references\n"
" \n"
"// Definition of class Folder \n"
"// ***************************************************************** \n"
" \n"
-"function Folder(folderDescription, hreference) //constructor \n"
+"function Folder(folderDescription, tagName, hreference) //constructor \n"
"{ \n"
" //constant data \n"
" this.desc = folderDescription \n"
+" this.tagName = tagName\n"
" this.hreference = hreference \n"
" this.id = -1 \n"
" this.navObj = 0 \n"
@@ -186,6 +189,10 @@
" } \n"
" else \n"
" doc.write(this.desc) \n"
+" if (this.tagName!=\"\")\n"
+" {\n"
+" doc.write(\" [external]\")\n"
+" }\n"
" doc.write(\"</td>\") \n"
" doc.write(\"\\n</table>\\n\") \n"
" \n"
@@ -209,7 +216,12 @@
"{ \n"
" if (this.hreference) \n"
" { \n"
-" doc.write(\"<a href='\" + this.hreference + \"' TARGET=\\\"basefrm\\\" \") \n"
+" doc.write(\"<a \")\n"
+" if (this.tagName)\n"
+" {\n"
+" doc.write(\"doxygen='\" + this.tagName + \"' \");\n"
+" }\n"
+" doc.write(\"href='\" + this.hreference + \"' TARGET=\\\"basefrm\\\" \") \n"
" if (browserVersion > 0) \n"
" doc.write(\"onClick='javascript:clickOnFolder(\"+this.id+\")'\") \n"
" doc.write(\">\") \n"
@@ -242,10 +254,11 @@
"// Definition of class Item (a document or link inside a Folder) \n"
"// ************************************************************* \n"
" \n"
-"function Item(itemDescription, itemLink) // Constructor \n"
+"function Item(itemDescription, tagName, itemLink) // Constructor \n"
"{ \n"
" // constant data \n"
" this.desc = itemDescription \n"
+" this.tagName = tagName\n"
" this.link = itemLink \n"
" this.id = -1 //initialized in initalize() \n"
" this.navObj = 0 //initialized in render() \n"
@@ -319,6 +332,10 @@
" doc.write(\"<a href=\" + this.link + \">\" + this.desc + \"</a>\") \n"
" else \n"
" doc.write(this.desc) \n"
+" if (this.tagName!=\"\")\n"
+" {\n"
+" doc.write(\" [external]\");\n"
+" }\n"
" doc.write(\"\\n</table>\\n\") \n"
" \n"
" if (browserVersion == 2) \n"
@@ -422,32 +439,22 @@
"// Auxiliary Functions for Folder-Treee backward compatibility \n"
"// ********************************************************* \n"
" \n"
-"function gFld(description, hreference) \n"
+"function gFld(description, tagName, hreference) \n"
"{ \n"
-" folder = new Folder(description, hreference) \n"
+" folder = new Folder(description, tagName, hreference) \n"
" return folder \n"
"} \n"
" \n"
-"function gLnk(target, description, linkData) \n"
+"function gLnk(description, tagName, linkData) \n"
"{ \n"
" fullLink = \"\" \n"
" \n"
" if (linkData!=\"\")\n"
" {\n"
-" if (target==0) \n"
-" { \n"
-" fullLink = \"'\"+linkData+\"' target=\\\"basefrm\\\"\" \n"
-" } \n"
-" else \n"
-" { \n"
-" if (target==1) \n"
-" fullLink = \"'http://\"+linkData+\"' target=_blank\" \n"
-" else \n"
-" fullLink = \"'http://\"+linkData+\"' target=\\\"basefrm\\\"\" \n"
-" }\n"
+" fullLink = \"'\"+linkData+\"' target=\\\"basefrm\\\"\" \n"
" } \n"
" \n"
-" linkItem = new Item(description, fullLink) \n"
+" linkItem = new Item(description, tagName, fullLink) \n"
" return linkItem \n"
"} \n"
" \n"
diff --git a/src/treeview.js b/src/treeview.js
index 8fd91b1..58ca384 100644
--- a/src/treeview.js
+++ b/src/treeview.js
@@ -11,14 +11,17 @@
// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS;
// make the ftien4 a js file
//
+// DvH: Dec 2000 - Made some minor changes to support external
+// references
// Definition of class Folder
// *****************************************************************
-function Folder(folderDescription, hreference) //constructor
+function Folder(folderDescription, tagName, hreference) //constructor
{
//constant data
this.desc = folderDescription
+ this.tagName = tagName
this.hreference = hreference
this.id = -1
this.navObj = 0
@@ -186,6 +189,10 @@ function drawFolder(leftSide)
}
else
doc.write(this.desc)
+ if (this.tagName!="")
+ {
+ doc.write(" [external]")
+ }
doc.write("</td>")
doc.write("\n</table>\n")
@@ -209,7 +216,12 @@ function outputFolderLink()
{
if (this.hreference)
{
- doc.write("<a href='" + this.hreference + "' TARGET=\"basefrm\" ")
+ doc.write("<a ")
+ if (this.tagName)
+ {
+ doc.write("doxygen='" + this.tagName + "' ");
+ }
+ doc.write("href='" + this.hreference + "' TARGET=\"basefrm\" ")
if (browserVersion > 0)
doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
doc.write(">")
@@ -242,10 +254,11 @@ function folderSubEntries()
// Definition of class Item (a document or link inside a Folder)
// *************************************************************
-function Item(itemDescription, itemLink) // Constructor
+function Item(itemDescription, tagName, itemLink) // Constructor
{
// constant data
this.desc = itemDescription
+ this.tagName = tagName
this.link = itemLink
this.id = -1 //initialized in initalize()
this.navObj = 0 //initialized in render()
@@ -319,6 +332,10 @@ function drawItem(leftSide)
doc.write("<a href=" + this.link + ">" + this.desc + "</a>")
else
doc.write(this.desc)
+ if (this.tagName!="")
+ {
+ doc.write(" [external]");
+ }
doc.write("\n</table>\n")
if (browserVersion == 2)
@@ -422,32 +439,22 @@ function initializeDocument()
// Auxiliary Functions for Folder-Treee backward compatibility
// *********************************************************
-function gFld(description, hreference)
+function gFld(description, tagName, hreference)
{
- folder = new Folder(description, hreference)
+ folder = new Folder(description, tagName, hreference)
return folder
}
-function gLnk(target, description, linkData)
+function gLnk(description, tagName, linkData)
{
fullLink = ""
if (linkData!="")
{
- if (target==0)
- {
- fullLink = "'"+linkData+"' target=\"basefrm\""
- }
- else
- {
- if (target==1)
- fullLink = "'http://"+linkData+"' target=_blank"
- else
- fullLink = "'http://"+linkData+"' target=\"basefrm\""
- }
+ fullLink = "'"+linkData+"' target=\"basefrm\""
}
- linkItem = new Item(description, fullLink)
+ linkItem = new Item(description, tagName, fullLink)
return linkItem
}