summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-09-06 21:04:07 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-09-06 21:04:07 (GMT)
commitbc6161ea636d54342e82f1f96b8d534dbd99c78b (patch)
tree24f950391924810998cc59aeb041099c7871e49c /src
parent4b77f4fc83a7954a741c1b35ec50e918a2786559 (diff)
downloadDoxygen-bc6161ea636d54342e82f1f96b8d534dbd99c78b.zip
Doxygen-bc6161ea636d54342e82f1f96b8d534dbd99c78b.tar.gz
Doxygen-bc6161ea636d54342e82f1f96b8d534dbd99c78b.tar.bz2
Release-1.3.8-20040906
Diffstat (limited to 'src')
-rw-r--r--src/.cvsignore17
-rw-r--r--src/compound.xsd2
-rw-r--r--src/compound_xsd.h2
-rw-r--r--src/config.l7
-rw-r--r--src/dirdef.cpp233
-rw-r--r--src/dirdef.h48
-rw-r--r--src/doxygen.cpp145
-rw-r--r--src/doxygen.h3
-rw-r--r--src/entry.h3
-rw-r--r--src/filedef.cpp49
-rw-r--r--src/groupdef.cpp1
-rw-r--r--src/htmlgen.cpp17
-rw-r--r--src/index.cpp412
-rw-r--r--src/index.h7
-rw-r--r--src/index.xsd1
-rw-r--r--src/index_xsd.h1
-rw-r--r--src/latexgen.cpp77
-rw-r--r--src/latexgen.h93
-rw-r--r--src/outputlist.cpp2
-rw-r--r--src/outputlist.h2
-rw-r--r--src/rtfgen.cpp74
-rw-r--r--src/scanner.l8
-rw-r--r--src/translator.h11
-rw-r--r--src/translator_adapter.h22
-rw-r--r--src/translator_br.h2
-rw-r--r--src/translator_cn.h2
-rw-r--r--src/translator_cz.h2
-rw-r--r--src/translator_de.h2
-rw-r--r--src/translator_dk.h2
-rw-r--r--src/translator_en.h64
-rw-r--r--src/translator_hr.h2
-rw-r--r--src/translator_hu.h16
-rw-r--r--src/translator_it.h2
-rw-r--r--src/translator_jp.h2
-rw-r--r--src/translator_nl.h2
-rw-r--r--src/translator_no.h2
-rw-r--r--src/translator_pl.h151
-rw-r--r--src/translator_ru.h2
-rw-r--r--src/translator_za.h2
-rw-r--r--src/xmlgen.cpp65
40 files changed, 1107 insertions, 450 deletions
diff --git a/src/.cvsignore b/src/.cvsignore
index 6f899dd..1f84cb5 100644
--- a/src/.cvsignore
+++ b/src/.cvsignore
@@ -3,3 +3,20 @@ doxygen.pro
doxytag.pro
libdoxycfg.pro
libdoxygen.pro
+Makefile.doxygen
+Makefile.doxytag
+Makefile.libdoxycfg
+Makefile.libdoxygen
+ce_lex.cpp
+ce_parse.cpp
+ce_parse.h
+code.cpp
+commentcnv.cpp
+config.cpp
+declinfo.cpp
+defargs.cpp
+doctokenizer.cpp
+doxytag.cpp
+pre.cpp
+scanner.cpp
+version.cpp
diff --git a/src/compound.xsd b/src/compound.xsd
index f9e0abe..c35c917 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -21,6 +21,7 @@
<xsd:element name="includedby" type="incType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="incdepgraph" type="graphType" minOccurs="0" />
<xsd:element name="invincdepgraph" type="graphType" minOccurs="0" />
+ <xsd:element name="innerdir" type="refType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="innerfile" type="refType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="innerclass" type="refType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="innernamespace" type="refType" minOccurs="0" maxOccurs="unbounded" />
@@ -647,6 +648,7 @@
<xsd:enumeration value="group" />
<xsd:enumeration value="page" />
<xsd:enumeration value="example" />
+ <xsd:enumeration value="dir" />
</xsd:restriction>
</xsd:simpleType>
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index 3aad39c..f7a6381 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -21,6 +21,7 @@
" <xsd:element name=\"includedby\" type=\"incType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"incdepgraph\" type=\"graphType\" minOccurs=\"0\" />\n"
" <xsd:element name=\"invincdepgraph\" type=\"graphType\" minOccurs=\"0\" />\n"
+" <xsd:element name=\"innerdir\" type=\"refType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"innerfile\" type=\"refType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"innerclass\" type=\"refType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"innernamespace\" type=\"refType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
@@ -647,6 +648,7 @@
" <xsd:enumeration value=\"group\" />\n"
" <xsd:enumeration value=\"page\" />\n"
" <xsd:enumeration value=\"example\" />\n"
+" <xsd:enumeration value=\"dir\" />\n"
" </xsd:restriction>\n"
" </xsd:simpleType>\n"
"\n"
diff --git a/src/config.l b/src/config.l
index de33167..4d8d4ac 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1814,6 +1814,13 @@ void Config::create()
"list will mention the files that were used to generate the documentation. \n",
TRUE
);
+ cb = addBool(
+ "SHOW_DIRECTORIES",
+ "If the sources in your project are distributed over multiple directories \n"
+ "then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy \n"
+ "in the documentation.\n",
+ TRUE
+ );
//-----------------------------------------------------------------------------------------------
addInfo( "Messages","configuration options related to warning and progress messages");
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index d7c46b1..38808f6 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -2,18 +2,34 @@
#include "filename.h"
#include "doxygen.h"
#include "util.h"
+#include "outputlist.h"
+#include "language.h"
//----------------------------------------------------------------------
// method implementation
-DirDef::DirDef(const char *path) : Definition(path,1,path),
- m_parent(0)
+static int g_dirCount=0;
+
+DirDef::DirDef(const char *path) : Definition(path,1,path)
{
- // get short name (stipping the paths mentioned in STRIP_FROM_PATH)
+ // get display name (stipping the paths mentioned in STRIP_FROM_PATH)
m_dispName = stripFromPath(path);
+ // get short name (last part of path)
+ m_shortName = path;
+ if (m_shortName.at(m_shortName.length()-1)=='/')
+ { // strip trailing /
+ m_shortName = m_shortName.left(m_shortName.length()-1);
+ }
+ int pi=m_shortName.findRev('/');
+ if (pi!=-1)
+ { // remove everything till the last /
+ m_shortName = m_shortName.mid(pi+1);
+ }
+
m_subdirs.setAutoDelete(TRUE);
m_fileList = new FileList;
m_classSDict = new ClassSDict(17);
+ m_dirCount = g_dirCount++;
}
DirDef::~DirDef()
@@ -22,16 +38,193 @@ DirDef::~DirDef()
void DirDef::addSubDir(DirDef *subdir)
{
- m_subdirs.append(subdir);
- subdir->m_parent=this;
+ m_subdirs.inSort(subdir);
+ subdir->setOuterScope(this);
}
void DirDef::addFile(FileDef *fd)
{
- m_fileList->append(fd);
+ m_fileList->inSort(fd);
fd->setDirDef(this);
}
+QCString DirDef::getOutputFileBase() const
+{
+ //return "dir_"+convertNameToFile(name());
+ return QCString().sprintf("dir_%06d",m_dirCount);
+}
+
+void DirDef::writeDetailedDocumentation(OutputList &ol)
+{
+ if (!briefDescription().isEmpty() || !documentation().isEmpty())
+ {
+ ol.writeRuler();
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::RTF);
+ ol.writeAnchor(0,"_details");
+ ol.popGeneratorState();
+ ol.startGroupHeader();
+ ol.parseText(theTranslator->trDetailedDescription());
+ ol.endGroupHeader();
+
+ // repeat brief description
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ {
+ ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
+ ol.newParagraph();
+ }
+
+ // write documentation
+ if (!documentation().isEmpty())
+ {
+ ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
+ }
+ }
+}
+
+void DirDef::writeDocumentation(OutputList &ol)
+{
+ ol.pushGeneratorState();
+
+ QCString shortTitle=theTranslator->trDirReference(m_shortName);
+ QCString title=theTranslator->trDirReference(m_dispName);
+ startFile(ol,getOutputFileBase(),name(),title);
+
+ // write navigation path
+ writeNavigationPath(ol);
+
+ startTitle(ol,getOutputFileBase());
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.parseText(shortTitle);
+ ol.enableAll();
+ ol.disable(OutputGenerator::Html);
+ ol.parseText(title);
+ ol.popGeneratorState();
+ endTitle(ol,getOutputFileBase(),title);
+
+ // write brief or details (if DETAILS_AT_TOP)
+ if (Config_getBool("DETAILS_AT_TOP"))
+ {
+ writeDetailedDocumentation(ol);
+ ol.newParagraph();
+ }
+ else if (!briefDescription().isEmpty())
+ {
+ ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
+ ol.writeString(" \n");
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::RTF);
+ ol.disable(OutputGenerator::Man);
+ ol.startTextLink(0,"_details");
+ ol.parseText(theTranslator->trMore());
+ ol.endTextLink();
+ ol.enableAll();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.newParagraph();
+ ol.popGeneratorState();
+ }
+
+
+ ol.startMemberSections();
+ // write subdir list
+ if (m_subdirs.count()>0)
+ {
+ ol.startMemberHeader();
+ ol.parseText(theTranslator->trDir(TRUE,FALSE));
+ ol.endMemberHeader();
+ ol.startMemberList();
+ DirDef *dd=m_subdirs.first();
+ while (dd)
+ {
+ ol.startMemberItem(0);
+ ol.parseText(theTranslator->trDir(FALSE,TRUE));
+ ol.insertMemberAlign();
+ ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
+ ol.endMemberItem();
+ if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ {
+ ol.startMemberDescription();
+ ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE);
+ ol.endMemberDescription();
+ ol.newParagraph();
+ }
+ dd=m_subdirs.next();
+ }
+
+ ol.endMemberList();
+ }
+
+
+ // write file list
+ if (m_fileList->count()>0)
+ {
+ ol.startMemberHeader();
+ ol.parseText(theTranslator->trFile(TRUE,FALSE));
+ ol.endMemberHeader();
+ ol.startMemberList();
+ FileDef *fd=m_fileList->first();
+ while (fd)
+ {
+ ol.startMemberItem(0);
+ ol.docify("file ");
+ ol.insertMemberAlign();
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ //if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ //{
+ // Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
+ //}
+ ol.endMemberItem();
+ if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ {
+ ol.startMemberDescription();
+ ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE);
+ ol.endMemberDescription();
+ ol.newParagraph();
+ }
+ fd=m_fileList->next();
+ }
+ ol.endMemberList();
+ }
+ ol.endMemberSections();
+
+ if (!Config_getBool("DETAILS_AT_TOP"))
+ {
+ writeDetailedDocumentation(ol);
+ }
+
+
+ // write details (if !DETAILS_AT_TOP)
+
+ endFile(ol);
+ ol.popGeneratorState();
+}
+
+void DirDef::writePathFragment(OutputList &ol)
+{
+ if (getOuterScope()!=Doxygen::globalScope &&
+ getOuterScope()->definitionType()==Definition::TypeDir)
+ {
+ ((DirDef*)getOuterScope())->writePathFragment(ol);
+ ol.writeString("&nbsp;/&nbsp;");
+ }
+ ol.writeObjectLink(getReference(),getOutputFileBase(),0,shortName());
+}
+
+void DirDef::writeNavigationPath(OutputList &ol)
+{
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+
+ ol.writeString("<div class=\"nav\">\n");
+ writePathFragment(ol);
+ ol.writeString("</div>\n");
+
+ ol.popGeneratorState();
+}
+
//----------------------------------------------------------------------
// helper functions
@@ -68,6 +261,7 @@ bool DirDef::matchPath(const QCString &path,QStrList &l)
*/
DirDef *DirDef::mergeDirectoryInTree(const QCString &path)
{
+ //printf("DirDef::mergeDirectoryInTree(%s)\n",path.data());
int p=0,i=0;
DirDef *dir=0;
while ((i=path.find('/',p))!=-1)
@@ -96,7 +290,8 @@ void buildDirectories()
FileDef *fd;
for (;(fd=fni.current());++fni)
{
- if (!fd->getReference().isEmpty())
+ //printf("buildDirectories %s\n",fd->name().data());
+ if (fd->getReference().isEmpty())
{
DirDef *dir;
if ((dir=Doxygen::directories.find(fd->getPath()))==0) // new directory
@@ -112,23 +307,33 @@ void buildDirectories()
}
}
- DirDef *root = new DirDef("root:");
+ //DirDef *root = new DirDef("root:");
// compute relations between directories => introduce container dirs.
DirDef *dir;
- SDict<DirDef>::Iterator sdi(Doxygen::directories);
+ DirSDict::Iterator sdi(Doxygen::directories);
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
- printf("New dir %s\n",dir->displayName().data());
+ //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());
+ //if (parent==0) parent=root;
+ if (parent) parent->addSubDir(dir);
+ //printf("DirDef::addSubdir(): Adding subdir\n%s to\n%s\n",
+ // dir->displayName().data(), parent->displayName().data());
}
}
}
+void generateDirDocs(OutputList &ol)
+{
+ DirDef *dir;
+ DirSDict::Iterator sdi(Doxygen::directories);
+ for (sdi.toFirst();(dir=sdi.current());++sdi)
+ {
+ dir->writeDocumentation(ol);
+ }
+}
+
diff --git a/src/dirdef.h b/src/dirdef.h
index 369bb09..0f24646 100644
--- a/src/dirdef.h
+++ b/src/dirdef.h
@@ -22,10 +22,21 @@
#include "sortdict.h"
#include "definition.h"
+#include <qlist.h>
+
class FileList;
class ClassSDict;
class QStrList;
class FileDef;
+class OutputList;
+
+class DirDef;
+
+class DirDefList : public QList<DirDef>
+{
+ public:
+ int compareItems(GCI item1,GCI item2);
+};
class DirDef : public Definition
{
@@ -33,29 +44,54 @@ class DirDef : public Definition
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; }
+ virtual QCString getOutputFileBase() const;
+ virtual bool isLinkableInProject() const { return !isReference() && hasDocumentation(); }
+ virtual bool isLinkable() const { return isReference() || isLinkableInProject(); }
QCString displayName() const { return m_dispName; }
+ QCString shortName() const { return m_shortName; }
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);
+ void writeDetailedDocumentation(OutputList &ol);
+ void writeDocumentation(OutputList &ol);
+ void writeNavigationPath(OutputList &ol);
+ const QList<DirDef> &subDirs() const { return m_subdirs; }
+
static DirDef *mergeDirectoryInTree(const QCString &path);
+ bool visited;
private:
+ void writePathFragment(OutputList &ol);
static DirDef *createNewDir(const char *path);
static bool matchPath(const QCString &path,QStrList &l);
- QList<DirDef> m_subdirs;
- DirDef *m_parent;
+ DirDefList m_subdirs;
QCString m_dispName;
+ QCString m_shortName;
FileList *m_fileList; // list of files in the group
ClassSDict *m_classSDict; // list of classes in the group
+ int m_dirCount;
};
+inline int DirDefList::compareItems(GCI item1,GCI item2)
+{
+ return stricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName());
+}
+
+class DirSDict : public SDict<DirDef>
+{
+ public:
+ DirSDict(int size) : SDict<DirDef>(size) {}
+ int compareItems(GCI item1,GCI item2)
+ {
+ return stricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName());
+ }
+};
+
+
void buildDirectories();
+void generateDirDocs(OutputList &ol);
#endif
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 82cac55..2abe36a 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -121,7 +121,7 @@ SDict<DefinitionList> *Doxygen::symbolMap;
bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0;
QCache<LookupInfo> Doxygen::lookupCache(20000,20000);
-SDict<DirDef> Doxygen::directories(17);
+DirSDict Doxygen::directories(17);
static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections
@@ -6451,6 +6451,61 @@ static void findDefineDocumentation(Entry *root)
}
//----------------------------------------------------------------------------
+
+static void findDirDocumentation(Entry *root)
+{
+ if (root->section == Entry::DIRDOC_SEC)
+ {
+ QCString normalizedName = root->name;
+ normalizedName = substitute(normalizedName,"\\","/");
+ if (normalizedName.at(normalizedName.length()-1)!='/')
+ {
+ normalizedName+='/';
+ }
+ DirDef *dir,*matchingDir=0;
+ SDict<DirDef>::Iterator sdi(Doxygen::directories);
+ for (sdi.toFirst();(dir=sdi.current());++sdi)
+ {
+ printf("Dir: %s<->%s\n",dir->name().data(),normalizedName.data());
+ if (dir->name().right(normalizedName.length())==normalizedName)
+ {
+ if (matchingDir)
+ {
+ warn(root->fileName,root->startLine,
+ "Warning: \\dir command matches multiple directories.\n"
+ " Applying the command for directory %s\n"
+ " Ignoring the command for directory %s\n",
+ matchingDir->name().data(),dir->name().data()
+ );
+ }
+ else
+ {
+ matchingDir=dir;
+ }
+ }
+ }
+ if (matchingDir)
+ {
+ printf("Match for with dir %s\n",matchingDir->name().data());
+ matchingDir->setBriefDescription(root->brief,root->briefFile,root->briefLine);
+ matchingDir->setDocumentation(root->doc,root->docFile,root->docLine);
+ }
+ else
+ {
+ warn(root->fileName,root->startLine,"Warning: No matching "
+ "directory found for command \\dir %s\n",root->name.data());
+ }
+ }
+ EntryListIterator eli(*root->sublist);
+ Entry *e;
+ for (;(e=eli.current());++eli)
+ {
+ findDirDocumentation(e);
+ }
+}
+
+
+//----------------------------------------------------------------------------
// create a (sorted) list of separate documentation pages
static void buildPageList(Entry *root)
@@ -7329,41 +7384,6 @@ static int readDir(QFileInfo *fi,
return totalSize;
}
-//----------------------------------------------------------------------------
-// read the file with name `name' into a string.
-
-//static QCString readExampleFile(const char *name)
-//{
-// QCString example;
-// QFileInfo fi(name);
-// if (fi.exists())
-// {
-// QFile f((const char *)fi.absFilePath());
-// if (f.open(IO_ReadOnly))
-// {
-// example.resize(fi.size()+1);
-// if ((int)fi.size()!=f.readBlock(example.data(),fi.size()))
-// {
-// err("Error while reading file %s\n",fi.absFilePath().data());
-// //exit(1);
-// return "";
-// }
-// example.at(fi.size())='\0';
-// }
-// else
-// {
-// err("Error opening file %s\n",fi.absFilePath().data());
-// //exit(1);
-// return "";
-// }
-// }
-// else
-// {
-// err("Error: example file %s does not exist\n",name);
-// exit(1);
-// }
-// return example;
-//}
//----------------------------------------------------------------------------
// read a file or all files in a directory and append their contents to the
@@ -8257,8 +8277,9 @@ void parseInput()
msg("Freeing input...\n");
input.resize(0);
- //msg("Building directory list...\n");
- //buildDirectories();
+ msg("Building directory list...\n");
+ buildDirectories();
+ findDirDocumentation(root);
msg("Building group list...\n");
buildGroupList(root);
@@ -8480,6 +8501,24 @@ void generateOutput()
if (Config_getBool("GENERATE_LATEX")) writeDoxFont(Config_getString("LATEX_OUTPUT"));
if (Config_getBool("GENERATE_RTF")) writeDoxFont(Config_getString("RTF_OUTPUT"));
+ msg("Generating style sheet...\n");
+ //printf("writing style info\n");
+ outputList->writeStyleInfo(0); // write first part
+ outputList->disableAllBut(OutputGenerator::Latex);
+ outputList->parseText(
+ theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"))
+ );
+ outputList->writeStyleInfo(1); // write second part
+ //parseText(*outputList,theTranslator->trWrittenBy());
+ outputList->writeStyleInfo(2); // write third part
+ outputList->parseText(
+ theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"))
+ );
+ outputList->writeStyleInfo(3); // write fourth part
+ //parseText(*outputList,theTranslator->trWrittenBy());
+ outputList->writeStyleInfo(4); // write last part
+ outputList->enableAll();
+
//statistics();
// count the number of documented elements in the lists we have built.
@@ -8522,12 +8561,24 @@ void generateOutput()
msg("Generating group documentation...\n");
generateGroupDocs();
+ if (Config_getBool("SHOW_DIRECTORIES"))
+ {
+ msg("Generating directory documentation...\n");
+ generateDirDocs(*outputList);
+ }
+
msg("Generating namespace index...\n");
generateNamespaceDocs();
msg("Generating group index...\n");
writeGroupIndex(*outputList);
+ if (Config_getBool("SHOW_DIRECTORIES"))
+ {
+ msg("Generating directory index...\n");
+ writeDirIndex(*outputList);
+ }
+
msg("Generating example index...\n");
writeExampleIndex(*outputList);
@@ -8549,24 +8600,6 @@ void generateOutput()
//msg("Generating search index...\n");
//generateSearchIndex();
- msg("Generating style sheet...\n");
- //printf("writing style info\n");
- outputList->writeStyleInfo(0); // write first part
- outputList->disableAllBut(OutputGenerator::Latex);
- outputList->parseText(
- theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"))
- );
- outputList->writeStyleInfo(1); // write second part
- //parseText(*outputList,theTranslator->trWrittenBy());
- outputList->writeStyleInfo(2); // write third part
- outputList->parseText(
- theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"))
- );
- outputList->writeStyleInfo(3); // write fourth part
- //parseText(*outputList,theTranslator->trWrittenBy());
- outputList->writeStyleInfo(4); // write last part
- outputList->enableAll();
-
if (Config_getBool("GENERATE_RTF"))
{
msg("Combining RTF output...\n");
diff --git a/src/doxygen.h b/src/doxygen.h
index f746cbf..a196432 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -35,6 +35,7 @@
#include "section.h"
#include "membergroup.h"
#include "reflist.h"
+#include "dirdef.h"
class PageSList;
class PageSDict;
@@ -113,7 +114,7 @@ class Doxygen
static bool outputToWizard;
static QDict<int> *htmlDirMap;
static QCache<LookupInfo> lookupCache;
- static SDict<DirDef> directories;
+ static DirSDict directories;
};
void initDoxygen();
diff --git a/src/entry.h b/src/entry.h
index 2d7d49a..1c7a0ee 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -230,7 +230,8 @@ class Entry
USINGDECL_SEC = 0x14000000,
PACKAGE_SEC = 0x15000000,
PACKAGEDOC_SEC = 0x16000000,
- OBJCIMPL_SEC = 0x17000000
+ OBJCIMPL_SEC = 0x17000000,
+ DIRDOC_SEC = 0x18000000,
};
enum MemberSpecifier
{
diff --git a/src/filedef.cpp b/src/filedef.cpp
index a05a5f8..a9dda5b 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -84,6 +84,7 @@ FileDef::FileDef(const char *p,const char *nm,
package = 0;
isSource = FALSE;
docname = nm;
+ dir = 0;
if (Config_getBool("FULL_PATH_NAMES"))
{
docname.prepend(stripFromPath(path.copy()));
@@ -213,11 +214,29 @@ void FileDef::writeDocumentation(OutputList &ol)
QCString pageTitle=theTranslator->trFileReference(docname);
startFile(ol,getOutputFileBase(),name(),pageTitle);
- startTitle(ol,getOutputFileBase());
- ol.parseText(pageTitle);
- addGroupListToTitle(ol,this);
- endTitle(ol,getOutputFileBase(),docName());
- //ol.newParagraph();
+
+ if (Config_getBool("SHOW_DIRECTORIES") && getDirDef())
+ {
+ getDirDef()->writeNavigationPath(ol);
+ QCString pageTitleShort=theTranslator->trFileReference(name());
+ startTitle(ol,getOutputFileBase());
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.parseText(pageTitleShort); // Html only
+ ol.enableAll();
+ ol.disable(OutputGenerator::Html);
+ ol.parseText(pageTitle); // other output formats
+ ol.popGeneratorState();
+ addGroupListToTitle(ol,this);
+ endTitle(ol,getOutputFileBase(),docname);
+ }
+ else
+ {
+ startTitle(ol,getOutputFileBase());
+ ol.parseText(pageTitle);
+ addGroupListToTitle(ol,this);
+ endTitle(ol,getOutputFileBase(),docname);
+ }
if (Config_getBool("SEARCHENGINE"))
{
@@ -500,11 +519,23 @@ void FileDef::writeDocumentation(OutputList &ol)
/*! Write a source listing of this file to the output */
void FileDef::writeSource(OutputList &ol)
{
+ QCString pageTitle = theTranslator->trSourceFile(docname);
ol.disableAllBut(OutputGenerator::Html);
- startFile(ol,getSourceFileBase(),0,theTranslator->trSourceFile(docname));
- startTitle(ol,0);
- ol.parseText(docname);
- endTitle(ol,0,0);
+ startFile(ol,getSourceFileBase(),0,pageTitle);
+
+ if (Config_getBool("SHOW_DIRECTORIES") && getDirDef())
+ {
+ getDirDef()->writeNavigationPath(ol);
+ startTitle(ol,getOutputFileBase());
+ ol.parseText(name());
+ endTitle(ol,getOutputFileBase(),docname);
+ }
+ else
+ {
+ startTitle(ol,0);
+ ol.parseText(docname);
+ endTitle(ol,0,0);
+ }
if (isLinkable())
{
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index ff39df4..ad79427 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -455,7 +455,6 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol)
void GroupDef::writeDocumentation(OutputList &ol)
{
ol.pushGeneratorState();
- //ol.disable(OutputGenerator::Man);
startFile(ol,getOutputFileBase(),name(),title);
startTitle(ol,getOutputFileBase());
ol.parseText(title);
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 007827d..dac75a1 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -35,6 +35,7 @@
#include "index.h"
#include "pagedef.h"
#include "debug.h"
+#include "dirdef.h"
// #define GROUP_COLOR "#ff8080"
@@ -58,6 +59,15 @@ static const char *defaultStyleSheet =
" padding: 2px;\n"
" line-height: 140%;\n"
"}\n"
+"DIV.nav {\n"
+" width: 100%;\n"
+" background-color: #eeeeff;\n"
+" border: 1px solid #b0b0b0;\n"
+" text-align: center;\n"
+" margin: 2px;\n"
+" padding: 2px;\n"
+" line-height: 140%;\n"
+"}\n"
"A.qindex {\n"
" text-decoration: none;\n"
" font-weight: bold;\n"
@@ -1365,6 +1375,13 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,
t << fixSpaces(theTranslator->trModules());
endQuickIndexItem(t);
}
+ if (Config_getBool("SHOW_DIRECTORIES") && documentedDirs>0)
+ {
+ startQuickIndexItem(t,"dirs"+Doxygen::htmlFileExtension,
+ hli==HLI_Directories,compact,first,relPath);
+ t << fixSpaces(theTranslator->trDirectories());
+ endQuickIndexItem(t);
+ }
if (documentedNamespaces>0)
{
startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
diff --git a/src/index.cpp b/src/index.cpp
index 72c8f64..307ec64 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -36,6 +36,7 @@
#include "ftvhelp.h"
#include "dot.h"
#include "pagedef.h"
+#include "dirdef.h"
int annotatedClasses;
int hierarchyClasses;
@@ -48,12 +49,14 @@ int documentedFileMembers[FMHL_Total];
int documentedNamespaceMembers[NMHL_Total];
int documentedHtmlFiles;
int documentedPages;
+int documentedDirs;
int countClassHierarchy();
int countClassMembers(int filter=CMHL_All);
int countFileMembers(int filter=FMHL_All);
void countFiles(int &htmlFiles,int &files);
int countGroups();
+int countDirs();
int countNamespaces();
int countAnnotatedClasses();
int countNamespaceMembers(int filter=NMHL_All);
@@ -68,6 +71,7 @@ void countDataStructures()
countRelatedPages(documentedPages,indexedPages);
documentedGroups = countGroups();
documentedNamespaces = countNamespaces();
+ documentedDirs = countDirs();
int i;
for (i=0;i<(int)CMHL_Total;i++)
{
@@ -201,144 +205,6 @@ static QCString fixSpaces(const QCString &s)
return substitute(s," ","&nbsp;");
}
-//void writeQuickLinks(OutputList &ol,bool compact,HighlightedItem hli,bool ext=FALSE)
-//{
-// bool first=TRUE;
-// ol.pushGeneratorState();
-// ol.disableAllBut(OutputGenerator::Html);
-// QCString extLink;
-// if (ext) { extLink="_doc"; }
-// if (compact)
-// {
-// ol.writeString("<div class=\"qindex\">");
-// }
-// else
-// {
-// ol.startItemList();
-// }
-//
-// if (Config_getBool("SEARCHENGINE"))
-// {
-// ol.writeString(" <form class=\"search\" action=\"search.php\" method=\"get\">\n");
-// }
-//
-// if (Config_getBool("GENERATE_TREEVIEW"))
-// {
-// startQuickIndexItem(ol,extLink,"main"+Doxygen::htmlFileExtension,
-// hli==HLI_Main,compact,first);
-// }
-// else
-// {
-// startQuickIndexItem(ol,extLink,"index"+Doxygen::htmlFileExtension,
-// hli==HLI_Main,compact,first);
-// }
-// ol.parseText(fixSpaces(theTranslator->trMainPage()));
-// endQuickIndexItem(ol);
-//
-// if (documentedGroups>0)
-// {
-// startQuickIndexItem(ol,extLink,"modules"+Doxygen::htmlFileExtension,
-// hli==HLI_Modules,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trModules()));
-// endQuickIndexItem(ol);
-// }
-// if (documentedNamespaces>0)
-// {
-// startQuickIndexItem(ol,extLink,"namespaces"+Doxygen::htmlFileExtension,
-// hli==HLI_Namespaces,compact,first);
-// if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
-// {
-// ol.parseText(fixSpaces(theTranslator->trPackages()));
-// }
-// else
-// {
-// ol.parseText(theTranslator->trNamespaceList());
-// }
-// endQuickIndexItem(ol);
-// }
-// if (hierarchyClasses>0)
-// {
-// startQuickIndexItem(ol,extLink,"hierarchy"+Doxygen::htmlFileExtension,
-// hli==HLI_Hierarchy,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trClassHierarchy()));
-// endQuickIndexItem(ol);
-// }
-// if (annotatedClasses>0)
-// {
-// if (Config_getBool("ALPHABETICAL_INDEX"))
-// {
-// startQuickIndexItem(ol,extLink,"classes"+Doxygen::htmlFileExtension,
-// hli==HLI_Classes,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trAlphabeticalList()));
-// endQuickIndexItem(ol);
-// }
-// if (!compact) ol.writeListItem();
-// startQuickIndexItem(ol,extLink,"annotated"+Doxygen::htmlFileExtension,
-// hli==HLI_Annotated,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trCompoundList()));
-// endQuickIndexItem(ol);
-// }
-// if (documentedHtmlFiles>0)
-// {
-// startQuickIndexItem(ol,extLink,"files"+Doxygen::htmlFileExtension,
-// hli==HLI_Files,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trFileList()));
-// endQuickIndexItem(ol);
-// }
-// if (documentedNamespaceMembers[NMHL_All]>0)
-// {
-// startQuickIndexItem(ol,extLink,"namespacemembers"+Doxygen::htmlFileExtension,
-// hli==HLI_NamespaceMembers,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trNamespaceMembers()));
-// endQuickIndexItem(ol);
-// }
-// if (documentedClassMembers[CMHL_All]>0)
-// {
-// startQuickIndexItem(ol,extLink,"functions"+Doxygen::htmlFileExtension,
-// hli==HLI_Functions,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trCompoundMembers()));
-// endQuickIndexItem(ol);
-// }
-// if (documentedFileMembers[FMHL_All]>0)
-// {
-// startQuickIndexItem(ol,extLink,"globals"+Doxygen::htmlFileExtension,
-// hli==HLI_Globals,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trFileMembers()));
-// endQuickIndexItem(ol);
-// }
-// if (indexedPages>0)
-// {
-// startQuickIndexItem(ol,extLink,"pages"+Doxygen::htmlFileExtension,
-// hli==HLI_Pages,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trRelatedPages()));
-// endQuickIndexItem(ol);
-// }
-// if (Doxygen::exampleSDict->count()>0)
-// {
-// startQuickIndexItem(ol,extLink,"examples"+Doxygen::htmlFileExtension,
-// hli==HLI_Examples,compact,first);
-// ol.parseText(fixSpaces(theTranslator->trExamples()));
-// endQuickIndexItem(ol);
-// }
-// if (Config_getBool("SEARCHENGINE"))
-// {
-// //startQuickIndexItem(ol,"_cgi","",hli==HLI_Search,compact,first);
-// //ol.parseText(fixSpaces(theTranslator->trSearch()));
-// //endQuickIndexItem(ol);
-// ol.writeString(" | <span class=\"search\"><u>S</u>earch for "
-// "<input class=\"search\" type=\"text\" name=\"query\" value=\"\" size=\"30\" accesskey=\"s\"/>"
-// "</span>");
-// }
-// if (compact)
-// {
-// ol.writeString("</div>\n");
-// }
-// else
-// {
-// ol.endItemList();
-// }
-// ol.popGeneratorState();
-//}
void startTitle(OutputList &ol,const char *fileName)
{
@@ -830,6 +696,12 @@ void writeGraphicalClassHierarchy(OutputList &ol)
//----------------------------------------------------------------------------
+static bool nameIsOk(FileDef *fd)
+{
+ return fd->name().right(4)!=".doc" &&
+ fd->name().right(4)!=".txt" &&
+ fd->name().right(4)!=".dox";
+}
void countFiles(int &htmlFiles,int &files)
{
@@ -845,8 +717,7 @@ void countFiles(int &htmlFiles,int &files)
{
bool doc = fd->isLinkableInProject();
bool src = fd->generateSourceFile();
- bool nameOk = fd->name().right(4)!=".doc" &&
- fd->name().right(4)!=".txt";
+ bool nameOk = nameIsOk(fd);
if (nameOk)
{
if (doc || src)
@@ -952,8 +823,7 @@ void writeFileIndex(OutputList &ol)
//printf("Found filedef %s\n",fd->name().data());
bool doc = fd->isLinkableInProject();
bool src = fd->generateSourceFile();
- bool nameOk = fd->name().right(4)!=".doc" &&
- fd->name().right(4)!=".txt";
+ bool nameOk = nameIsOk(fd);
if (nameOk && (doc || src) &&
!fd->isReference())
{
@@ -2587,6 +2457,24 @@ int countGroups()
return count;
}
+//----------------------------------------------------------------------------
+
+int countDirs()
+{
+ int count=0;
+ SDict<DirDef>::Iterator dli(Doxygen::directories);
+ DirDef *dd;
+ for (dli.toFirst();(dd=dli.current());++dli)
+ {
+ if (dd->isLinkableInProject())
+ {
+ dd->visited=FALSE;
+ count++;
+ }
+ }
+ return count;
+}
+
//----------------------------------------------------------------------------
@@ -2650,7 +2538,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
bool hasSubGroups = gd->groupList->count()>0;
bool hasSubPages = gd->pageDict->count()>0;
int numSubItems = 0;
- if( Config_getBool("TOC_EXPAND"))
+ if ( Config_getBool("TOC_EXPAND"))
{
numSubItems += gd->docDefineMembers.count();
numSubItems += gd->docTypedefMembers.count();
@@ -2666,7 +2554,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
//printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(isDir,gd->groupTitle(),gd->getOutputFileBase());
htmlHelp->incContentsDepth();
@@ -2702,12 +2590,12 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
{
SectionInfo *si=0;
if (!pd->name().isEmpty()) si=Doxygen::sectionDict[pd->name()];
- if(htmlHelp) htmlHelp->addContentsItem(FALSE,
+ if (htmlHelp) htmlHelp->addContentsItem(FALSE,
convertToHtml(pd->title()),
gd->getOutputFileBase(),
si ? si->label.data() : 0
);
- if(ftvHelp) ftvHelp->addContentsItem(FALSE,
+ if (ftvHelp) ftvHelp->addContentsItem(FALSE,
gd->getReference(),
gd->getOutputFileBase(),
si ? si->label.data() : 0,
@@ -2764,23 +2652,23 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
if (first)
{
first=FALSE;
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(TRUE, convertToHtml(pMemInfo->name), gd->getOutputFileBase(),0);
htmlHelp->incContentsDepth();
}
- if(ftvHelp)
+ if (ftvHelp)
{
ftvHelp->addContentsItem(TRUE, gd->getReference(), gd->getOutputFileBase(), 0, pMemInfo->name);
ftvHelp->incContentsDepth();
}
}
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(FALSE,md->name(),md->getOutputFileBase(),md->anchor());
}
- if(ftvHelp)
+ if (ftvHelp)
{
ftvHelp->addContentsItem(FALSE,md->getReference(),md->getOutputFileBase(),md->anchor(),md->name());
}
@@ -2788,8 +2676,8 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
md=members->next();
}
- if(htmlHelp && !first) htmlHelp->decContentsDepth();
- if(ftvHelp && !first) ftvHelp->decContentsDepth();
+ if (htmlHelp && !first) htmlHelp->decContentsDepth();
+ if (ftvHelp && !first) ftvHelp->decContentsDepth();
}
}
@@ -2798,13 +2686,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
NamespaceList *namespaceList=gd->namespaceList;
if (namespaceList->count()>0)
{
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(TRUE, convertToHtml(theTranslator->trNamespaces()), gd->getOutputFileBase(), 0);
htmlHelp->incContentsDepth();
}
- if(ftvHelp)
+ if (ftvHelp)
{
ftvHelp->addContentsItem(TRUE, gd->getReference(), gd->getOutputFileBase(), 0, theTranslator->trNamespaces());
@@ -2814,11 +2702,11 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
NamespaceDef *nsd=namespaceList->first();
while (nsd)
{
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(FALSE, convertToHtml(nsd->name()), nsd->getOutputFileBase());
}
- if(ftvHelp)
+ if (ftvHelp)
{
ftvHelp->addContentsItem(FALSE, nsd->getReference(), nsd->getOutputFileBase(), 0, convertToHtml(nsd->name()));
}
@@ -2831,13 +2719,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
// write classes
if (gd->classSDict->count()>0)
{
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(TRUE, convertToHtml(theTranslator->trClasses()), gd->getOutputFileBase(), 0);
htmlHelp->incContentsDepth();
}
- if(ftvHelp)
+ if (ftvHelp)
{
ftvHelp->addContentsItem(TRUE, gd->getReference(), gd->getOutputFileBase(), 0, theTranslator->trClasses());
@@ -2859,15 +2747,15 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
}
//writeClassTree(gd->classSDict,1);
- if(htmlHelp) htmlHelp->decContentsDepth();
- if(ftvHelp) ftvHelp->decContentsDepth();
+ if (htmlHelp) htmlHelp->decContentsDepth();
+ if (ftvHelp) ftvHelp->decContentsDepth();
}
// write file list
FileList *fileList=gd->fileList;
if (fileList->count()>0)
{
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(TRUE,
convertToHtml(theTranslator->trFile(TRUE,FALSE)),
@@ -2875,7 +2763,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
htmlHelp->incContentsDepth();
}
- if(ftvHelp)
+ if (ftvHelp)
{
ftvHelp->addContentsItem(TRUE, gd->getReference(),
@@ -2887,28 +2775,28 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
FileDef *fd=fileList->first();
while (fd)
{
- if(htmlHelp)
+ if (htmlHelp)
htmlHelp->addContentsItem(FALSE,convertToHtml(fd->name()),fd->getOutputFileBase());
- if(ftvHelp)
+ if (ftvHelp)
ftvHelp->addContentsItem(FALSE, fd->getReference(), fd->getOutputFileBase(), 0, convertToHtml(fd->name()));
fd=fileList->next();
}
- if(htmlHelp)
+ if (htmlHelp)
htmlHelp->decContentsDepth();
- if(ftvHelp)
+ if (ftvHelp)
ftvHelp->decContentsDepth();
}
// write examples
if (gd->exampleDict->count()>0)
{
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(TRUE, convertToHtml(theTranslator->trExamples()), gd->getOutputFileBase(), 0);
htmlHelp->incContentsDepth();
}
- if(ftvHelp)
+ if (ftvHelp)
{
ftvHelp->addContentsItem(TRUE, gd->getReference(), gd->getOutputFileBase(), 0, theTranslator->trExamples());
ftvHelp->incContentsDepth();
@@ -2918,11 +2806,11 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
PageDef *pd=eli.toFirst();
while (pd)
{
- if(htmlHelp)
+ if (htmlHelp)
{
htmlHelp->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase());
}
- if(ftvHelp)
+ if (ftvHelp)
{
ftvHelp->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pd->name());
}
@@ -2954,6 +2842,121 @@ void writeGroupHierarchy(OutputList &ol)
}
//----------------------------------------------------------------------------
+void writeDirTreeNode(OutputList &ol, DirDef *dd,int level)
+{
+ HtmlHelp *htmlHelp=0;
+ FTVHelp *ftvHelp = 0;
+ if (level>20)
+ {
+ warn(dd->getDefFileName(),dd->getDefLine(),
+ "Warning: maximum nesting level exceeded for directory %s: "
+ "check for possible recursive directory relation!\n",dd->name().data()
+ );
+ return;
+ }
+ bool &generateHtml = Config_getBool("GENERATE_HTML") ;
+ bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
+ bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
+ if (hasHtmlHelp)
+ {
+ htmlHelp = HtmlHelp::getInstance();
+ }
+ if (hasFtvHelp)
+ {
+ ftvHelp = FTVHelp::getInstance();
+ }
+
+ bool isDir = TRUE;
+ //printf("gd=`%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
+ if (htmlHelp)
+ {
+ htmlHelp->addContentsItem(isDir,dd->displayName(),dd->getOutputFileBase());
+ htmlHelp->incContentsDepth();
+ }
+ if (ftvHelp)
+ {
+ ftvHelp->addContentsItem(isDir,dd->getReference(),dd->getOutputFileBase(),
+ 0,dd->displayName());
+ ftvHelp->incContentsDepth();
+ }
+
+ ol.writeIndexItem(dd->getReference(),dd->getOutputFileBase(),dd->shortName());
+ if (dd->isReference())
+ {
+ ol.startTypewriter();
+ ol.docify(" [external]");
+ ol.endTypewriter();
+ }
+
+ // write subgroups
+ if (dd->subDirs().count()>0)
+ {
+ startIndexHierarchy(ol,level+1);
+ QListIterator<DirDef> dli(dd->subDirs());
+ DirDef *subdd = 0;
+ for (dli.toFirst();(subdd=dli.current());++dli)
+ {
+ writeDirTreeNode(ol,subdd,level+1);
+ }
+ endIndexHierarchy(ol,level+1);
+ }
+
+ if (Config_getBool("TOC_EXPAND"))
+ {
+ // write file list
+ FileList *fileList=dd->getFiles();
+ if (fileList && fileList->count()>0)
+ {
+ if (htmlHelp)
+ {
+ htmlHelp->addContentsItem(TRUE,
+ convertToHtml(theTranslator->trFile(TRUE,FALSE)),
+ dd->getOutputFileBase(), 0);
+ htmlHelp->incContentsDepth();
+ }
+
+ if (ftvHelp)
+ {
+
+ ftvHelp->addContentsItem(TRUE, dd->getReference(),
+ dd->getOutputFileBase(), 0,
+ theTranslator->trFile(TRUE,FALSE));
+ ftvHelp->incContentsDepth();
+ }
+
+ FileDef *fd=fileList->first();
+ while (fd)
+ {
+ if (htmlHelp)
+ htmlHelp->addContentsItem(FALSE,convertToHtml(fd->name()),fd->getOutputFileBase());
+ if (ftvHelp)
+ ftvHelp->addContentsItem(FALSE, fd->getReference(), fd->getOutputFileBase(), 0, convertToHtml(fd->name()));
+ fd=fileList->next();
+ }
+ if (htmlHelp)
+ htmlHelp->decContentsDepth();
+ if (ftvHelp)
+ ftvHelp->decContentsDepth();
+ }
+ }
+
+ if (htmlHelp) htmlHelp->decContentsDepth();
+ if (ftvHelp) ftvHelp->decContentsDepth();
+}
+
+void writeDirHierarchy(OutputList &ol)
+{
+ startIndexHierarchy(ol,0);
+ SDict<DirDef>::Iterator dli(Doxygen::directories);
+ DirDef *dd;
+ for (dli.toFirst();(dd=dli.current());++dli)
+ {
+ if (dd->getOuterScope()==Doxygen::globalScope) writeDirTreeNode(ol,dd,0);
+ }
+ endIndexHierarchy(ol,0);
+}
+
+//----------------------------------------------------------------------------
#if 0
void writeGroupList(OutputList &ol)
@@ -2990,7 +2993,7 @@ void writeGroupList(OutputList &ol)
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
- if(!Config::instance()->get(""))
+ if (!Config::instance()->get(""))
{
htmlHelp->addContentsItem(FALSE,gd->groupTitle(),docFile);
}
@@ -2998,7 +3001,7 @@ void writeGroupList(OutputList &ol)
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
- if(!Config::instance()->get(""))
+ if (!Config::instance()->get(""))
{
ftvHelp->addContentsItem(FALSE,gd->groupTitle(),docFile);
}
@@ -3059,6 +3062,59 @@ void writeGroupIndex(OutputList &ol)
//----------------------------------------------------------------------------
+void writeDirIndex(OutputList &ol)
+{
+ if (documentedDirs==0) return;
+ ol.pushGeneratorState();
+ ol.disable(OutputGenerator::Man);
+ startFile(ol,"dirs",0,theTranslator->trDirIndex().data(),HLI_Directories);
+ startTitle(ol,0);
+ QCString title = theTranslator->trDirectories();
+ QCString htmlHelpTitle = title;
+ QCString ftvHelpTitle = title;
+ if (!Config_getString("PROJECT_NAME").isEmpty())
+ {
+ title.prepend(Config_getString("PROJECT_NAME")+" ");
+ }
+ ol.parseText(title);
+ endTitle(ol,0,0);
+ ol.startTextBlock();
+ HtmlHelp *htmlHelp = 0;
+ FTVHelp *ftvHelp = 0;
+ bool &generateHtml = Config_getBool("GENERATE_HTML") ;
+ bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
+ bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
+ if (hasHtmlHelp)
+ {
+ htmlHelp = HtmlHelp::getInstance();
+ htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"dirs");
+ htmlHelp->incContentsDepth();
+ }
+ if (hasFtvHelp)
+ {
+ ftvHelp = FTVHelp::getInstance();
+ ftvHelp->addContentsItem(TRUE,0,"dirs",0,ftvHelpTitle);
+ ftvHelp->incContentsDepth();
+ }
+ ol.parseText(theTranslator->trDirDescription());
+ ol.endTextBlock();
+
+ writeDirHierarchy(ol);
+
+ if (hasHtmlHelp)
+ {
+ htmlHelp->decContentsDepth();
+ }
+ if (hasFtvHelp)
+ {
+ ftvHelp->decContentsDepth();
+ }
+ endFile(ol);
+ ol.popGeneratorState();
+}
+
+//----------------------------------------------------------------------------
+
static bool mainPageHasTitle()
{
if (Doxygen::mainPage==0) return FALSE;
@@ -3219,6 +3275,12 @@ void writeIndex(OutputList &ol)
ol.parseText(projPrefix+theTranslator->trModuleIndex());
ol.endIndexSection(isModuleIndex);
}
+ if (Config_getBool("SHOW_DIRECTORIES") && documentedDirs>0)
+ {
+ ol.startIndexSection(isDirIndex);
+ ol.parseText(projPrefix+theTranslator->trDirIndex());
+ ol.endIndexSection(isDirIndex);
+ }
if (documentedNamespaces>0)
{
ol.startIndexSection(isNamespaceIndex);
@@ -3257,6 +3319,12 @@ void writeIndex(OutputList &ol)
ol.parseText(projPrefix+theTranslator->trModuleDocumentation());
ol.endIndexSection(isModuleDocumentation);
}
+ if (Config_getBool("SHOW_DIRECTORIES") && documentedDirs>0)
+ {
+ ol.startIndexSection(isDirDocumentation);
+ ol.parseText(projPrefix+theTranslator->trDirDocumentation());
+ ol.endIndexSection(isDirDocumentation);
+ }
if (documentedNamespaces>0)
{
ol.startIndexSection(isNamespaceDocumentation);
diff --git a/src/index.h b/src/index.h
index 469d75a..f6cf48d 100644
--- a/src/index.h
+++ b/src/index.h
@@ -26,15 +26,15 @@ enum IndexSections
isTitlePageStart,
isTitlePageAuthor,
isMainPage,
-// isPackageIndex,
isModuleIndex,
+ isDirIndex,
isNamespaceIndex,
isClassHierarchyIndex,
isCompoundIndex,
isFileIndex,
isPageIndex,
-// isPackageDocumentation,
isModuleDocumentation,
+ isDirDocumentation,
isNamespaceDocumentation,
isClassDocumentation,
isFileDocumentation,
@@ -61,6 +61,7 @@ void writeExampleIndex(OutputList &ol);
void writePageIndex(OutputList &ol);
void writeFileMemberIndex(OutputList &ol);
void writeGroupIndex(OutputList &ol);
+void writeDirIndex(OutputList &ol);
void writeNamespaceIndex(OutputList &ol);
void writeNamespaceMemberIndex(OutputList &ol);
void writeGraphicalClassHierarchy(OutputList &ol);
@@ -74,6 +75,7 @@ enum HighlightedItem
HLI_None=0,
HLI_Main,
HLI_Modules,
+ HLI_Directories,
HLI_Namespaces,
HLI_Hierarchy,
HLI_Classes,
@@ -148,6 +150,7 @@ extern int documentedFileMembers[FMHL_Total];
extern int documentedNamespaceMembers[NMHL_Total];
extern int documentedHtmlFiles;
extern int documentedPages;
+extern int documentedDirs;
void startTitle(OutputList &ol,const char *fileName);
void endTitle(OutputList &ol,const char *fileName,const char *name);
diff --git a/src/index.xsd b/src/index.xsd
index 1e214fa..0e145c1 100644
--- a/src/index.xsd
+++ b/src/index.xsd
@@ -40,6 +40,7 @@
<xsd:enumeration value="group"/>
<xsd:enumeration value="page"/>
<xsd:enumeration value="example"/>
+ <xsd:enumeration value="dir"/>
</xsd:restriction>
</xsd:simpleType>
diff --git a/src/index_xsd.h b/src/index_xsd.h
index f947a8a..6a3b3da 100644
--- a/src/index_xsd.h
+++ b/src/index_xsd.h
@@ -40,6 +40,7 @@
" <xsd:enumeration value=\"group\"/>\n"
" <xsd:enumeration value=\"page\"/>\n"
" <xsd:enumeration value=\"example\"/>\n"
+" <xsd:enumeration value=\"dir\"/>\n"
" </xsd:restriction>\n"
" </xsd:simpleType>\n"
"\n"
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 761a209..fed312d 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -31,6 +31,7 @@
#include "pagedef.h"
#include "docparser.h"
#include "latexdocvisitor.h"
+#include "dirdef.h"
//static QCString filterTitle(const char *s)
//{
@@ -102,6 +103,7 @@ LatexGenerator::LatexGenerator() : OutputGenerator()
insideTabbing=FALSE;
firstDescItem=TRUE;
insidePre=FALSE;
+ m_indent=0;
}
LatexGenerator::~LatexGenerator()
@@ -501,6 +503,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Index}\n"
break;
+ case isDirIndex:
+ if (compactLatex) t << "\\section"; else t << "\\chapter";
+ t << "{"; //Directory Index}\n"
+ break;
case isNamespaceIndex:
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Namespace Index}\"
@@ -537,6 +543,22 @@ void LatexGenerator::startIndexSection(IndexSections is)
}
}
break;
+ case isDirDocumentation:
+ {
+ SDict<DirDef>::Iterator dli(Doxygen::directories);
+ DirDef *dd;
+ bool found=FALSE;
+ for (dli.toFirst();(dd=dli.current()) && !found;++dli)
+ {
+ if (dd->isLinkableInProject())
+ {
+ if (compactLatex) t << "\\section"; else t << "\\chapter";
+ t << "{"; //Module Documentation}\n";
+ found=TRUE;
+ }
+ }
+ }
+ break;
case isNamespaceDocumentation:
{
NamespaceSDict::Iterator nli(Doxygen::namespaceSDict);
@@ -637,6 +659,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isModuleIndex:
t << "}\n\\input{modules}\n";
break;
+ case isDirIndex:
+ t << "}\n\\input{dirs}\n";
+ break;
case isNamespaceIndex:
t << "}\n\\input{namespaces}\n";
break;
@@ -675,6 +700,29 @@ void LatexGenerator::endIndexSection(IndexSections is)
}
}
break;
+ case isDirDocumentation:
+ {
+ SDict<DirDef>::Iterator dli(Doxygen::directories);
+ DirDef *dd;
+ bool found=FALSE;
+ for (dli.toFirst();(dd=dli.current()) && !found;++dli)
+ {
+ if (dd->isLinkableInProject())
+ {
+ t << "}\n\\input{" << dd->getOutputFileBase() << "}\n";
+ found=TRUE;
+ }
+ }
+ for (;(dd=dli.current());++dli)
+ {
+ if (dd->isLinkableInProject())
+ {
+ if (compactLatex) t << "\\input"; else t << "\\include";
+ t << "{" << dd->getOutputFileBase() << "}\n";
+ }
+ }
+ }
+ break;
case isNamespaceDocumentation:
{
NamespaceSDict::Iterator nli(Doxygen::namespaceSDict);
@@ -1321,10 +1369,39 @@ void LatexGenerator::endMemberItem()
t << endl;
}
+void LatexGenerator::startMemberDescription()
+{
+ if (!insideTabbing)
+ {
+ t << "\\begin{CompactList}\\small\\item\\em ";
+ }
+ else
+ {
+ for (int i=0;i<m_indent+1;i++) t << "\\>";
+ t << "{\\em ";
+ }
+}
+
+void LatexGenerator::endMemberDescription()
+{
+ if (!insideTabbing)
+ {
+ t << "\\item\\end{CompactList}";
+ }
+ else
+ {
+ t << "}\\\\";
+ }
+}
+
+
void LatexGenerator::writeNonBreakableSpace(int)
{
if (insideTabbing)
+ {
t << "\\>";
+ m_indent++;
+ }
else
t << "\\ ";
}
diff --git a/src/latexgen.h b/src/latexgen.h
index 08f3ad0..6506794 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -49,7 +49,6 @@ class LatexGenerator : public OutputGenerator
void endFile();
void clearBuffer();
- //void writeIndex();
void startIndexSection(IndexSections);
void endIndexSection(IndexSections);
void startProjectNumber();
@@ -70,11 +69,6 @@ class LatexGenerator : public OutputGenerator
void endIndexValue(const char *,bool);
void startItemList() { t << "\\begin{CompactItemize}" << endl; }
void endItemList() { t << "\\end{CompactItemize}" << endl; }
- //void startEnumList() { t << "\\begin{enumerate}" << endl; }
- //void endEnumList() { t << "\\end{enumerate}" << endl; }
- //void startAlphabeticalIndexList() {}
- //void endAlphabeticalIndexList() {}
- //void writeIndexHeading(const char *) {}
void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text);
void codify(const char *text);
@@ -86,7 +80,6 @@ class LatexGenerator : public OutputGenerator
void endTextLink();
void startHtmlLink(const char *url);
void endHtmlLink();
- //void writeMailLink(const char *url);
void startTypewriter() { t << "{\\tt "; }
void endTypewriter() { t << "}"; }
void startGroupHeader();
@@ -119,19 +112,9 @@ class LatexGenerator : public OutputGenerator
void writeAnchor(const char *fileName,const char *name);
void startCodeFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; }
void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
- //void startPreFragment() { t << "\\small\\begin{alltt}";
- // insidePre=TRUE;
- // }
- //void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl;
- // insidePre=FALSE;
- // }
- //void startVerbatimFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; }
- //void endVerbatimFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); }
- //void writeBoldString(const char *text)
- // { t << "{\\bf "; docify(text); t << "}"; }
void startEmphasis() { t << "{\\em "; }
void endEmphasis() { t << "}"; }
void startBold() { t << "{\\bf "; }
@@ -149,7 +132,6 @@ class LatexGenerator : public OutputGenerator
void endCodeAnchor() {}
void writeChar(char c);
void writeLatexSpacing() { t << "\\hspace{0.3cm}"; }
- //void writeLatexLabel(const char *scope,const char *anchor);
void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name);
void writeEndAnnoItem(const char *name);
@@ -161,87 +143,27 @@ class LatexGenerator : public OutputGenerator
void endCenter() { t << "\\end{center}" << endl; }
void startSmall() { t << "\\footnotesize "; }
void endSmall() { t << "\\normalsize "; }
- //void startSubscript() { t << "$_{\\mbox{"; }
- //void endSubscript() { t << "}}$"; }
- //void startSuperscript() { t << "$^{\\mbox{"; }
- //void endSuperscript() { t << "}}$"; }
- //void startTable(bool hasCaption,int c)
- // {
- // if (hasCaption) t << "\\begin{table}[h]";
- // t << "\\begin{TabularC}{" << c << "}\n\\hline\n";
- // }
- //void endTable(bool hasCaption)
- // {
- // if (hasCaption)
- // {
- // t << "\\end{table}\n";
- // }
- // else
- // {
- // t << "\\\\\\hline\n\\end{TabularC}\n";
- // }
- // }
- //void startCaption() { t << "\\\\\\hline\n\\end{TabularC}\n"
- // "\\centering\n\\caption{";
- // }
- //void endCaption() { t << "}\n"; }
- //void nextTableRow() {}
- //void endTableRow() { t << "\\\\\\hline\n"; }
- //void nextTableColumn() { t << "&"; }
- //void endTableColumn() {}
- //void writeCopyright() { t << "\\copyright"; }
- //void writeQuote() { t << "''"; }
- //void writeUmlaut(char c) { if (c=='i') t << "\\\"{\\i}"; else
- // t << "\\\"{" << c << "}";
- // }
- //void writeAcute(char c) { if (c=='i') t << "\\'{\\i}"; else
- // t << "\\'{" << c << "}";
- // }
- //void writeGrave(char c) { if (c=='i') t << "\\`{\\i}"; else
- // t << "\\`{" << c << "}";
- // }
- //void writeCirc(char c) { if (c=='i') t << "\\^{\\i}"; else
- // t << "\\^{" << c << "}";
- // }
- //void writeTilde(char c) { t << "\\~{" << c << "}"; }
- //void writeRing(char c) { t << "\\" << c << c; }
- //void writeSharpS() { t << "\"s"; }
- //void writeCCedil(char c) { t << "\\c{" << c << "}"; }
- void startMemberDescription() { t << "\\begin{CompactList}\\small\\item\\em "; }
- void endMemberDescription() { t << "\\item\\end{CompactList}"; }
+ void startMemberDescription();
+ void endMemberDescription();
void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
void endDescList() { t << "\\end{Desc}" << endl; }
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
void endSimpleSect();
void startParamList(ParamListTypes,const char *title);
void endParamList();
- //void endDescTitle() { t << "]"; }
void writeDescItem() { t << "\\par" << endl; }
void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType);
- //void writeSectionRef(const char *,const char *,const char *,const char *);
- //void writeSectionRefItem(const char *,const char *,const char *);
- //void writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *);
void startIndent() {}
void endIndent() {}
void writeSynopsis() {}
- //void generateExternalIndex() {}
void startClassDiagram();
void endClassDiagram(ClassDiagram &,const char *,const char *);
- //void startColorFont(uchar,uchar,uchar) {}
- //void endColorFont() {}
void startPageRef();
void endPageRef(const char *,const char *);
- //void startQuickIndexItem(const char *,const char *) {}
- //void endQuickIndexItem() {}
void writeQuickLinks(bool,HighlightedItem) {}
- //void writeFormula(const char *,const char *);
void writeNonBreakableSpace(int);
- //void startImage(const char *,const char *,bool);
- //void endImage(bool);
- //void startDotFile(const char *,bool);
- //void endDotFile(bool);
void startDescTable()
{ t << "\\begin{description}" << endl; }
@@ -255,8 +177,6 @@ class LatexGenerator : public OutputGenerator
void endDescTableData() {}
void lastIndexPage() {}
- //static void docifyStatic(QTextStream &t,const char *str);
-
void startDotGraph();
void endDotGraph(DotClassGraph &);
void startInclDepGraph();
@@ -282,14 +202,6 @@ class LatexGenerator : public OutputGenerator
void startFontClass(const char *) {}
void endFontClass() {}
- //void startHtmlOnly() {}
- //void endHtmlOnly() {}
- //void startLatexOnly() {}
- //void endLatexOnly() {}
-
- //void startSectionRefList();
- //void endSectionRefList();
-
void writeCodeAnchor(const char *) {}
private:
@@ -300,6 +212,7 @@ class LatexGenerator : public OutputGenerator
bool firstDescItem;
bool insidePre;
QCString relPath;
+ int m_indent;
};
#endif
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 261355e..248e9b9 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -272,7 +272,6 @@ FORALL1(SectionTypes a1,a1)
FORALL1(bool a1,a1)
FORALL2(bool a1,int a2,a1,a2)
FORALL2(bool a1,bool a2,a1,a2)
-FORALL3(bool a1,bool a2,bool a3,a1,a2,a3)
FORALL4(const char *a1,const char *a2,const char *a3,bool a4,a1,a2,a3,a4)
#endif
FORALL2(int a1,bool a2,a1,a2)
@@ -283,6 +282,7 @@ FORALL1(IndexSections a1,a1)
FORALL2(const char *a1,const char *a2,a1,a2)
FORALL2(const char *a1,bool a2,a1,a2)
FORALL2(const char *a1,SectionInfo::SectionType a2,a1,a2)
+FORALL3(bool a1,bool a2,bool a3,a1,a2,a3)
FORALL3(ClassDiagram &a1,const char *a2,const char *a3,a1,a2,a3)
FORALL3(const char *a1,const char *a2,const char *a3,a1,a2,a3)
FORALL3(const char *a1,const char *a2,bool a3,a1,a2,a3)
diff --git a/src/outputlist.h b/src/outputlist.h
index 68a8c10..ffd4c51 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -389,7 +389,6 @@ class OutputList : public OutputDocInterface
FORALLPROTO1(bool);
FORALLPROTO2(bool,int);
FORALLPROTO2(bool,bool);
- FORALLPROTO3(bool,bool,bool);
FORALLPROTO4(const char *,const char *,const char *,int);
#endif
FORALLPROTO2(int,bool);
@@ -399,6 +398,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO2(const char *,const char *);
FORALLPROTO2(const char *,bool);
FORALLPROTO2(const char *,SectionInfo::SectionType);
+ FORALLPROTO3(bool,bool,bool);
FORALLPROTO3(const char *,const char *,bool);
FORALLPROTO3(const char *,const char *,SectionInfo::SectionType);
FORALLPROTO3(uchar,uchar,uchar);
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 87fda60..73e24e4 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -36,6 +36,7 @@
#include "rtfstyle.h"
#include "rtfdocvisitor.h"
#include "docparser.h"
+#include "dirdef.h"
//#define DBG_RTF(x) x;
#define DBG_RTF(x)
@@ -388,6 +389,10 @@ void RTFGenerator::startIndexSection(IndexSections is)
//Module Index
beginRTFChapter();
break;
+ case isDirIndex:
+ //Directory Index
+ beginRTFChapter();
+ break;
case isNamespaceIndex:
//Namespace Index
beginRTFChapter();
@@ -409,21 +414,6 @@ void RTFGenerator::startIndexSection(IndexSections is)
//Related Page Index
beginRTFChapter();
break;
- //case isPackageDocumentation:
- // {
- // //Package Documentation
- // PackageSDict::Iterator pdi(Doxygen::packageDict);
- // PackageDef *pd=pdi.toFirst();
- // bool found=FALSE;
- // while (pd && !found)
- // {
- // beginRTFChapter();
- // found=TRUE;
- // ++pdi;
- // pd=pdi.current();
- // }
- // }
- // break;
case isModuleDocumentation:
{
//Module Documentation
@@ -440,6 +430,22 @@ void RTFGenerator::startIndexSection(IndexSections is)
}
}
break;
+ case isDirDocumentation:
+ {
+ //Directory Documentation
+ SDict<DirDef>::Iterator dli(Doxygen::directories);
+ DirDef *dd;
+ bool found=FALSE;
+ for (dli.toFirst();(dd=dli.current()) && !found;++dli)
+ {
+ if (dd->isLinkableInProject())
+ {
+ beginRTFChapter();
+ found=TRUE;
+ }
+ }
+ }
+ break;
case isNamespaceDocumentation:
{
// Namespace Documentation
@@ -609,6 +615,11 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "{\\tc \\v " << theTranslator->trModuleIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"modules.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
+ case isDirIndex:
+ t << "\\par " << rtf_Style_Reset << endl;
+ t << "{\\tc \\v " << theTranslator->trDirIndex() << "}"<< endl;
+ t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"dirs.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ break;
case isNamespaceIndex:
t << "\\par " << rtf_Style_Reset << endl;
t << "{\\tc \\v " << theTranslator->trNamespaceIndex() << "}"<< endl;
@@ -634,22 +645,6 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "{\\tc \\v " << theTranslator->trPageIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
- //case isPackageDocumentation:
- // {
- // PackageSDict::Iterator pdi(Doxygen::packageDict);
- // PackageDef *pd=pdi.toFirst();
- // t << "{\\tc \\v " << theTranslator->trPackageDocumentation() << "}"<< endl;
- // while (pd)
- // {
- // t << "\\par " << rtf_Style_Reset << endl;
- // t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- // t << pd->getOutputFileBase();
- // t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
- // ++pdi;
- // pd=pdi.current();
- // }
- // }
- // break;
case isModuleDocumentation:
{
GroupSDict::Iterator gli(Doxygen::groupSDict);
@@ -667,6 +662,23 @@ void RTFGenerator::endIndexSection(IndexSections is)
}
}
break;
+ case isDirDocumentation:
+ {
+ SDict<DirDef>::Iterator dli(Doxygen::directories);
+ DirDef *dd;
+ t << "{\\tc \\v " << theTranslator->trDirDocumentation() << "}"<< endl;
+ for (dli.toFirst();(dd=dli.current());++dli)
+ {
+ if (dd->isLinkableInProject())
+ {
+ t << "\\par " << rtf_Style_Reset << endl;
+ t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
+ t << dd->getOutputFileBase();
+ t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
+ }
+ }
+ }
+ break;
case isNamespaceDocumentation:
{
NamespaceSDict::Iterator nli(Doxygen::namespaceSDict);
diff --git a/src/scanner.l b/src/scanner.l
index 1a4c42d..8fef9b3 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -4225,6 +4225,12 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->startLine = yyLineNr;
BEGIN( FileDocArg1 );
}
+<Doc,LineDoc,JavaDoc>{B}*{CMD}"dir"{B}* {
+ current->section = Entry::DIRDOC_SEC;
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ BEGIN( FileDocArg1 );
+ }
<Doc,JavaDoc>{B}*{CMD}"example"{B}+ {
current->section = Entry::EXAMPLE_SEC;
current->fileName = yyFileName;
@@ -5029,7 +5035,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current_root->addSubEntry(current);
current = new Entry ;
initEntry();
- BEGIN( FindMembers );
+ BEGIN( lastDocContext );
}
}
<PageDoc>"<"{TITLE}">" {
diff --git a/src/translator.h b/src/translator.h
index e819e2b..ef1a363 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -422,6 +422,17 @@ class Translator
virtual QCString trSourceFile(QCString& filename) = 0;
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trDirIndex() = 0;
+ virtual QCString trDirDocumentation() = 0;
+ virtual QCString trDirectories() = 0;
+ virtual QCString trDirDescription() = 0;
+ virtual QCString trDirReference(const char *dirName) = 0;
+ virtual QCString trDir(bool first_capital, bool singular) = 0;
+
};
#endif
diff --git a/src/translator_adapter.h b/src/translator_adapter.h
index 9518721..c32f6dc 100644
--- a/src/translator_adapter.h
+++ b/src/translator_adapter.h
@@ -40,7 +40,27 @@ class TranslatorAdapterBase : public Translator
};
-class TranslatorAdapter_1_3_8 : public TranslatorAdapterBase
+class TranslatorAdapter_1_3_9 : public TranslatorAdapterBase
+{
+ public:
+ virtual QCString updateNeededMessage()
+ { return createUpdateNeededMessage(idLanguage(),"release 1.3.9"); }
+
+ virtual QCString trDirIndex()
+ { return english.trDirIndex(); }
+ virtual QCString trDirDocumentation()
+ { return english.trDirDocumentation(); }
+ virtual QCString trDirectories()
+ { return english.trDirectories(); }
+ virtual QCString trDirDescription()
+ { return english.trDirDescription(); }
+ virtual QCString trDirReference(const char *dirName)
+ { return english.trDirReference(dirName); }
+ virtual QCString trDir(bool first_capital, bool singular)
+ { return english.trDir(first_capital,singular); }
+};
+
+class TranslatorAdapter_1_3_8 : public TranslatorAdapter_1_3_9
{
public:
virtual QCString updateNeededMessage()
diff --git a/src/translator_br.h b/src/translator_br.h
index 8538c92..4ebccad 100644
--- a/src/translator_br.h
+++ b/src/translator_br.h
@@ -32,7 +32,7 @@
#ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H
-class TranslatorBrazilian: public Translator
+class TranslatorBrazilian : public TranslatorAdapter_1_3_9
{
public:
diff --git a/src/translator_cn.h b/src/translator_cn.h
index 41a4ebc..def8228 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -24,7 +24,7 @@
*/
#define CN_SPC
-class TranslatorChinese : public Translator
+class TranslatorChinese : public TranslatorAdapter_1_3_9
{
public:
/*! Used for identification of the language. The identification
diff --git a/src/translator_cz.h b/src/translator_cz.h
index b7f8e7a..79f0945 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -149,7 +149,7 @@
// Windows version. The version which does not call the function is
// probably slightly faster.
-class TranslatorCzech : public Translator
+class TranslatorCzech : public TranslatorAdapter_1_3_9
{
private:
/*! The decode() inline assumes the source written in the
diff --git a/src/translator_de.h b/src/translator_de.h
index 6394f98..1f7d995 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -93,7 +93,7 @@
#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H
-class TranslatorGerman : public Translator
+class TranslatorGerman : public TranslatorAdapter_1_3_9
{
public:
diff --git a/src/translator_dk.h b/src/translator_dk.h
index ea350f1..1176846 100644
--- a/src/translator_dk.h
+++ b/src/translator_dk.h
@@ -72,7 +72,7 @@
#ifndef TRANSLATOR_DK_H
#define TRANSLATOR_DK_H
-class TranslatorDanish : public Translator
+class TranslatorDanish : public TranslatorAdapter_1_3_9
{
public:
diff --git a/src/translator_en.h b/src/translator_en.h
index 3dc27df..e327541 100644
--- a/src/translator_en.h
+++ b/src/translator_en.h
@@ -18,27 +18,28 @@
#ifndef TRANSLATOR_EN_H
#define TRANSLATOR_EN_H
-// When defining a translator class for the new language, follow
-// the description in the documentation. One of the steps says
-// that you should copy the translator_en.h (this) file to your
-// translator_xx.h new file. Your new language should use the
-// Translator class as the base class. This means that you need to
-// implement exactly the same (pure virtual) methods as the
-// TranslatorEnglish does. Because of this, it is a good idea to
-// start with the copy of TranslatorEnglish and replace the strings
-// one by one.
-//
-// It is not necessary to include "translator.h" or
-// "translator_adapter.h" here. The files are included in the
-// language.cpp correctly. Not including any of the mentioned
-// files frees the maintainer from thinking about whether the
-// first, the second, or both files should be included or not, and
-// why. This holds namely for localized translators because their
-// base class is changed occasionaly to adapter classes when the
-// Translator class changes the interface, or back to the
-// Translator class (by the local maintainer) when the localized
-// translator is made up-to-date again.
-
+/*!
+ When defining a translator class for the new language, follow
+ the description in the documentation. One of the steps says
+ that you should copy the translator_en.h (this) file to your
+ translator_xx.h new file. Your new language should use the
+ Translator class as the base class. This means that you need to
+ implement exactly the same (pure virtual) methods as the
+ TranslatorEnglish does. Because of this, it is a good idea to
+ start with the copy of TranslatorEnglish and replace the strings
+ one by one.
+
+ It is not necessary to include "translator.h" or
+ "translator_adapter.h" here. The files are included in the
+ language.cpp correctly. Not including any of the mentioned
+ files frees the maintainer from thinking about whether the
+ first, the second, or both files should be included or not, and
+ why. This holds namely for localized translators because their
+ base class is changed occasionaly to adapter classes when the
+ Translator class changes the interface, or back to the
+ Translator class (by the local maintainer) when the localized
+ translator is made up-to-date again.
+*/
class TranslatorEnglish : public Translator
{
public:
@@ -1555,6 +1556,27 @@ class TranslatorEnglish : public Translator
return filename + " Source File";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trDirIndex()
+ { return "Directories"; }
+ virtual QCString trDirDocumentation()
+ { return "Directory Documentation"; }
+ virtual QCString trDirectories()
+ { return "Directories"; }
+ virtual QCString trDirDescription()
+ { return "Here is a list of all directories:"; }
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result=dirName; result+=" Directory Reference"; return result; }
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Director" : "director"));
+ if (singular) result+="y"; else result+="ies";
+ return result;
+ }
+
};
#endif
diff --git a/src/translator_hr.h b/src/translator_hr.h
index 71304cc..0227f4f 100644
--- a/src/translator_hr.h
+++ b/src/translator_hr.h
@@ -59,7 +59,7 @@
#ifndef TRANSLATOR_HR_H
#define TRANSLATOR_HR_H
-class TranslatorCroatian : public Translator
+class TranslatorCroatian : public TranslatorAdapter_1_3_9
{
private:
/*! to avoid macro redefinition from translator_cz.h */
diff --git a/src/translator_hu.h b/src/translator_hu.h
index 215798b..77c5b33 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -29,10 +29,7 @@
#ifndef TRANSLATOR_HU_H
#define TRANSLATOR_HU_H
-#include "translator.h"
-#include "../qtools/qdatetime.h"
-
-class TranslatorHungarian : public TranslatorAdapter_1_3_8
+class TranslatorHungarian : public TranslatorAdapter_1_3_9
{
private:
const char * zed(char c)
@@ -1518,6 +1515,17 @@ class TranslatorHungarian : public TranslatorAdapter_1_3_8
return "Találatok:";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return filename + " Forrásfájl";
+ }
+
};
#endif
diff --git a/src/translator_it.h b/src/translator_it.h
index a94f54e..9e319c6 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -71,7 +71,7 @@
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
-class TranslatorItalian : public Translator
+class TranslatorItalian : public TranslatorAdapter_1_3_9
{
public:
diff --git a/src/translator_jp.h b/src/translator_jp.h
index ec74b1e..6c376d7 100644
--- a/src/translator_jp.h
+++ b/src/translator_jp.h
@@ -29,7 +29,7 @@
#ifndef TRANSLATOR_JP_H
#define TRANSLATOR_JP_H
-class TranslatorJapanese : public Translator
+class TranslatorJapanese : public TranslatorAdapter_1_3_9
{
private:
/*! The decode() can change euc into sjis */
diff --git a/src/translator_nl.h b/src/translator_nl.h
index 11d5ddc..12348cd 100644
--- a/src/translator_nl.h
+++ b/src/translator_nl.h
@@ -18,7 +18,7 @@
#ifndef TRANSLATOR_NL_H
#define TRANSLATOR_NL_H
-class TranslatorDutch : public Translator
+class TranslatorDutch : public TranslatorAdapter_1_3_9
{
public:
QCString idLanguage()
diff --git a/src/translator_no.h b/src/translator_no.h
index 1fcadc1..09a43fb 100644
--- a/src/translator_no.h
+++ b/src/translator_no.h
@@ -41,7 +41,7 @@
#ifndef TRANSLATOR_NO_H
#define TRANSLATOR_NO_H
-class TranslatorNorwegian : public Translator
+class TranslatorNorwegian : public TranslatorAdapter_1_3_9
{
public:
diff --git a/src/translator_pl.h b/src/translator_pl.h
index 278f747..3186ead 100644
--- a/src/translator_pl.h
+++ b/src/translator_pl.h
@@ -13,14 +13,14 @@
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
- * Polish translation was updated to version 1.3 by
+ * Polish translation was updated to version 1.3.8 by
* Piotr Kaminski (Piotr.Kaminski@ctm.gdynia.pl)
*/
#ifndef TRANSLATOR_PL_H
#define TRANSLATOR_PL_H
-class TranslatorPolish : public TranslatorAdapter_1_3
+class TranslatorPolish : public TranslatorAdapter_1_3_9
{
private:
/*! to avoid macro redefinition from translator_pl.h */
@@ -57,9 +57,6 @@ class TranslatorPolish : public TranslatorAdapter_1_3
{
return "\\usepackage{polski} \\usepackage[latin2]{inputenc} \\usepackage[T1]{fontenc}";
}
- /*! returns the name of the package that is included by LaTeX */
- QCString latexBabelPackage()
- { return "polish"; }
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
@@ -154,12 +151,6 @@ class TranslatorPolish : public TranslatorAdapter_1_3
/*! put after an undocumented member in the list of all members */
QCString trDefinedIn()
{ return "zdefiniowana w"; }
-
- /*! put as in introduction in the verbatim header file of a class.
- * parameter f is the name of the include file.
- */
- QCString trVerbatimText(const char *f)
- { return (QCString)decode("Tutaj znajduje się zawartość pliku nagłówkowego ")+f+"."; }
// quick reference sections
@@ -472,10 +463,6 @@ class TranslatorPolish : public TranslatorAdapter_1_3
QCString trEnumerationValues()
{ return decode("Wartości wyliczeń"); }
- /*! This is used in man pages as the author section. */
- QCString trAuthor()
- { return "Autor"; }
-
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
@@ -533,12 +520,6 @@ class TranslatorPolish : public TranslatorAdapter_1_3
}
}
- /*! This is used in the documentation of a group before the list of
- * links to documented files
- */
- QCString trFiles()
- { return "Pliki"; }
-
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
@@ -586,10 +567,6 @@ class TranslatorPolish : public TranslatorAdapter_1_3
QCString trDate()
{ return "Data"; }
- /*! this text is generated when the \\author command is used. */
- QCString trAuthors()
- { return "Autorzy"; }
-
/*! this text is generated when the \\return command is used. */
QCString trReturns()
{ return "Zwraca"; }
@@ -1410,6 +1387,130 @@ class TranslatorPolish : public TranslatorAdapter_1_3
return decode("Dokumentacja zdarzeń");
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a heading for a list of Java class types with package scope.
+ */
+ virtual QCString trPackageTypes()
+ {
+ return "Typy pakietu";
+ }
+ /*! Used as a heading for a list of Java class functions with package
+ * scope.
+ */
+ virtual QCString trPackageMembers()
+ {
+ return "Funkcje pakietu";
+ }
+ /*! Used as a heading for a list of static Java class functions with
+ * package scope.
+ */
+ virtual QCString trStaticPackageMembers()
+ {
+ return "Statyczne funkcje pakietu";
+ }
+ /*! Used as a heading for a list of Java class variables with package
+ * scope.
+ */
+ virtual QCString trPackageAttribs()
+ {
+ return "Atrybuty pakietu";
+ }
+ /*! Used as a heading for a list of static Java class variables with
+ * package scope.
+ */
+ virtual QCString trStaticPackageAttribs()
+ {
+ return "Statyczne atrybuty pakietu";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used in the quick index of a class/file/namespace member list page
+ * to link to the unfiltered list of all members.
+ */
+ virtual QCString trAll()
+ {
+ return "All";
+ }
+ /*! Put in front of the call graph for a function. */
+ virtual QCString trCallGraph()
+ {
+ return "Oto graf wywołań dla tej funkcji:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! When the search engine is enabled this text is put in the header
+ * of each page before the field where one can enter the text to search
+ * for.
+ */
+ virtual QCString trSearchForIndex()
+ {
+ return "Szukaj";
+ }
+ /*! This string is used as the title for the page listing the search
+ * results.
+ */
+ virtual QCString trSearchResultsTitle()
+ {
+ return "Wyniki szukania";
+ }
+ /*! This string is put just before listing the search results. The
+ * text can be different depending on the number of documents found.
+ * Inside the text you can put the special marker $num to insert
+ * the number representing the actual number of search results.
+ * The @a numDocuments parameter can be either 0, 1 or 2, where the
+ * value 2 represents 2 or more matches. HTML markup is allowed inside
+ * the returned string.
+ */
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments==0)
+ {
+ return "Niestety żaden dokument nie pasuje do twojego zapytania.";
+ }
+ else if (numDocuments==1)
+ {
+ return "Znaleziono <b>1</b> dokument pasujący do twojego zapytania.";
+ }
+ int count = numDocuments % 10;
+ if ((count>=2) && (count<=4))
+ {
+ return "Znaleziono <b>$num</b> dokumenty pasujące do twojego zapytania. "
+ "Najlepiej pasujące dokumenty wyświetlane są na początku listy.";
+ }
+ else
+ {
+ return "Znaleziono <b>$num</b> dokumentów pasujących do twojego zapytania. "
+ "Najlepiej pasujące dokumenty wyświetlane są na początku listy.";
+ }
+ }
+ /*! This string is put before the list of matched words, for each search
+ * result. What follows is the list of words that matched the query.
+ */
+ virtual QCString trSearchMatches()
+ {
+ return "Pasujące słowa:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return "Plik źródłowy " + filename;
+ }
+
};
diff --git a/src/translator_ru.h b/src/translator_ru.h
index 9631d54..4a40459 100644
--- a/src/translator_ru.h
+++ b/src/translator_ru.h
@@ -49,7 +49,7 @@
#ifndef TRANSLATOR_RU_H
#define TRANSLATOR_RU_H
-class TranslatorRussian : public Translator
+class TranslatorRussian : public TranslatorAdapter_1_3_9
{
private:
/*! The Decode() inline assumes the source written in the
diff --git a/src/translator_za.h b/src/translator_za.h
index 7f115dc..d7670d7 100644
--- a/src/translator_za.h
+++ b/src/translator_za.h
@@ -26,7 +26,7 @@
#ifndef TRANSLATOR_ZA_H
#define TRANSLATOR_ZA_H
-class TranslatorAfrikaans : public Translator
+class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
{
public:
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 7b51deb..18e3206 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1467,6 +1467,61 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
ti << " </compound>" << endl;
}
+static void generateXMLForDir(DirDef *dd,QTextStream &ti)
+{
+ if (dd->isReference()) return; // skip external references
+ ti << " <compound refid=\"" << dd->getOutputFileBase()
+ << "\" kind=\"dir\"><name>" << convertToXML(dd->displayName())
+ << "</name>" << endl;
+
+ QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString fileName=outputDirectory+"/"+dd->getOutputFileBase()+".xml";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+
+ QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
+ writeXMLHeader(t);
+ t << " <compounddef id=\""
+ << dd->getOutputFileBase() << "\" kind=\"dir\">" << endl;
+ t << " <compoundname>" << convertToXML(dd->displayName()) << "</compoundname>" << endl;
+
+ QListIterator<DirDef> subdirs(dd->subDirs());
+ DirDef *subdir;
+ for (subdirs.toFirst();(subdir=subdirs.current());++subdirs)
+ {
+ t << " <innerdir refid=\"" << subdir->getOutputFileBase()
+ << "\">" << convertToXML(subdir->displayName()) << "</innerdir>" << endl;
+ }
+
+ FileList *fl = dd->getFiles();
+ if (fl)
+ {
+ QListIterator<FileDef> fli(*fl);
+ FileDef *fd = fl->first();
+ for (fli.toFirst();(fd=fli.current());++fli)
+ {
+ t << " <innerfile refid=\"" << fd->getOutputFileBase()
+ << "\">" << convertToXML(fd->name()) << "</innerfile>" << endl;
+ }
+ }
+ t << " <briefdescription>" << endl;
+ writeXMLDocBlock(t,dd->briefFile(),dd->briefLine(),dd,0,dd->briefDescription());
+ t << " </briefdescription>" << endl;
+ t << " <detaileddescription>" << endl;
+ writeXMLDocBlock(t,dd->docFile(),dd->docLine(),dd,0,dd->documentation());
+ t << " </detaileddescription>" << endl;
+ t << " <location file=\"" << dd->name() << "\"/>" << endl;
+ t << " </compounddef>" << endl;
+ t << "</doxygen>" << endl;
+
+ ti << " </compound>" << endl;
+}
+
static void generateXMLForPage(PageDef *pd,QTextStream &ti,bool isExample)
{
// + name
@@ -1534,7 +1589,6 @@ void generateXML()
// + classes
// + namespaces
// + files
- // - packages
// + groups
// + related pages
// - examples
@@ -1669,6 +1723,15 @@ void generateXML()
}
}
{
+ DirDef *dir;
+ DirSDict::Iterator sdi(Doxygen::directories);
+ for (sdi.toFirst();(dir=sdi.current());++sdi)
+ {
+ msg("Generate XML output for dir %s\n",dir->name().data());
+ generateXMLForDir(dir,t);
+ }
+ }
+ {
PageSDict::Iterator pdi(*Doxygen::exampleSDict);
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)