Commit 3aaaf142 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.3.8-20040824

parent edeb82c1
DOXYGEN Version 1.3.8-20040812 DOXYGEN Version 1.3.8-20040824
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (12 August 2004) Dimitri van Heesch (24 August 2004)
DOXYGEN Version 1.3.8_20040812 DOXYGEN Version 1.3.8_20040824
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (12 August 2004) Dimitri van Heesch (dimitri@stack.nl) (24 August 2004)
1.3.8-20040812 1.3.8-20040824
...@@ -1370,6 +1370,15 @@ int main(int argc,char **argv) ...@@ -1370,6 +1370,15 @@ int main(int argc,char **argv)
{ {
QApplication a(argc,argv); QApplication a(argc,argv);
MainWidget main; MainWidget main;
if (argc==2 && argv[1][0]!='-') // name of config file as an argument
{
main.loadConfigFromFile(argv[1]);
}
else if (argc>1)
{
printf("Usage: %s [config file]\n",argv[0]);
exit(1);
}
a.setMainWidget(&main); a.setMainWidget(&main);
main.show(); main.show();
return a.exec(); return a.exec();
......
...@@ -242,6 +242,7 @@ class MainWidget : public QMainWindow ...@@ -242,6 +242,7 @@ class MainWidget : public QMainWindow
public: public:
MainWidget(QWidget *parent=0); MainWidget(QWidget *parent=0);
~MainWidget(); ~MainWidget();
void loadConfigFromFile(const QString &);
private slots: private slots:
void launchWizard(); void launchWizard();
...@@ -263,7 +264,6 @@ class MainWidget : public QMainWindow ...@@ -263,7 +264,6 @@ class MainWidget : public QMainWindow
private: private:
void setConfigSaved(bool); void setConfigSaved(bool);
void loadConfigFromFile(const QString &);
void addRecentFile(const QString &); void addRecentFile(const QString &);
QPushButton *m_wizard; QPushButton *m_wizard;
......
...@@ -234,27 +234,35 @@ if test "$f_wizard" = YES; then ...@@ -234,27 +234,35 @@ if test "$f_wizard" = YES; then
if test -z "$QTDIR"; then if test -z "$QTDIR"; then
echo " QTDIR environment variable not set!" echo " QTDIR environment variable not set!"
echo -n " Checking for Qt..." echo -n " Checking for Qt..."
if test -d "/usr/lib/qt3/lib"; then for d in /usr/lib/{qt-3.1,qt3,qt2,qt,qt*}; do
if test -d "/usr/lib/qt3/include"; then if test -d "$d/lib" -a -d "$d/include" -a -x "$d/bin/moc"; then
if test -x "/usr/lib/qt3/bin/moc"; then QTDIR=$d
QTDIR="/usr/lib/qt3"
fi
fi
fi
if test -d "/usr/lib/qt2/lib"; then
if test -d "/usr/lib/qt2/include"; then
if test -x "/usr/lib/qt2/bin/moc"; then
QTDIR="/usr/lib/qt2"
fi
fi
fi
if test -d "/usr/lib/qt/lib"; then
if test -d "/usr/lib/qt/include"; then
if test -x "/usr/lib/qt/bin/moc"; then
QTDIR="/usr/lib/qt"
fi
fi fi
fi done
# if test -d "/usr/lib/qt3/lib"; then
# if test -d "/usr/lib/qt3/include"; then
# if test -x "/usr/lib/qt3/bin/moc"; then
# QTDIR="/usr/lib/qt3"
# fi
# fi
# fi
# if test -d "/usr/lib/qt2/lib"; then
# if test -d "/usr/lib/qt2/include"; then
# if test -x "/usr/lib/qt2/bin/moc"; then
# QTDIR="/usr/lib/qt2"
# fi
# fi
# fi
# if test -d "/usr/lib/qt/lib"; then
# if test -d "/usr/lib/qt/include"; then
# if test -x "/usr/lib/qt/bin/moc"; then
# QTDIR="/usr/lib/qt"
# fi
# fi
# fi
else
echo " Detected Qt via the QTDIR environment variable..."
echo -n " "
fi fi
if test -z "$QTDIR"; then if test -z "$QTDIR"; then
echo "QTDIR not set and Qt not found at standard locations!" echo "QTDIR not set and Qt not found at standard locations!"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
All commands in the documentation start with a backslash (<b>\\</b>) or an All commands in the documentation start with a backslash (<b>\\</b>) or an
at-sign (<b>\@</b>). If you prefer you can replace all commands starting with a at-sign (<b>\@</b>). If you prefer you can replace all commands starting with a
backslash below, by their counterparts that start with an at-sign. backslash below by their counterparts that start with an at-sign.
Some commands have one or more arguments. Some commands have one or more arguments.
Each argument has a certain range: Each argument has a certain range:
...@@ -350,6 +350,9 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -350,6 +350,9 @@ doxygen. Unrecognized commands are treated as normal text.
for the corresponding HTML documentation that is generated by doxygen. for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly \endhtmlonly
\note In the above example \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF"
has been set to YES in the configuration file.
<hr> <hr>
\section cmdfn \fn (function declaration) \section cmdfn \fn (function declaration)
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3.8_20040812 Version: 1.3.8_20040824
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -1995,6 +1995,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -1995,6 +1995,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
addType(); addType();
g_name+=yytext; g_name+=yytext;
} }
<Body>{SCOPENAME}/{B}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
generateClassOrGlobalLink(*g_code,yytext,TRUE);
addType();
g_name+=yytext;
}
<Body>{SCOPENAME}/{B}* { // p->func() <Body>{SCOPENAME}/{B}* { // p->func()
generateClassOrGlobalLink(*g_code,yytext); generateClassOrGlobalLink(*g_code,yytext);
addType(); addType();
......
...@@ -48,7 +48,7 @@ class Definition ...@@ -48,7 +48,7 @@ class Definition
enum DefType enum DefType
{ {
TypeClass, TypeMember, TypeFile, TypeGroup, TypeClass, TypeMember, TypeFile, TypeGroup,
TypeNamespace, TypePackage, TypePage TypeNamespace, TypePackage, TypePage, TypeDir
}; };
/*! Use this for dynamic inspection of the type of the derived class */ /*! Use this for dynamic inspection of the type of the derived class */
virtual DefType definitionType() = 0; virtual DefType definitionType() = 0;
......
#include "dirdef.h"
#include "filename.h"
#include "doxygen.h"
#include "util.h"
//----------------------------------------------------------------------
// method implementation
DirDef::DirDef(const char *path) : Definition(path,1,path),
m_parent(0)
{
// get short name (stipping the paths mentioned in STRIP_FROM_PATH)
m_dispName = stripFromPath(path);
m_subdirs.setAutoDelete(TRUE);
m_fileList = new FileList;
m_classSDict = new ClassSDict(17);
}
DirDef::~DirDef()
{
}
void DirDef::addSubDir(DirDef *subdir)
{
m_subdirs.append(subdir);
subdir->m_parent=this;
}
void DirDef::addFile(FileDef *fd)
{
m_fileList->append(fd);
fd->setDirDef(this);
}
//----------------------------------------------------------------------
// helper functions
DirDef *DirDef::createNewDir(const char *path)
{
ASSERT(path!=0);
DirDef *dir = Doxygen::directories.find(path);
if (dir==0) // new dir
{
//printf("Adding new dir %s\n",path);
dir = new DirDef(path);
Doxygen::directories.inSort(path,dir);
}
return dir;
}
bool DirDef::matchPath(const QCString &path,QStrList &l)
{
const char *s=l.first();
while (s)
{
QCString prefix = s;
if (stricmp(prefix.left(path.length()),path)==0) // case insensitive compare
{
return TRUE;
}
s = l.next();
}
return FALSE;
}
/*! strip part of \a path if it matches
* one of the paths in the Config_getList("STRIP_FROM_PATH") list
*/
DirDef *DirDef::mergeDirectoryInTree(const QCString &path)
{
int p=0,i=0;
DirDef *dir=0;
while ((i=path.find('/',p))!=-1)
{
QCString part=path.left(i+1);
if (!matchPath(part,Config_getList("STRIP_FROM_PATH")))
{
dir=createNewDir(part);
}
p=i+1;
}
return dir;
}
//----------------------------------------------------------------------
// external functions
void buildDirectories()
{
// for each input file
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
for (fnli.toFirst();(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
if (!fd->getReference().isEmpty())
{
DirDef *dir;
if ((dir=Doxygen::directories.find(fd->getPath()))==0) // new directory
{
dir = DirDef::mergeDirectoryInTree(fd->getPath());
}
if (dir) dir->addFile(fd);
}
else
{
// do something for file imported via tag files.
}
}
}
DirDef *root = new DirDef("root:");
// compute relations between directories => introduce container dirs.
DirDef *dir;
SDict<DirDef>::Iterator sdi(Doxygen::directories);
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
printf("New dir %s\n",dir->displayName().data());
QCString name = dir->name();
int i=name.findRev('/',name.length()-2);
if (i!=-1)
{
DirDef *parent = Doxygen::directories.find(name.left(i+1));
if (parent==0) parent=root;
parent->addSubDir(dir);
printf("DirDef::addSubdir(): Adding subdir\n%s to\n%s\n",
dir->displayName().data(), parent->displayName().data());
}
}
}
/******************************************************************************
*
*
*
* Copyright (C) 1997-2004 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef DIRDEF_H
#define DIRDEF_H
#include "qtbc.h"
#include "sortdict.h"
#include "definition.h"
class FileList;
class ClassSDict;
class QStrList;
class FileDef;
class DirDef : public Definition
{
public:
DirDef(const char *path);
virtual ~DirDef();
virtual DefType definitionType() { return TypeDir; }
virtual QCString getOutputFileBase() const { return ""; }
virtual bool isLinkableInProject() const { return FALSE; }
virtual bool isLinkable() const { return FALSE; }
QCString displayName() const { return m_dispName; }
void addSubDir(DirDef *subdir);
FileList * getFiles() const { return m_fileList; }
ClassSDict * getClasses() const { return m_classSDict; }
DirDef *parent() const { return m_parent; }
void addFile(FileDef *fd);
static DirDef *mergeDirectoryInTree(const QCString &path);
private:
static DirDef *createNewDir(const char *path);
static bool matchPath(const QCString &path,QStrList &l);
QList<DirDef> m_subdirs;
DirDef *m_parent;
QCString m_dispName;
FileList *m_fileList; // list of files in the group
ClassSDict *m_classSDict; // list of classes in the group
};
void buildDirectories();
#endif
...@@ -747,6 +747,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ...@@ -747,6 +747,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
MemberDef *member=0; MemberDef *member=0;
QString name = linkToText(g_token->name,TRUE); QString name = linkToText(g_token->name,TRUE);
int len = g_token->name.length(); int len = g_token->name.length();
ClassDef *cd=0;
if (!g_insideHtmlLink && if (!g_insideHtmlLink &&
resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member)) resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member))
{ {
...@@ -784,6 +785,16 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ...@@ -784,6 +785,16 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
handleLinkedWord(parent,children); handleLinkedWord(parent,children);
children.append(new DocWord(parent,":")); children.append(new DocWord(parent,":"));
} }
else if (!g_insideHtmlLink && (cd=getClass(g_token->name+"-p")))
{
// special case 2, where the token name is not a class, but could
// be a Obj-C protocol
children.append(new
DocLinkedWord(parent,name,
cd->getReference(),
cd->getOutputFileBase(),
""));
}
else // normal non-linkable word else // normal non-linkable word
{ {
children.append(new DocWord(parent,g_token->name)); children.append(new DocWord(parent,g_token->name));
...@@ -4383,15 +4394,25 @@ reparsetoken: ...@@ -4383,15 +4394,25 @@ reparsetoken:
goto endparagraph; goto endparagraph;
} }
} }
// determine list depth
int depth = 0;
n=parent();
while(n) {
if(n->kind() == DocNode::Kind_AutoList) ++depth;
n=n->parent();
}
// first item or sub list => create new list // first item or sub list => create new list
DocAutoList *al=0; DocAutoList *al=0;
do do
{ {
al = new DocAutoList(this,g_token->indent,g_token->isEnumList); al = new DocAutoList(this,g_token->indent,g_token->isEnumList,
depth);
m_children.append(al); m_children.append(al);
retval = al->parse(); retval = al->parse();
} while (retval==TK_LISTITEM && // new list } while (retval==TK_LISTITEM && // new list
al->indent()==g_token->indent // at some indent level al->indent()==g_token->indent // at same indent level
); );
// check the return value // check the return value
......
...@@ -507,12 +507,15 @@ class DocCopy : public CompAccept<DocCopy>, public DocNode ...@@ -507,12 +507,15 @@ class DocCopy : public CompAccept<DocCopy>, public DocNode
class DocAutoList : public CompAccept<DocAutoList>, public DocNode class DocAutoList : public CompAccept<DocAutoList>, public DocNode
{ {
public: public:
DocAutoList(DocNode *parent,int indent,bool isEnumList) : DocAutoList(DocNode *parent,int indent,bool isEnumList,
m_parent(parent), m_indent(indent), m_isEnumList(isEnumList) {} int depth) :
m_parent(parent), m_indent(indent), m_isEnumList(isEnumList),
m_depth(depth) {}
Kind kind() const { return Kind_AutoList; } Kind kind() const { return Kind_AutoList; }
bool isEnumList() const { return m_isEnumList; } bool isEnumList() const { return m_isEnumList; }
int indent() const { return m_indent; } int indent() const { return m_indent; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
int depth() const { return m_depth; }
void accept(DocVisitor *v) { CompAccept<DocAutoList>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocAutoList>::accept(this,v); }
int parse(); int parse();
...@@ -520,6 +523,7 @@ class DocAutoList : public CompAccept<DocAutoList>, public DocNode ...@@ -520,6 +523,7 @@ class DocAutoList : public CompAccept<DocAutoList>, public DocNode
DocNode *m_parent; DocNode *m_parent;
int m_indent; int m_indent;
bool m_isEnumList; bool m_isEnumList;
int m_depth;
}; };
......
...@@ -962,7 +962,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -962,7 +962,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
QDir thisDir; QDir thisDir;
// put each connected subgraph of the hierarchy in a row of the HTML output // put each connected subgraph of the hierarchy in a row of the HTML output
out << "<table border=0 cellspacing=10 cellpadding=0>" << endl; out << "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\">" << endl;
QListIterator<DotNode> dnli(*m_rootSubgraphs); QListIterator<DotNode> dnli(*m_rootSubgraphs);
DotNode *n; DotNode *n;
...@@ -2105,11 +2105,21 @@ DotCallGraph::DotCallGraph(MemberDef *md,int maxRecursionDepth) ...@@ -2105,11 +2105,21 @@ DotCallGraph::DotCallGraph(MemberDef *md,int maxRecursionDepth)
m_maxDistance = 0; m_maxDistance = 0;
m_recDepth = maxRecursionDepth; m_recDepth = maxRecursionDepth;
m_diskName = md->getOutputFileBase()+"_"+md->anchor(); m_diskName = md->getOutputFileBase()+"_"+md->anchor();
m_scope = md->getOuterScope();
QCString uniqueId; QCString uniqueId;
uniqueId = md->getReference()+"$"+ uniqueId = md->getReference()+"$"+
md->getOutputFileBase()+"#"+md->anchor(); md->getOutputFileBase()+"#"+md->anchor();
QCString name;
if (Config_getBool("HIDE_SCOPE_NAMES"))
{
name = md->name();
}
else
{
name = md->qualifiedName();
}
m_startNode = new DotNode(m_curNodeNumber++, m_startNode = new DotNode(m_curNodeNumber++,
md->qualifiedName(), linkToText(name,FALSE),
uniqueId.data(), uniqueId.data(),
0, // distance 0, // distance
TRUE // root node TRUE // root node
...@@ -2280,9 +2290,19 @@ void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance) ...@@ -2280,9 +2290,19 @@ void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance)
} }
else else
{ {
QCString name;
if (Config_getBool("HIDE_SCOPE_NAMES"))
{
name = rmd->getOuterScope()==m_scope ?
rmd->name() : rmd->qualifiedName();
}
else
{
name = rmd->qualifiedName();
}
bn = new DotNode( bn = new DotNode(
m_curNodeNumber++, m_curNodeNumber++,
rmd->qualifiedName(), linkToText(name,FALSE),
uniqueId, uniqueId,
distance distance
); );
......
...@@ -30,6 +30,7 @@ class QTextStream; ...@@ -30,6 +30,7 @@ class QTextStream;
class DotNodeList; class DotNodeList;
class ClassSDict; class ClassSDict;
class MemberDef; class MemberDef;
class Definition;
enum GraphOutputFormat { BITMAP , EPS }; enum GraphOutputFormat { BITMAP , EPS };
...@@ -197,6 +198,7 @@ class DotCallGraph ...@@ -197,6 +198,7 @@ class DotCallGraph
int m_maxDistance; int m_maxDistance;
int m_recDepth; int m_recDepth;
QCString m_diskName; QCString m_diskName;
Definition * m_scope;
}; };
void generateGraphLegend(const char *path); void generateGraphLegend(const char *path);
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "tagreader.h" #include "tagreader.h"
#include "dot.h" #include "dot.h"
#include "docparser.h" #include "docparser.h"
#include "dirdef.h"
#include "outputlist.h" #include "outputlist.h"
#include "declinfo.h" #include "declinfo.h"
...@@ -120,6 +121,7 @@ SDict<DefinitionList> *Doxygen::symbolMap; ...@@ -120,6 +121,7 @@ SDict<DefinitionList> *Doxygen::symbolMap;
bool Doxygen::outputToWizard=FALSE; bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0; QDict<int> * Doxygen::htmlDirMap = 0;
QCache<LookupInfo> Doxygen::lookupCache(20000,20000); QCache<LookupInfo> Doxygen::lookupCache(20000,20000);
SDict<DirDef> Doxygen::directories(17);
static StringList inputFiles; static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections static StringDict excludeNameDict(1009); // sections
...@@ -2731,7 +2733,8 @@ static void transferFunctionDocumentation() ...@@ -2731,7 +2733,8 @@ static void transferFunctionDocumentation()
mdef->getGroupPri(), mdef->getGroupPri(),
mdef->docFile(), mdef->docFile(),
mdef->docLine(), mdef->docLine(),
mdef->hasDocumentation() mdef->hasDocumentation(),
mdef
); );
} }
else if (mdef->getGroupDef()==0 && mdec->getGroupDef()!=0) else if (mdef->getGroupDef()==0 && mdec->getGroupDef()!=0)
...@@ -2740,7 +2743,8 @@ static void transferFunctionDocumentation() ...@@ -2740,7 +2743,8 @@ static void transferFunctionDocumentation()
mdec->getGroupPri(), mdec->getGroupPri(),
mdec->docFile(), mdec->docFile(),
mdec->docLine(), mdec->docLine(),
mdec->hasDocumentation() mdec->hasDocumentation(),
mdec
); );
} }
...@@ -6683,13 +6687,14 @@ static void buildExampleList(Entry *root) ...@@ -6683,13 +6687,14 @@ static void buildExampleList(Entry *root)
else else
{ {
PageDef *pd=new PageDef(root->fileName,root->startLine, PageDef *pd=new PageDef(root->fileName,root->startLine,
root->name,root->doc,root->args); root->name,root->doc,root->args);
pd->setFileName(convertNameToFile(pd->name()+"-example")); pd->setFileName(convertNameToFile(pd->name()+"-example"));
pd->addSectionsToDefinition(root->anchors); pd->addSectionsToDefinition(root->anchors);
//pi->addSections(root->anchors); //pi->addSections(root->anchors);
Doxygen::exampleSDict->inSort(root->name,pd); Doxygen::exampleSDict->inSort(root->name,pd);
addExampleToGroups(root,pd); //we don't add example to groups
//addExampleToGroups(root,pd);
} }
} }
} }
...@@ -8252,6 +8257,9 @@ void parseInput() ...@@ -8252,6 +8257,9 @@ void parseInput()
msg("Freeing input...\n"); msg("Freeing input...\n");
input.resize(0); input.resize(0);
//msg("Building directory list...\n");
//buildDirectories();
msg("Building group list...\n"); msg("Building group list...\n");
buildGroupList(root); buildGroupList(root);
organizeSubGroups(root); organizeSubGroups(root);
......
...@@ -40,6 +40,7 @@ class PageSList; ...@@ -40,6 +40,7 @@ class PageSList;
class PageSDict; class PageSDict;
class PageDef; class PageDef;
class SearchIndex; class SearchIndex;
class DirDef;
typedef QList<QCString> StringList; typedef QList<QCString> StringList;
typedef QDict<FileDef> FileDict; typedef QDict<FileDef> FileDict;
...@@ -112,6 +113,7 @@ class Doxygen ...@@ -112,6 +113,7 @@ class Doxygen
static bool outputToWizard; static bool outputToWizard;
static QDict<int> *htmlDirMap; static QDict<int> *htmlDirMap;
static QCache<LookupInfo> lookupCache; static QCache<LookupInfo> lookupCache;
static SDict<DirDef> directories;
}; };
void initDoxygen(); void initDoxygen();
......
...@@ -904,6 +904,7 @@ static void mergeFileDef(Directory *root,FileDef *fd) ...@@ -904,6 +904,7 @@ static void mergeFileDef(Directory *root,FileDef *fd)
dirNode->addChild(e); dirNode->addChild(e);
} }
#if 0
static void generateIndent(QTextStream &t,DirEntry *de,int level) static void generateIndent(QTextStream &t,DirEntry *de,int level)
{ {
if (de->parent()) if (de->parent())
...@@ -949,7 +950,6 @@ static void generateIndent(QTextStream &t,DirEntry *de,int level) ...@@ -949,7 +950,6 @@ static void generateIndent(QTextStream &t,DirEntry *de,int level)
} }
} }
#if 0
static void writeDirTreeNode(QTextStream &t,Directory *root,int level) static void writeDirTreeNode(QTextStream &t,Directory *root,int level)
{ {
QCString indent; QCString indent;
...@@ -989,16 +989,17 @@ static void addDirsAsGroups(Directory *root,GroupDef *parent,int level) ...@@ -989,16 +989,17 @@ static void addDirsAsGroups(Directory *root,GroupDef *parent,int level)
{ {
gd = new GroupDef("<generated>", gd = new GroupDef("<generated>",
1, 1,
root->name(), // name root->path(), // name
root->name() // title root->name() // title
); );
if (parent) if (parent)
{ {
parent->addGroup(gd); parent->addGroup(gd);
gd->makePartOfGroup(parent);
} }
else else
{ {
Doxygen::groupSDict.append(root->name(),gd); Doxygen::groupSDict.append(root->path(),gd);
} }
} }
QListIterator<DirEntry> dli(root->children()); QListIterator<DirEntry> dli(root->children());
......
...@@ -38,6 +38,7 @@ class NamespaceDef; ...@@ -38,6 +38,7 @@ class NamespaceDef;
class NamespaceSDict; class NamespaceSDict;
class MemberGroupSDict; class MemberGroupSDict;
class PackageDef; class PackageDef;
class DirDef;
struct IncludeInfo struct IncludeInfo
{ {
...@@ -133,6 +134,9 @@ class FileDef : public Definition ...@@ -133,6 +134,9 @@ class FileDef : public Definition
void setPackageDef(PackageDef *pd) { package=pd; } void setPackageDef(PackageDef *pd) { package=pd; }
PackageDef *packageDef() const { return package; } PackageDef *packageDef() const { return package; }
void setDirDef(DirDef *dd) { dir=dd; }
DirDef *getDirDef() const { return dir; }
void addUsingDirective(NamespaceDef *nd); void addUsingDirective(NamespaceDef *nd);
NamespaceSDict *getUsedNamespaces() const { return usingDirList; } NamespaceSDict *getUsedNamespaces() const { return usingDirList; }
void addUsingDeclaration(Definition *def); void addUsingDeclaration(Definition *def);
...@@ -201,8 +205,8 @@ class FileDef : public Definition ...@@ -201,8 +205,8 @@ class FileDef : public Definition
QIntDict<MemberDef> *srcMemberDict; QIntDict<MemberDef> *srcMemberDict;
bool isSource; bool isSource;
PackageDef *package; PackageDef *package;
DirDef *dir;
}; };
...@@ -250,18 +254,23 @@ class DirEntry ...@@ -250,18 +254,23 @@ class DirEntry
public: public:
enum EntryKind { Dir, File }; enum EntryKind { Dir, File };
DirEntry(DirEntry *parent,FileDef *fd) DirEntry(DirEntry *parent,FileDef *fd)
: m_parent(parent), m_kind(File), m_fd(fd), m_isLast(FALSE) { } : m_parent(parent), m_name(fd->name()), m_kind(File), m_fd(fd),
DirEntry(DirEntry *parent) m_isLast(FALSE) { }
: m_parent(parent), m_kind(Dir), m_fd(0), m_isLast(FALSE) { } DirEntry(DirEntry *parent,QCString name)
: m_parent(parent), m_name(name), m_kind(Dir),
m_fd(0), m_isLast(FALSE) { }
virtual ~DirEntry() { } virtual ~DirEntry() { }
EntryKind kind() const { return m_kind; } EntryKind kind() const { return m_kind; }
FileDef *file() const { return m_fd; } FileDef *file() const { return m_fd; }
bool isLast() const { return m_isLast; } bool isLast() const { return m_isLast; }
void setLast(bool b) { m_isLast=b; } void setLast(bool b) { m_isLast=b; }
DirEntry *parent() const { return m_parent; } DirEntry *parent() const { return m_parent; }
QCString name() const { return m_name; }
QCString path() const { return parent() ? parent()->path()+"/"+name() : name(); }
protected: protected:
DirEntry *m_parent; DirEntry *m_parent;
QCString m_name;
private: private:
EntryKind m_kind; EntryKind m_kind;
FileDef *m_fd; FileDef *m_fd;
...@@ -273,17 +282,15 @@ class Directory : public DirEntry ...@@ -273,17 +282,15 @@ class Directory : public DirEntry
{ {
public: public:
Directory(Directory *parent,const QCString &name) Directory(Directory *parent,const QCString &name)
: DirEntry(parent), m_name(name) : DirEntry(parent,name)
{ m_children.setAutoDelete(TRUE); } { m_children.setAutoDelete(TRUE); }
virtual ~Directory() {} virtual ~Directory() {}
void addChild(DirEntry *d) { m_children.append(d); d->setLast(TRUE); } void addChild(DirEntry *d) { m_children.append(d); d->setLast(TRUE); }
QList<DirEntry> &children() { return m_children; } QList<DirEntry> &children() { return m_children; }
void rename(const QCString &name) { m_name=name; } void rename(const QCString &name) { m_name=name; }
void reParent(Directory *parent) { m_parent=parent; } void reParent(Directory *parent) { m_parent=parent; }
QCString name() const { return m_name; }
private: private:
QCString m_name;
QList<DirEntry> m_children; QList<DirEntry> m_children;
}; };
......
...@@ -828,7 +828,8 @@ void addMemberToGroups(Entry *root,MemberDef *md) ...@@ -828,7 +828,8 @@ void addMemberToGroups(Entry *root,MemberDef *md)
if (success) if (success)
{ {
//printf("insertMember successful\n"); //printf("insertMember successful\n");
md->setGroupDef(fgd,pri,root->fileName,root->startLine,!root->doc.isEmpty()); md->setGroupDef(fgd,pri,root->fileName,root->startLine,
!root->doc.isEmpty());
ClassDef *cd = md->getClassDefOfAnonymousType(); ClassDef *cd = md->getClassDefOfAnonymousType();
if (cd) cd->setGroupDefForAllMembers(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0); if (cd) cd->setGroupDefForAllMembers(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
} }
......
...@@ -119,8 +119,7 @@ class GroupDef : public Definition ...@@ -119,8 +119,7 @@ class GroupDef : public Definition
FileList *fileList; // list of files in the group FileList *fileList; // list of files in the group
ClassSDict *classSDict; // list of classes in the group ClassSDict *classSDict; // list of classes in the group
NamespaceList *namespaceList; // list of namespaces in the group NamespaceList *namespaceList; // list of namespaces in the group
GroupList *groupList; // list of sub groups. GroupList *groupList; // list of sub groups.
//GroupList *parentGroupList; // list of parent groups.
PageSDict *pageDict; // list of pages in the group PageSDict *pageDict; // list of pages in the group
PageSDict *exampleDict; // list of examples in the group PageSDict *exampleDict; // list of examples in the group
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
#include "htmlgen.h" #include "htmlgen.h"
static const int NUM_HTML_LIST_TYPES = 4;
static const char types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"};
static QString htmlAttribsToString(const HtmlAttribList &attribs) static QString htmlAttribsToString(const HtmlAttribList &attribs)
{ {
QString result; QString result;
...@@ -327,12 +331,21 @@ void HtmlDocVisitor::visit(DocIndexEntry *) ...@@ -327,12 +331,21 @@ void HtmlDocVisitor::visit(DocIndexEntry *)
// visitor functions for compound nodes // visitor functions for compound nodes
//-------------------------------------- //--------------------------------------
void HtmlDocVisitor::visitPre(DocAutoList *l) void HtmlDocVisitor::visitPre(DocAutoList *l)
{ {
if (m_hide) return; if (m_hide) return;
if (l->isEnumList()) if (l->isEnumList())
{ {
m_t << "<ol>"; //
// Do list type based on depth:
// 1.
// a.
// i.
// A.
// 1. (repeat)...
//
m_t << "<ol type=" << types[l->depth() % NUM_HTML_LIST_TYPES] << ">";
} }
else else
{ {
......
...@@ -52,42 +52,37 @@ static const char *defaultStyleSheet = ...@@ -52,42 +52,37 @@ static const char *defaultStyleSheet =
"DIV.qindex {\n" "DIV.qindex {\n"
" width: 100%;\n" " width: 100%;\n"
" background-color: #eeeeff;\n" " background-color: #eeeeff;\n"
" border: 1px solid #B0B0B0;\n" " border: 1px solid #b0b0b0;\n"
" text-align: center;\n" " text-align: center;\n"
" margin: 2px;\n" " margin: 2px;\n"
" padding: 2px;\n" " padding: 2px;\n"
" line-height: 120%;\n" " line-height: 140%;\n"
"}\n" "}\n"
"A.qindex {\n" "A.qindex {\n"
" text-decoration: none;\n" " text-decoration: none;\n"
" font-weight: bold;\n" " font-weight: bold;\n"
" color: #1A419D;\n" " color: #1A419D;\n"
" padding: 2px;\n"
"}\n" "}\n"
"A.qindex:visited {\n" "A.qindex:visited {\n"
" text-decoration: none;\n" " text-decoration: none;\n"
" font-weight: bold;\n" " font-weight: bold;\n"
" color: #1A419D\n" " color: #1A419D\n"
" padding: 2px;\n"
"}\n" "}\n"
"A.qindex:hover {\n" "A.qindex:hover {\n"
" text-decoration: none;\n" " text-decoration: none;\n"
" background-color: #ddddff;\n" " background-color: #ddddff;\n"
" padding: 2px;\n"
"}\n" "}\n"
"A.qindexHL {\n" "A.qindexHL {\n"
" text-decoration: none;\n" " text-decoration: none;\n"
" font-weight: bold;\n" " font-weight: bold;\n"
" background-color: #6666cc;\n" " background-color: #6666cc;\n"
" color: #ffffff;\n" " color: #ffffff;\n"
" padding: 2px 6px;\n"
" border: 1px double #9295C2;\n" " border: 1px double #9295C2;\n"
"}\n" "}\n"
"A.qindexHL:hover {\n" "A.qindexHL:hover {\n"
" text-decoration: none;\n" " text-decoration: none;\n"
" background-color: #6666cc;\n" " background-color: #6666cc;\n"
" color: #ffffff;\n" " color: #ffffff;\n"
" padding: 2px 6px;\n"
"}\n" "}\n"
"A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }\n" "A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }\n"
"A.el { text-decoration: none; font-weight: bold }\n" "A.el { text-decoration: none; font-weight: bold }\n"
...@@ -359,9 +354,9 @@ void HtmlGenerator::writeFooterFile(QFile &file) ...@@ -359,9 +354,9 @@ void HtmlGenerator::writeFooterFile(QFile &file)
QTextStream t(&file); QTextStream t(&file);
t << "<hr size=\"1\"><address style=\"align: right;\"><small>\n"; t << "<hr size=\"1\"><address style=\"align: right;\"><small>\n";
t << theTranslator->trGeneratedAt( "$datetime", "$projectname" ); t << theTranslator->trGeneratedAt( "$datetime", "$projectname" );
t << " <a href=\"http://www.doxygen.org/index.html\">" t << "&nbsp;<a href=\"http://www.doxygen.org/index.html\">"
<< "<img src=\"doxygen.png\" alt=\"doxygen\" " << "<img src=\"doxygen.png\" alt=\"doxygen\" "
<< "align=\"middle\" border=0>" << "align=\"middle\" border=\"0\">"
<< "</a> $doxygenversion"; << "</a> $doxygenversion";
t << "</small></address>\n" t << "</small></address>\n"
<< "</body>\n" << "</body>\n"
...@@ -446,9 +441,9 @@ static void writePageFooter(QTextStream &t,const QCString &lastTitle, ...@@ -446,9 +441,9 @@ static void writePageFooter(QTextStream &t,const QCString &lastTitle,
dateToString(TRUE), dateToString(TRUE),
Config_getString("PROJECT_NAME") Config_getString("PROJECT_NAME")
); );
t << endl << "<a href=\"http://www.doxygen.org/index.html\">"; t << "&nbsp;" << endl << "<a href=\"http://www.doxygen.org/index.html\">";
t << endl << "<img src=\"" << relPath << "doxygen.png\" alt=\"doxygen\" " t << endl << "<img src=\"" << relPath << "doxygen.png\" alt=\"doxygen\" "
<< "align=\"middle\" border=0 >" << "</a> " << versionString << " "; << "align=\"middle\" border=\"0\">" << "</a> " << versionString << " ";
t << "</small></address>"; t << "</small></address>";
if (Debug::isFlagSet(Debug::Validate)) if (Debug::isFlagSet(Debug::Validate))
{ {
...@@ -529,7 +524,7 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -529,7 +524,7 @@ void HtmlGenerator::writeStyleInfo(int part)
void HtmlGenerator::startDoxyAnchor(const char *,const char *, void HtmlGenerator::startDoxyAnchor(const char *,const char *,
const char *anchor, const char *name) const char *anchor, const char *name)
{ {
t << "<a class=\"anchor\" name=\"" << anchor << "\" doxytag=\"" << name << "\" ></a>"; t << "<a class=\"anchor\" name=\"" << anchor << "\" doxytag=\"" << name << "\"></a>";
} }
void HtmlGenerator::endDoxyAnchor(const char *,const char *) void HtmlGenerator::endDoxyAnchor(const char *,const char *)
...@@ -859,9 +854,9 @@ void HtmlGenerator::startMemberItem(int annoType) ...@@ -859,9 +854,9 @@ void HtmlGenerator::startMemberItem(int annoType)
t << "<tr>"; t << "<tr>";
switch(annoType) switch(annoType)
{ {
case 0: t << "<td class=\"memItemLeft\" nowrap align=right valign=top>"; break; case 0: t << "<td class=\"memItemLeft\" nowrap align=\"right\" valign=\"top\">"; break;
case 1: t << "<td class=\"memItemLeft\" nowrap>"; break; case 1: t << "<td class=\"memItemLeft\" nowrap>"; break;
default: t << "<td class=\"memItemLeft\" nowrap valign=top>"; break; default: t << "<td class=\"memItemLeft\" nowrap valign=\"top\">"; break;
} }
} }
else else
...@@ -886,7 +881,7 @@ void HtmlGenerator::insertMemberAlign() ...@@ -886,7 +881,7 @@ void HtmlGenerator::insertMemberAlign()
DBG_HTML(t << "<!-- insertMemberAlign -->" << endl) DBG_HTML(t << "<!-- insertMemberAlign -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS")) if (Config_getBool("HTML_ALIGN_MEMBERS"))
{ {
t << "&nbsp;</td><td class=\"memItemRight\" valign=bottom>"; t << "&nbsp;</td><td class=\"memItemRight\" valign=\"bottom\">";
} }
} }
...@@ -921,7 +916,7 @@ void HtmlGenerator::startMemberSections() ...@@ -921,7 +916,7 @@ void HtmlGenerator::startMemberSections()
DBG_HTML(t << "<!-- startMemberSections -->" << endl) DBG_HTML(t << "<!-- startMemberSections -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS")) if (Config_getBool("HTML_ALIGN_MEMBERS"))
{ {
t << "<table border=0 cellpadding=0 cellspacing=0>" << endl; t << "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" << endl;
// HTML is not recursively decomposable, sorry // HTML is not recursively decomposable, sorry
t << "<tr><td></td></tr>" << endl; t << "<tr><td></td></tr>" << endl;
} }
...@@ -941,7 +936,7 @@ void HtmlGenerator::startMemberHeader() ...@@ -941,7 +936,7 @@ void HtmlGenerator::startMemberHeader()
DBG_HTML(t << "<!-- startMemberHeader -->" << endl) DBG_HTML(t << "<!-- startMemberHeader -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS")) if (Config_getBool("HTML_ALIGN_MEMBERS"))
{ {
t << "<tr><td colspan=2><br><h2>"; t << "<tr><td colspan=\"2\"><br><h2>";
} }
else else
{ {
...@@ -965,7 +960,7 @@ void HtmlGenerator::endMemberHeader() ...@@ -965,7 +960,7 @@ void HtmlGenerator::endMemberHeader()
void HtmlGenerator::startMemberSubtitle() void HtmlGenerator::startMemberSubtitle()
{ {
DBG_HTML(t << "<!-- startMemberSubtitle -->" << endl) DBG_HTML(t << "<!-- startMemberSubtitle -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS")) t << "<tr><td colspan=2>"; if (Config_getBool("HTML_ALIGN_MEMBERS")) t << "<tr><td colspan=\"2\">";
} }
void HtmlGenerator::endMemberSubtitle() void HtmlGenerator::endMemberSubtitle()
...@@ -1036,7 +1031,7 @@ void HtmlGenerator::startMemberDocName(bool align) ...@@ -1036,7 +1031,7 @@ void HtmlGenerator::startMemberDocName(bool align)
t << " <tr>" << endl; t << " <tr>" << endl;
t << " <td class=\"md\" nowrap valign=\"top\""; t << " <td class=\"md\" nowrap valign=\"top\"";
if (align) t << " align=\"right\""; if (align) t << " align=\"right\"";
t << "> "; t << ">";
} }
void HtmlGenerator::endMemberDocName() void HtmlGenerator::endMemberDocName()
...@@ -1213,7 +1208,7 @@ void HtmlGenerator::startIndent() ...@@ -1213,7 +1208,7 @@ void HtmlGenerator::startIndent()
//t << "<div class=\"in\">" << endl; //t << "<div class=\"in\">" << endl;
t << "<table cellspacing=5 cellpadding=0 border=0>\n" t << "<table cellspacing=\"5\" cellpadding=\"0\" border=\"0\">\n"
" <tr>\n" " <tr>\n"
" <td>\n" " <td>\n"
" &nbsp;\n" " &nbsp;\n"
......
...@@ -172,11 +172,11 @@ class HtmlGenerator : public OutputGenerator ...@@ -172,11 +172,11 @@ class HtmlGenerator : public OutputGenerator
void writeNonBreakableSpace(int); void writeNonBreakableSpace(int);
void startDescTable() void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; } { t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl; }
void endDescTable() void endDescTable()
{ t << "</table>" << endl; } { t << "</table>" << endl; }
void startDescTableTitle() void startDescTableTitle()
{ t << "<tr><td valign=top><em>"; } { t << "<tr><td valign=\"top\"><em>"; }
void endDescTableTitle() void endDescTableTitle()
{ t << "</em>&nbsp;</td>"; } { t << "</em>&nbsp;</td>"; }
void startDescTableData() void startDescTableData()
......
...@@ -544,31 +544,32 @@ void writeClassTree(BaseClassList *cl,int level) ...@@ -544,31 +544,32 @@ void writeClassTree(BaseClassList *cl,int level)
void writeClassTreeNode(ClassDef *cd,bool hasHtmlHelp,bool hasFtvHelp,bool &started,int level) void writeClassTreeNode(ClassDef *cd,bool hasHtmlHelp,bool hasFtvHelp,bool &started,int level)
{ {
if (cd->isVisibleInHierarchy() && !cd->visited) //printf("writeClassTreeNode(%s) visited=%d\n",cd->name().data(),cd->visited);
if (cd->isVisibleInHierarchy() && !cd->visited)
{
if (!started)
{ {
if (!started) started=TRUE;
}
bool hasChildren = classHasVisibleChildren(cd);
//printf("node: Has children %s: %d\n",cd->name().data(),hasChildren);
if (cd->isLinkable())
{
if (hasHtmlHelp)
{ {
started=TRUE; HtmlHelp::getInstance()->addContentsItem(hasChildren,cd->displayName(),cd->getOutputFileBase());
} }
bool hasChildren = classHasVisibleChildren(cd); if (hasFtvHelp)
//printf("node: Has children %s: %d\n",cd->name().data(),hasChildren);
if (cd->isLinkable())
{ {
if (hasHtmlHelp) FTVHelp::getInstance()->addContentsItem(hasChildren,cd->getReference(),cd->getOutputFileBase(),0,cd->displayName());
{
HtmlHelp::getInstance()->addContentsItem(hasChildren,cd->displayName(),cd->getOutputFileBase());
}
if (hasFtvHelp)
{
FTVHelp::getInstance()->addContentsItem(hasChildren,cd->getReference(),cd->getOutputFileBase(),0,cd->displayName());
}
} }
if (hasChildren)
{
writeClassTree(cd->subClasses(),level+1);
}
cd->visited=TRUE;
} }
if (hasChildren)
{
writeClassTree(cd->subClasses(),level+1);
}
cd->visited=TRUE;
}
} }
void writeClassTree(ClassList *cl,int level) void writeClassTree(ClassList *cl,int level)
...@@ -578,7 +579,11 @@ void writeClassTree(ClassList *cl,int level) ...@@ -578,7 +579,11 @@ void writeClassTree(ClassList *cl,int level)
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
ClassListIterator cli(*cl); ClassListIterator cli(*cl);
bool started=FALSE; bool started=FALSE;
for ( ; cli.current() ; ++cli) for ( cli.toFirst() ; cli.current() ; ++cli)
{
cli.current()->visited=FALSE;
}
for ( cli.toFirst() ; cli.current() ; ++cli)
{ {
writeClassTreeNode(cli.current(),hasHtmlHelp,hasFtvHelp,started,level); writeClassTreeNode(cli.current(),hasHtmlHelp,hasFtvHelp,started,level);
} }
...@@ -591,7 +596,11 @@ void writeClassTree(ClassSDict *d,int level) ...@@ -591,7 +596,11 @@ void writeClassTree(ClassSDict *d,int level)
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
ClassSDict::Iterator cli(*d); ClassSDict::Iterator cli(*d);
bool started=FALSE; bool started=FALSE;
for ( ; cli.current() ; ++cli) for ( cli.toFirst() ; cli.current() ; ++cli)
{
cli.current()->visited=FALSE;
}
for ( cli.toFirst() ; cli.current() ; ++cli)
{ {
writeClassTreeNode(cli.current(),hasHtmlHelp,hasFtvHelp,started,level); writeClassTreeNode(cli.current(),hasHtmlHelp,hasFtvHelp,started,level);
} }
...@@ -1356,7 +1365,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1356,7 +1365,7 @@ void writeAlphabeticalClassList(OutputList &ol)
alphaLinks += "</div><p>\n"; alphaLinks += "</div><p>\n";
ol.writeString(alphaLinks); ol.writeString(alphaLinks);
ol.writeString("<table align=center width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"); ol.writeString("<table align=\"center\" width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
// the number of columns in the table // the number of columns in the table
const int columns = Config_getInt("COLS_IN_ALPHA_INDEX"); const int columns = Config_getInt("COLS_IN_ALPHA_INDEX");
...@@ -2835,7 +2844,21 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) ...@@ -2835,7 +2844,21 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
ftvHelp->incContentsDepth(); ftvHelp->incContentsDepth();
} }
writeClassTree(gd->classSDict,1); ClassDef *cd;
ClassSDict::Iterator cdi(*gd->classSDict);
for (cdi.toFirst();(cd=cdi.current());++cdi)
{
if (cd->isLinkable())
{
//printf("node: Has children %s\n",cd->name().data());
if (htmlHelp)
htmlHelp->addContentsItem(FALSE,cd->displayName(),cd->getOutputFileBase());
if (ftvHelp)
ftvHelp->addContentsItem(FALSE,cd->getReference(),cd->getOutputFileBase(),0,cd->displayName());
}
}
//writeClassTree(gd->classSDict,1);
if(htmlHelp) htmlHelp->decContentsDepth(); if(htmlHelp) htmlHelp->decContentsDepth();
if(ftvHelp) ftvHelp->decContentsDepth(); if(ftvHelp) ftvHelp->decContentsDepth();
} }
......
...@@ -33,6 +33,7 @@ HEADERS = bufstr.h \ ...@@ -33,6 +33,7 @@ HEADERS = bufstr.h \
define.h \ define.h \
definition.h \ definition.h \
diagram.h \ diagram.h \
dirdef.h \
docparser.h \ docparser.h \
doctokenizer.h \ doctokenizer.h \
docvisitor.h \ docvisitor.h \
...@@ -136,6 +137,7 @@ SOURCES = ce_lex.cpp \ ...@@ -136,6 +137,7 @@ SOURCES = ce_lex.cpp \
define.cpp \ define.cpp \
definition.cpp \ definition.cpp \
diagram.cpp \ diagram.cpp \
dirdef.cpp \
docparser.cpp \ docparser.cpp \
doctokenizer.cpp \ doctokenizer.cpp \
dot.cpp \ dot.cpp \
......
This diff is collapsed.
...@@ -543,7 +543,17 @@ QCString MemberDef::anchor() const ...@@ -543,7 +543,17 @@ QCString MemberDef::anchor() const
if (groupAlias) return groupAlias->anchor(); if (groupAlias) return groupAlias->anchor();
if (m_templateMaster) return m_templateMaster->anchor(); if (m_templateMaster) return m_templateMaster->anchor();
if (enumScope) result.prepend(enumScope->anchor()); if (enumScope) result.prepend(enumScope->anchor());
if (group) result.prepend("g"); if (group)
{
if (groupMember)
{
result=groupMember->anchor();
}
else
{
result.prepend("g");
}
}
return result; return result;
} }
...@@ -1184,12 +1194,18 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1184,12 +1194,18 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// name().data(),hasDocs,container->definitionType(),inGroup); // name().data(),hasDocs,container->definitionType(),inGroup);
if ( !hasDocs ) return; if ( !hasDocs ) return;
QCString scopeName = scName; QCString scopeName = scName;
QCString memAnchor = anchor();
if (container->definitionType()==TypeGroup) if (container->definitionType()==TypeGroup)
{ {
if (getClassDef()) scopeName=getClassDef()->name(); if (getClassDef()) scopeName=getClassDef()->name();
else if (getNamespaceDef()) scopeName=getNamespaceDef()->name(); else if (getNamespaceDef()) scopeName=getNamespaceDef()->name();
else if (getFileDef()) scopeName=getFileDef()->name(); else if (getFileDef()) scopeName=getFileDef()->name();
} }
else if (container->definitionType()==TypeFile && getNamespaceDef())
{ // member is in a namespace, but is written as part of the file documentation
// as well, so we need to make sure its label is unique.
memAnchor.prepend("file_");
}
QCString cname = container->name(); QCString cname = container->name();
QCString cfname = getOutputFileBase(); QCString cfname = getOutputFileBase();
...@@ -1200,7 +1216,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1200,7 +1216,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"))
{ {
HtmlHelp *htmlHelp = HtmlHelp::getInstance(); HtmlHelp *htmlHelp = HtmlHelp::getInstance();
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,memAnchor);
} }
// get member name // get member name
...@@ -1242,11 +1258,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1242,11 +1258,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{ {
if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name()) if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
{ {
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),memAnchor,name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,memAnchor);
} }
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i)); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i));
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef()); vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
...@@ -1258,11 +1274,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1258,11 +1274,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (!found) // anonymous compound if (!found) // anonymous compound
{ {
//printf("Anonymous compound `%s'\n",cname.data()); //printf("Anonymous compound `%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),memAnchor,name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,memAnchor);
} }
// strip anonymous compound names from definition // strip anonymous compound names from definition
int si=ldef.find(' '),pi,ei=i+l; int si=ldef.find(' '),pi,ei=i+l;
...@@ -1280,11 +1296,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1280,11 +1296,11 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
else // not an enum value else // not an enum value
{ {
ol.startDoxyAnchor(cfname,cname,anchor(),doxyName); ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName);
ol.startMemberDoc(cname,name(),anchor(),name()); ol.startMemberDoc(cname,name(),memAnchor,name());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,memAnchor);
} }
ClassDef *cd=getClassDef(); ClassDef *cd=getClassDef();
...@@ -1457,7 +1473,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1457,7 +1473,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.endMemberDocName(); ol.endMemberDocName();
ol.endMemberDoc(FALSE); ol.endMemberDoc(FALSE);
} }
ol.endDoxyAnchor(cfname,anchor()); ol.endDoxyAnchor(cfname,memAnchor);
ol.startIndent(); ol.startIndent();
ol.pushGeneratorState(); ol.pushGeneratorState();
...@@ -1872,7 +1888,9 @@ void MemberDef::setAnchor(const char *a) ...@@ -1872,7 +1888,9 @@ void MemberDef::setAnchor(const char *a)
anc=a; anc=a;
} }
void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs) void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,
bool hasDocs,MemberDef *member)
{ {
//printf("%s MemberDef::setGroupDef(%s)\n",name().data(),gd->name().data()); //printf("%s MemberDef::setGroupDef(%s)\n",name().data(),gd->name().data());
group=gd; group=gd;
...@@ -1880,6 +1898,7 @@ void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString ...@@ -1880,6 +1898,7 @@ void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString
groupFileName=fileName; groupFileName=fileName;
groupStartLine=startLine; groupStartLine=startLine;
groupHasDocs=hasDocs; groupHasDocs=hasDocs;
groupMember=member;
} }
void MemberDef::setEnumScope(MemberDef *md) void MemberDef::setEnumScope(MemberDef *md)
......
...@@ -164,7 +164,9 @@ class MemberDef : public Definition ...@@ -164,7 +164,9 @@ class MemberDef : public Definition
void setMaxInitLines(int lines) { userInitLines=lines; } void setMaxInitLines(int lines) { userInitLines=lines; }
void setMemberClass(ClassDef *cd); void setMemberClass(ClassDef *cd);
void setSectionList(Definition *d,MemberList *sl); void setSectionList(Definition *d,MemberList *sl);
void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs); void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,bool hasDocs,
MemberDef *member=0);
void setExplicitExternal(bool b) { explExt=b; } void setExplicitExternal(bool b) { explExt=b; }
void setReadAccessor(const char *r) { read=r; } void setReadAccessor(const char *r) { read=r; }
void setWriteAccessor(const char *w) { write=w; } void setWriteAccessor(const char *w) { write=w; }
...@@ -360,6 +362,7 @@ class MemberDef : public Definition ...@@ -360,6 +362,7 @@ class MemberDef : public Definition
QCString groupFileName; // file where this grouping was defined QCString groupFileName; // file where this grouping was defined
int groupStartLine; // line " " " " " int groupStartLine; // line " " " " "
bool groupHasDocs; // true if the entry that caused the grouping was documented bool groupHasDocs; // true if the entry that caused the grouping was documented
MemberDef *groupMember;
MemberDef *m_templateMaster; MemberDef *m_templateMaster;
SDict<MemberList> *classSectionSDict; SDict<MemberList> *classSectionSDict;
bool docsForDefinition; // TRUE => documentation block is put before bool docsForDefinition; // TRUE => documentation block is put before
......
...@@ -81,7 +81,9 @@ void MemberGroup::insertMember(MemberDef *md) ...@@ -81,7 +81,9 @@ void MemberGroup::insertMember(MemberDef *md)
GroupDef *gd; GroupDef *gd;
if (firstMd && (gd=firstMd->getGroupDef())) if (firstMd && (gd=firstMd->getGroupDef()))
{ {
md->setGroupDef(gd, firstMd->getGroupPri(), firstMd->getGroupFileName(), firstMd->getGroupStartLine(), firstMd->getGroupHasDocs()); md->setGroupDef(gd, firstMd->getGroupPri(),
firstMd->getGroupFileName(), firstMd->getGroupStartLine(),
firstMd->getGroupHasDocs());
gd->insertMember(md); gd->insertMember(md);
} }
} }
......
...@@ -2636,7 +2636,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -2636,7 +2636,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<ReadBody,ReadNSBody,ReadBodyIntf>{BN}+ { current->program += yytext ; <ReadBody,ReadNSBody,ReadBodyIntf>{BN}+ { current->program += yytext ;
lineCount() ; lineCount() ;
} }
<ReadBodyIntf>"@end" { // end of Objective C block <ReadBodyIntf>"@end"/[^a-z_A-Z0-9] { // end of Objective C block
current_root->addSubEntry( current ) ; current_root->addSubEntry( current ) ;
current=new Entry; current=new Entry;
initEntry(); initEntry();
...@@ -5475,7 +5475,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -5475,7 +5475,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
unput('\n'); unput('\n');
BEGIN( lastInternalDocContext ); BEGIN( lastInternalDocContext );
} }
<AfterDoc>{CMD}"brief" { BEGIN(AfterDocBrief); } <AfterDoc>{CMD}"brief" { current->brief.resize(0); BEGIN(AfterDocBrief); }
<AfterDoc>"/*"|"//" { current->doc+=yytext; } <AfterDoc>"/*"|"//" { current->doc+=yytext; }
<AfterDoc>^{B}*"*"+/[^/] <AfterDoc>^{B}*"*"+/[^/]
<AfterDoc>\n { current->doc+=yytext; yyLineNr++; } <AfterDoc>\n { current->doc+=yytext; yyLineNr++; }
......
...@@ -1203,6 +1203,7 @@ static bool findOperator(const QCString &s,int i) ...@@ -1203,6 +1203,7 @@ static bool findOperator(const QCString &s,int i)
} }
static const char constScope[] = { 'c', 'o', 'n', 's', 't', ':' }; static const char constScope[] = { 'c', 'o', 'n', 's', 't', ':' };
static const char virtualScope[] = { 'v', 'i', 'r', 't', 'u', 'a', 'l', ':' };
QCString removeRedundantWhiteSpace(const QCString &s) QCString removeRedundantWhiteSpace(const QCString &s)
{ {
...@@ -1211,11 +1212,13 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -1211,11 +1212,13 @@ QCString removeRedundantWhiteSpace(const QCString &s)
uint i; uint i;
uint l=s.length(); uint l=s.length();
uint csp=0; uint csp=0;
uint vsp=0;
for (i=0;i<l;i++) for (i=0;i<l;i++)
{ {
nextChar: nextChar:
char c=s.at(i); char c=s.at(i);
if (csp<6 && c==constScope[csp]) csp++; else csp=0; if (csp<6 && c==constScope[csp]) csp++; else csp=0;
if (vsp<8 && c==virtualScope[vsp]) vsp++; else vsp=0;
if (c=='"') // quoted string if (c=='"') // quoted string
{ {
i++; i++;
...@@ -1262,9 +1265,13 @@ nextChar: ...@@ -1262,9 +1265,13 @@ nextChar:
result+=' '; result+=' ';
result+=s.at(i); result+=s.at(i);
} }
else if (c=='t' && csp==5 && !(isId(s.at(i+1)) || s.at(i+1)==' ' || s.at(i+1)==')' || s.at(i+1)==',' || s.at(i+1)=='\0')) // prevent const ::A from being converted to const::A else if (c=='t' && csp==5 &&
!(isId(s.at(i+1)) /*|| s.at(i+1)==' '*/ || s.at(i+1)==')' ||
s.at(i+1)==',' || s.at(i+1)=='\0'))
// prevent const ::A from being converted to const::A
{ {
result+="t "; result+="t ";
if (s.at(i+1)==' ') i++;
csp=0; csp=0;
} }
else if (c==':' && csp==6) // replace const::A by const ::A else if (c==':' && csp==6) // replace const::A by const ::A
...@@ -1272,6 +1279,20 @@ nextChar: ...@@ -1272,6 +1279,20 @@ nextChar:
result+=" :"; result+=" :";
csp=0; csp=0;
} }
else if (c=='l' && vsp==7 &&
!(isId(s.at(i+1)) /*|| s.at(i+1)==' '*/ || s.at(i+1)==')' ||
s.at(i+1)==',' || s.at(i+1)=='\0'))
// prevent virtual ::A from being converted to virtual::A
{
result+="l ";
if (s.at(i+1)==' ') i++;
vsp=0;
}
else if (c==':' && vsp==8) // replace virtual::A by virtual ::A
{
result+=" :";
vsp=0;
}
else if (!isspace((uchar)c) || else if (!isspace((uchar)c) ||
( i>0 && i<l-1 && ( i>0 && i<l-1 &&
(isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') (isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']')
...@@ -1399,6 +1420,16 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, ...@@ -1399,6 +1420,16 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
found=TRUE; found=TRUE;
} }
} }
else if ((cd=getClass(word+"-p"))) // search for Obj-C protocols as well
{
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
{
out.writeLink(cd->getReference(),cd->getOutputFileBase(),0,word);
found=TRUE;
}
}
if (scope && if (scope &&
(scope->definitionType()==Definition::TypeClass || (scope->definitionType()==Definition::TypeClass ||
...@@ -3335,7 +3366,12 @@ bool resolveLink(/* in */ const char *scName, ...@@ -3335,7 +3366,12 @@ bool resolveLink(/* in */ const char *scName,
*resContext=fd; *resContext=fd;
return TRUE; return TRUE;
} }
else if ((cd=getClass(linkRef))) else if ((cd=getClass(linkRef))) // class link
{
*resContext=cd;
return TRUE;
}
else if ((cd=getClass(linkRef+"-p"))) // Obj-C protocol link
{ {
*resContext=cd; *resContext=cd;
return TRUE; return TRUE;
......
...@@ -7,11 +7,13 @@ ...@@ -7,11 +7,13 @@
TEMPLATE = app TEMPLATE = app
CONFIG = qt warn_on release CONFIG = qt warn_on release
TMAKE_CC = xlC TMAKE_CC = xlc
#TMAKE_CC = xlC
TMAKE_CFLAGS = -+ -qstrict -D_BSD TMAKE_CFLAGS = -+ -qstrict -D_BSD
TMAKE_CFLAGS_WARN_ON = TMAKE_CFLAGS_WARN_ON =
TMAKE_CFLAGS_WARN_OFF = TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O3 TMAKE_CFLAGS_RELEASE = -O
#TMAKE_CFLAGS_RELEASE = -O3
TMAKE_CFLAGS_DEBUG = -g TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = TMAKE_CFLAGS_SHLIB =
TMAKE_CFLAGS_YACC = TMAKE_CFLAGS_YACC =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment