Commit e04496cb authored by Dimitri van Heesch's avatar Dimitri van Heesch

mods for doxygen-0.49-990522

parent 322885a8
DOXYGEN Version 0.49-990425 DOXYGEN Version 0.49-990522
INSTALLATION INSTRUCTIONS FOR UNIX: INSTALLATION INSTRUCTIONS FOR UNIX:
----------------------------------- -----------------------------------
1. Unpack the archive, unless you already have: 1. Unpack the archive, unless you already have:
gunzip doxygen-0.49-990425.src.tar.gz # uncompress the archive gunzip doxygen-0.49-990522.src.tar.gz # uncompress the archive
tar xf doxygen-0.49-990425.src.tar # unpack it tar xf doxygen-0.49-990522.src.tar # unpack it
2. Make sure Qt is installed properly (check the environment variable $QTDIR) 2. Make sure Qt is installed properly (check the environment variable $QTDIR)
...@@ -80,6 +80,10 @@ You will need to install the windows/dos versions of following tools: ...@@ -80,6 +80,10 @@ You will need to install the windows/dos versions of following tools:
X-windows version as well!) X-windows version as well!)
- Microsoft Visual C++ version 5.0, use the vcvars32.bat to set the environment - Microsoft Visual C++ version 5.0, use the vcvars32.bat to set the environment
variables. variables.
- If you used WinZip to extract the tar archive it will (apparently) not
create empty folders, so you have to add the folders
`objects' and `bin' manually in the root of the distribution before
compiling.
Make sure all tools are accessible from the command-line. Make sure all tools are accessible from the command-line.
...@@ -97,6 +101,11 @@ nmake -f Makefile.windows examples ...@@ -97,6 +101,11 @@ nmake -f Makefile.windows examples
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
KNOWN CONFIGURATION PROBLEMS KNOWN CONFIGURATION PROBLEMS
HTML RELATED PROBLEMS:
- the indent continuously increases.
This seems to be a problem that can be observed with Netscape 4.01.
It is not present in many later and earlier versions.
LATEX RELATED PROBLEMS: LATEX RELATED PROBLEMS:
- the LaTeX translation of HTML tables doesn't seem to work for all - the LaTeX translation of HTML tables doesn't seem to work for all
...@@ -129,4 +138,4 @@ The latest version of doxygen can be obtained at ...@@ -129,4 +138,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (25 April 1999) Dimitri van Heesch (22 May 1999)
...@@ -9,4 +9,4 @@ PERL = perl ...@@ -9,4 +9,4 @@ PERL = perl
# The values below should probably be left unmodified # The values below should probably be left unmodified
TAR = tar # name of the GNU tar tool TAR = tar # name of the GNU tar tool
TMAKE = ../tmake/bin/tmake TMAKE = ../tmake/bin/tmake
VERSION = 0.49-990425 VERSION = 0.49-990522
DOXYGEN Version 0.49-990425 DOXYGEN Version 0.49-990522
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (25 April 1999) Dimitri van Heesch (22 May 1999)
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Most documentation systems have special `see also' sections where links Most documentation systems have special `see also' sections where links
to other pieces of documentation can be inserted. to other pieces of documentation can be inserted.
Although doxygen also has a command to start such a section (See section Although doxygen also has a command to start such a section (See section
\ref cmdsa), it does allow you to put these kind of links anywhere in the \ref cmdsa "\\sa"), it does allow you to put these kind of links anywhere in the
documentation. documentation.
For \f$\mbox{\LaTeX}\f$ documentation a reference to the page number For \f$\mbox{\LaTeX}\f$ documentation a reference to the page number
is written instead of a link. Furthermore, the index at the end of the is written instead of a link. Furthermore, the index at the end of the
...@@ -93,20 +93,7 @@ ...@@ -93,20 +93,7 @@
for the corresponding HTML documentation that is generated by Doxygen. for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly \endhtmlonly
\subsection resolving Resolving of defines and typedefs. \subsection resolving typedefs.
Macro definitions of the form:
\verbatim
#define TypeName ClassName
\endverbatim
will be resolved inside documentation blocks.
\par Example:
\verbinclude resdefine.cpp
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/resdefine/html/exportedname.html">here</a>
for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly
Typedefs that involve classes, structs and unions, like Typedefs that involve classes, structs and unions, like
\verbatim \verbatim
......
This diff is collapsed.
...@@ -169,7 +169,7 @@ Below is a list of tags that are recognized for each category. ...@@ -169,7 +169,7 @@ Below is a list of tags that are recognized for each category.
If the VERBATIM_HEADERS tag is set the YES (the default) then Doxygen\n"; If the VERBATIM_HEADERS tag is set the YES (the default) then Doxygen\n";
will generate a verbatim copy of the header file for each class for\n"; will generate a verbatim copy of the header file for each class for\n";
which an include is specified. Set to NO to disable this.\n"; which an include is specified. Set to NO to disable this.\n";
\sa Section \ref cmdclass. \sa Section \ref cmdclass "\\class".
</dl> </dl>
...@@ -216,7 +216,7 @@ Below is a list of tags that are recognized for each category. ...@@ -216,7 +216,7 @@ Below is a list of tags that are recognized for each category.
\addindex EXAMPLE_PATH \addindex EXAMPLE_PATH
The \c EXAMPLE_PATH tag can be used to specify one or more files or The \c EXAMPLE_PATH tag can be used to specify one or more files or
directories that contain example code fragments that are included (see directories that contain example code fragments that are included (see
the \\include command in section \ref cmdinclude). the \\include command in section \ref cmdinclude "\\include").
<dt>\c INCLUDE_PATH <dd> <dt>\c INCLUDE_PATH <dd>
\addindex INCLUDE_PATH \addindex INCLUDE_PATH
...@@ -262,6 +262,7 @@ Below is a list of tags that are recognized for each category. ...@@ -262,6 +262,7 @@ Below is a list of tags that are recognized for each category.
<HTML> <HTML>
<HEAD> <HEAD>
<TITLE>My title</TITLE> <TITLE>My title</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD> </HEAD>
<BODY BGCOLOR="#FFFFFF"> <BODY BGCOLOR="#FFFFFF">
\endverbatim \endverbatim
...@@ -341,6 +342,10 @@ EXTRA_PACKAGES = times ...@@ -341,6 +342,10 @@ EXTRA_PACKAGES = times
A directory man3 will be created inside the directory specified by A directory man3 will be created inside the directory specified by
\c MAN_OUTPUT. \c MAN_OUTPUT.
<dt>\c MAN_EXTENSION <dd>
\addindex MAX_EXTENSION
The MAN_EXTENSION tag determines the extension that is added to
the generated man pages (default is the subroutine's section .3)
</dl> </dl>
\subsection config_prepro Preprocessor related options \subsection config_prepro Preprocessor related options
......
...@@ -155,8 +155,9 @@ Ole Gerden, ...@@ -155,8 +155,9 @@ Ole Gerden,
Olaf Meeuwissen, Olaf Meeuwissen,
Feiyi Wang, Feiyi Wang,
Robert J. Clark, Robert J. Clark,
Matthias Baas and Matthias Baas,
Walter Mueller Walter Mueller, and
William van Dieten
for suggestions, patches and bug reports. for suggestions, patches and bug reports.
</ul> </ul>
*/ */
......
...@@ -62,6 +62,11 @@ Furthermore, I would appreciate a mail if you have found ...@@ -62,6 +62,11 @@ Furthermore, I would appreciate a mail if you have found
a bug, or if you have ideas (or even better some code or a patch) a bug, or if you have ideas (or even better some code or a patch)
how to fix existing bugs and limitations. how to fix existing bugs and limitations.
The easiest way for me to solve bugs is if you can send me a small example
demonstrating the problem you have (make sure the example compiles!). It is
usually a good idea to send along the configuation file as well, but please
use doxygen with the <code>-s</code> flag while generating it.
My email address: <a href="mailto:dimitri@stack.nl">dimitri@stack.nl</a> My email address: <a href="mailto:dimitri@stack.nl">dimitri@stack.nl</a>
*/ */
This diff is collapsed.
...@@ -49,10 +49,11 @@ class ClassDef : public Definition ...@@ -49,10 +49,11 @@ class ClassDef : public Definition
Union=Entry::UNION_SEC Union=Entry::UNION_SEC
}; };
ClassDef(const char *name,int ct,const char *ref=0,const char *fName=0); ClassDef(const char *name,CompoundType ct,const char *ref=0,const char *fName=0);
~ClassDef(); ~ClassDef();
QString classFile() const { return fileName; } //QString classFile() const { return fileName; }
int compoundType() const { return compType; } QString getOutputFileBase() const { return fileName; }
CompoundType compoundType() const { return compType; }
const char *memberListFileName() const { return memListFileName; } const char *memberListFileName() const { return memListFileName; }
void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0); void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0);
BaseClassList *baseClasses() { return inherits; } BaseClassList *baseClasses() { return inherits; }
...@@ -75,7 +76,7 @@ class ClassDef : public Definition ...@@ -75,7 +76,7 @@ class ClassDef : public Definition
void writeIncludeFile(OutputList &ol); void writeIncludeFile(OutputList &ol);
bool addExample(const char *anchor,const char *name, const char *file); bool addExample(const char *anchor,const char *name, const char *file);
bool hasExamples(); bool hasExamples();
void writeExample(OutputList &ol); //void writeExample(OutputList &ol);
void setProtection(Protection p) { prot=p; } void setProtection(Protection p) { prot=p; }
Protection protection() const { return prot; } Protection protection() const { return prot; }
bool isVisible() bool isVisible()
...@@ -130,7 +131,7 @@ class ClassDef : public Definition ...@@ -130,7 +131,7 @@ class ClassDef : public Definition
QString reference; QString reference;
ExampleList *exampleList; ExampleList *exampleList;
ExampleDict *exampleDict; ExampleDict *exampleDict;
int compType; CompoundType compType;
Protection prot; Protection prot;
}; };
......
...@@ -173,16 +173,19 @@ static void generateClassLink(OutputList &ol,const char *clName) ...@@ -173,16 +173,19 @@ static void generateClassLink(OutputList &ol,const char *clName)
if (exampleBlock) if (exampleBlock)
{ {
QString anchor; QString anchor;
anchor.sprintf("a%d",anchorCount); anchor.sprintf("_a%d",anchorCount);
//printf("addExampleClass(%s,%s,%s)\n",anchor.data(),exampleName.data(), //printf("addExampleClass(%s,%s,%s)\n",anchor.data(),exampleName.data(),
// exampleFile.data()); // exampleFile.data());
if (cd->addExample(anchor,exampleName,exampleFile)) if (cd->addExample(anchor,exampleName,exampleFile))
{ {
bool latexOn = ol.isEnabled(OutputGenerator::Latex);
if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor(anchor); ol.writeAnchor(anchor);
if (latexOn) ol.enable(OutputGenerator::Latex);
anchorCount++; anchorCount++;
} }
} }
ol.writeCodeLink(cd->getReference(),cd->classFile(),0,className); ol.writeCodeLink(cd->getReference(),cd->getOutputFileBase(),0,className);
} }
else else
{ {
...@@ -196,10 +199,11 @@ static bool getLink(const char *className, ...@@ -196,10 +199,11 @@ static bool getLink(const char *className,
MemberDef *md; MemberDef *md;
ClassDef *cd; ClassDef *cd;
FileDef *fd; FileDef *fd;
NamespaceDef *nd;
QString m=memberName; QString m=memberName;
QString c=className; QString c=className;
//printf("Trying `%s'::`%s'\n",c.data(),m.data()); //printf("Trying `%s'::`%s'\n",c.data(),m.data());
if (getDefs(m,c,"()",md,cd,fd) && if (getDefs(m,c,"()",md,cd,fd,nd) &&
(md->hasDocumentation() || md->isReference())) (md->hasDocumentation() || md->isReference()))
{ {
//printf("Found!\n"); //printf("Found!\n");
...@@ -217,13 +221,19 @@ static bool getLink(const char *className, ...@@ -217,13 +221,19 @@ static bool getLink(const char *className,
} }
if (cd) if (cd)
{ {
result.writeCodeLink(cd->getReference(),cd->classFile(), result.writeCodeLink(cd->getReference(),cd->getOutputFileBase(),
md->anchor(),memberName);
return TRUE;
}
else if (nd)
{
result.writeCodeLink(nd->getReference(),nd->getOutputFileBase(),
md->anchor(),memberName); md->anchor(),memberName);
return TRUE; return TRUE;
} }
else if (fd) else if (fd)
{ {
result.writeCodeLink(fd->getReference(),fd->diskName(), result.writeCodeLink(fd->getReference(),fd->getOutputFileBase(),
md->anchor(),memberName); md->anchor(),memberName);
return TRUE; return TRUE;
} }
...@@ -363,7 +373,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -363,7 +373,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
if ((fd=findFileDef(&inputNameDict,yytext,ambig)) && if ((fd=findFileDef(&inputNameDict,yytext,ambig)) &&
fd->hasDocumentation()) fd->hasDocumentation())
{ {
code->writeCodeLink(0,fd->diskName(),0,yytext); code->writeCodeLink(0,fd->getOutputFileBase(),0,yytext);
} }
else else
{ {
......
...@@ -41,6 +41,7 @@ extern QString genTagFile; // the tag file to generate ...@@ -41,6 +41,7 @@ extern QString genTagFile; // the tag file to generate
extern QString inputFilter; // a filter command that is applied to input files extern QString inputFilter; // a filter command that is applied to input files
extern QString paperType; // the page type to generate docs for extern QString paperType; // the page type to generate docs for
extern QString stripFromPath; // the string to strip from the file path extern QString stripFromPath; // the string to strip from the file path
extern QString manExtension; // extension the man page files
extern QStrList includePath; // list of include paths extern QStrList includePath; // list of include paths
extern QStrList examplePath; // list of example paths extern QStrList examplePath; // list of example paths
extern QStrList inputSources; // list of input files extern QStrList inputSources; // list of input files
...@@ -76,5 +77,6 @@ extern bool repeatBriefFlag; // repeat brief descriptions. ...@@ -76,5 +77,6 @@ extern bool repeatBriefFlag; // repeat brief descriptions.
extern bool internalDocsFlag; // determines what happens to internal docs. extern bool internalDocsFlag; // determines what happens to internal docs.
extern bool caseSensitiveNames; // determines if output can be mixed case. extern bool caseSensitiveNames; // determines if output can be mixed case.
extern bool verbatimHeaderFlag; // enable/disable generation of verb headers. extern bool verbatimHeaderFlag; // enable/disable generation of verb headers.
extern bool htmlAlignMemberFlag; // align members in HTML using tables.
#endif #endif
...@@ -62,6 +62,7 @@ QString inputFilter; ...@@ -62,6 +62,7 @@ QString inputFilter;
QString paperType; QString paperType;
QString outputLanguage; QString outputLanguage;
QString stripFromPath; QString stripFromPath;
QString manExtension;
QStrList includePath; QStrList includePath;
QStrList examplePath; QStrList examplePath;
QStrList inputSources; QStrList inputSources;
...@@ -97,6 +98,7 @@ bool searchIncludeFlag = TRUE; ...@@ -97,6 +98,7 @@ bool searchIncludeFlag = TRUE;
bool classDiagramFlag = TRUE; bool classDiagramFlag = TRUE;
bool repeatBriefFlag = TRUE; bool repeatBriefFlag = TRUE;
bool verbatimHeaderFlag = TRUE; bool verbatimHeaderFlag = TRUE;
bool htmlAlignMemberFlag = TRUE;
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
* *
...@@ -163,6 +165,7 @@ static int yyread(char *buf,int max_size) ...@@ -163,6 +165,7 @@ static int yyread(char *buf,int max_size)
<Start>"PAPER_TYPE"[ \t]*"=" { BEGIN(GetString); s=&paperType; } <Start>"PAPER_TYPE"[ \t]*"=" { BEGIN(GetString); s=&paperType; }
<Start>"OUTPUT_LANGUAGE"[ \t]*"=" { BEGIN(GetString); s=&outputLanguage; } <Start>"OUTPUT_LANGUAGE"[ \t]*"=" { BEGIN(GetString); s=&outputLanguage; }
<Start>"STRIP_FROM_PATH"[ \t]*"=" { BEGIN(GetString); s=&stripFromPath; } <Start>"STRIP_FROM_PATH"[ \t]*"=" { BEGIN(GetString); s=&stripFromPath; }
<Start>"MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&manExtension; }
<Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&includePath; elemStr=""; } <Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&includePath; elemStr=""; }
<Start>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&examplePath; elemStr=""; } <Start>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&examplePath; elemStr=""; }
<Start>"INPUT"[ \t]*"=" { BEGIN(GetStrList); l=&inputSources; elemStr=""; } <Start>"INPUT"[ \t]*"=" { BEGIN(GetStrList); l=&inputSources; elemStr=""; }
...@@ -198,6 +201,7 @@ static int yyread(char *buf,int max_size) ...@@ -198,6 +201,7 @@ static int yyread(char *buf,int max_size)
<Start>"INTERNAL_DOCS"[ \t]*"=" { BEGIN(GetBool); b=&internalDocsFlag; } <Start>"INTERNAL_DOCS"[ \t]*"=" { BEGIN(GetBool); b=&internalDocsFlag; }
<Start>"CASE_SENSE_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&caseSensitiveNames; } <Start>"CASE_SENSE_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&caseSensitiveNames; }
<Start>"VERBATIM_HEADERS"[ \t]*"=" { BEGIN(GetBool); b=&verbatimHeaderFlag; } <Start>"VERBATIM_HEADERS"[ \t]*"=" { BEGIN(GetBool); b=&verbatimHeaderFlag; }
<Start>"HTML_ALIGN_MEMBERS"[ \t]*"=" { BEGIN(GetBool); b=&htmlAlignMemberFlag; }
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); } <Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); } <GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n { <GetStrList>\n {
...@@ -634,6 +638,15 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -634,6 +638,15 @@ void writeTemplateConfig(QFile *f,bool sl)
} }
t << "HTML_FOOTER =\n"; t << "HTML_FOOTER =\n";
if (!sl) if (!sl)
{
t << "\n";
t << "# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,\n";
t << "# files or namespaces will be aligned in HTML using tables. If set to\n";
t << "# NO a bullet list will be used.\n";
t << "\n";
}
t << "HTML_ALIGN_MEMBERS = YES\n";
if (!sl)
{ {
t << "\n"; t << "\n";
t << "#---------------------------------------------------------------------------\n"; t << "#---------------------------------------------------------------------------\n";
...@@ -701,6 +714,15 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -701,6 +714,15 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "\n"; t << "\n";
} }
t << "MAN_OUTPUT =\n"; t << "MAN_OUTPUT =\n";
if (!sl)
{
t << "\n";
t << "# The MAN_EXTENSION tag determines the extension that is added to\n";
t << "# the generated man pages (default is the subroutine's section .3)\n";
t << "\n";
}
t << "MAN_EXTENSION = .3\n";
if (!sl) if (!sl)
{ {
t << "\n"; t << "\n";
...@@ -870,6 +892,12 @@ void checkConfig() ...@@ -870,6 +892,12 @@ void checkConfig()
// projectName[0]=toupper(projectName[0]); // projectName[0]=toupper(projectName[0]);
//} //}
// set default man page extension if non is given by the user
if (manExtension.isEmpty())
{
manExtension=".3";
}
paperType = paperType.lower().stripWhiteSpace(); paperType = paperType.lower().stripWhiteSpace();
if (paperType.isEmpty()) if (paperType.isEmpty())
{ {
......
...@@ -16,6 +16,17 @@ ...@@ -16,6 +16,17 @@
#include <ctype.h> #include <ctype.h>
#include "definition.h" #include "definition.h"
#include "doxygen.h"
Definition::Definition(const char *name,const char *b,const char *d)
{
n=name; brief=b; doc=d; sectionList=0;
}
Definition::~Definition()
{
delete sectionList;
}
QString Definition::nameToFile(const char *name) QString Definition::nameToFile(const char *name)
{ {
...@@ -42,3 +53,22 @@ QString Definition::nameToFile(const char *name) ...@@ -42,3 +53,22 @@ QString Definition::nameToFile(const char *name)
} }
return result; return result;
} }
void Definition::addSectionsToDefinition(QList<QString> *anchorList)
{
if (!anchorList) return;
QString *s=anchorList->first();
while (s)
{
SectionInfo *si=0;
if (!s->isEmpty() && (si=sectionDict[*s]))
{
//printf("Add section `%s' to definition `%s'\n",
// si->label.data(),n.data());
if (sectionList==0) sectionList = new SectionList;
sectionList->append(si);
si->definition = this;
}
s=anchorList->next();
}
}
...@@ -18,19 +18,22 @@ ...@@ -18,19 +18,22 @@
#define DEFINITION_H #define DEFINITION_H
#include <qstring.h> #include <qstring.h>
#include <qlist.h>
#include "config.h" #include "config.h"
#include "section.h"
/*! The common base class of all definitions. */ /*! The common base class of all definitions. */
class Definition class Definition
{ {
public: public:
//! create a new definition //! create a new definition
Definition(const char *name,const char *b=0,const char *d=0) Definition(const char *name,const char *b=0,const char *d=0);
{ n=name; brief=b; doc=d; }
//! destroys the definition //! destroys the definition
virtual ~Definition() {} virtual ~Definition();
//! returns the name of the definition //! returns the name of the definition
QString name() const { return n; } QString name() const { return n; }
//! returns the base name of the output file that contains this definition.
virtual QString getOutputFileBase() const = 0;
//! returns the detailed description of this definition //! returns the detailed description of this definition
QString documentation() const { return doc; } QString documentation() const { return doc; }
//! returns the brief description of this definition //! returns the brief description of this definition
...@@ -55,10 +58,13 @@ class Definition ...@@ -55,10 +58,13 @@ class Definition
{ return !doc.isNull() || !brief.isNull() || extractAllFlag; } { return !doc.isNull() || !brief.isNull() || extractAllFlag; }
QString nameToFile(const char *name); QString nameToFile(const char *name);
void addSectionsToDefinition(QList<QString> *anchorList);
private: private:
QString n; // name of the definition QString n; // name of the definition
QString brief; // brief description QString brief; // brief description
QString doc; // detailed description QString doc; // detailed description
SectionList *sectionList; // list of all sections
}; };
#endif #endif
...@@ -152,7 +152,7 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,int x,int y,int w,int h) ...@@ -152,7 +152,7 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,int x,int y,int w,int h)
{ {
t << "<area "; t << "<area ";
if (cd->getReference()) t << "doxygen=\"" << cd->getReference() << ":\" "; if (cd->getReference()) t << "doxygen=\"" << cd->getReference() << ":\" ";
t << "href=\"" << cd->classFile() << ".html\" "; t << "href=\"" << cd->getOutputFileBase() << ".html\" ";
t << "ALT=\"" << cd->name(); t << "ALT=\"" << cd->name();
t << "\" shape=\"rect\" coords=\"" << x << "," << y << ","; t << "\" shape=\"rect\" coords=\"" << x << "," << y << ",";
t << x+w << "," << y+h << "\">" << endl; t << x+w << "," << y+h << "\">" << endl;
...@@ -187,7 +187,7 @@ QString DiagramItem::label() const ...@@ -187,7 +187,7 @@ QString DiagramItem::label() const
QString DiagramItem::fileName() const QString DiagramItem::fileName() const
{ {
return classDef->classFile(); return classDef->getOutputFileBase();
} }
int DiagramItem::avgChildPos() const int DiagramItem::avgChildPos() const
......
This diff is collapsed.
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "define.h" #include "define.h"
#include "namespacedef.h" #include "namespacedef.h"
#include "formula.h" #include "formula.h"
#include "section.h"
struct PageInfo struct PageInfo
{ {
...@@ -72,23 +73,12 @@ class BufStr : public QString ...@@ -72,23 +73,12 @@ class BufStr : public QString
const int spareRoom; // 10Kb extra room to avoid frequent resizing const int spareRoom; // 10Kb extra room to avoid frequent resizing
}; };
struct SectionInfo
{
SectionInfo(const char *n,const char *l,const char *t,bool sub)
{ pageName=n; label=l; title=t; isSubsection=sub; }
QString pageName;
QString label;
QString title;
bool isSubsection;
};
typedef QList<QString> StringList; typedef QList<QString> StringList;
typedef QDict<MemberDef> MemberDict; typedef QDict<MemberDef> MemberDict;
typedef QDict<ClassDef> ClassDict; typedef QDict<ClassDef> ClassDict;
typedef QDict<FileDef> FileDict; typedef QDict<FileDef> FileDict;
typedef QDict<QString> StringDict; typedef QDict<QString> StringDict;
typedef QDict<PageInfo> PageDict; typedef QDict<PageInfo> PageDict;
typedef QDict<SectionInfo> SectionDict;
typedef QDict<GroupDef> GroupDict; typedef QDict<GroupDef> GroupDict;
extern const char * getOverloadDocs(); extern const char * getOverloadDocs();
...@@ -118,6 +108,7 @@ extern FileList includeFiles; ...@@ -118,6 +108,7 @@ extern FileList includeFiles;
extern StringDict typedefDict; extern StringDict typedefDict;
extern GroupList groupList; extern GroupList groupList;
extern NamespaceList namespaceList; extern NamespaceList namespaceList;
extern NamespaceDict namespaceDict;
extern FormulaList formulaList; extern FormulaList formulaList;
extern FormulaDict formulaDict; extern FormulaDict formulaDict;
extern FormulaDict formulaNameDict; extern FormulaDict formulaNameDict;
...@@ -130,5 +121,6 @@ extern int documentedDefines; ...@@ -130,5 +121,6 @@ extern int documentedDefines;
extern int documentedFiles; extern int documentedFiles;
extern int documentedGroups; extern int documentedGroups;
extern int documentedNamespaces; extern int documentedNamespaces;
extern int documentedNamespaceMembers;
#endif #endif
...@@ -251,7 +251,8 @@ QString unhtmlify(const char *str) ...@@ -251,7 +251,8 @@ QString unhtmlify(const char *str)
} }
<SearchWords>[a-z_A-Z0-9]+ { <SearchWords>[a-z_A-Z0-9]+ {
docAnchor = yytext; docAnchor = yytext;
if (docAnchor=="details") if (docAnchor=="details" ||
docAnchor=="_details")
{ {
docRefName=className.copy(); docRefName=className.copy();
addReference(); addReference();
......
...@@ -29,6 +29,8 @@ Entry::Entry() ...@@ -29,6 +29,8 @@ Entry::Entry()
extends->setAutoDelete(TRUE); extends->setAutoDelete(TRUE);
groups = new QList<QString>; groups = new QList<QString>;
groups->setAutoDelete(TRUE); groups->setAutoDelete(TRUE);
anchors = new QList<QString>;
anchors->setAutoDelete(TRUE);
argList = new ArgumentList; argList = new ArgumentList;
argList->setAutoDelete(TRUE); argList->setAutoDelete(TRUE);
//printf("Entry::Entry() tArgList=0\n"); //printf("Entry::Entry() tArgList=0\n");
...@@ -66,6 +68,8 @@ Entry::Entry(const Entry &e) ...@@ -66,6 +68,8 @@ Entry::Entry(const Entry &e)
extends->setAutoDelete(TRUE); extends->setAutoDelete(TRUE);
groups = new QList<QString>; groups = new QList<QString>;
groups->setAutoDelete(TRUE); groups->setAutoDelete(TRUE);
anchors = new QList<QString>;
anchors->setAutoDelete(TRUE);
argList = new ArgumentList; argList = new ArgumentList;
argList->setAutoDelete(TRUE); argList->setAutoDelete(TRUE);
//printf("Entry::Entry(copy) tArgList=0\n"); //printf("Entry::Entry(copy) tArgList=0\n");
...@@ -95,6 +99,12 @@ Entry::Entry(const Entry &e) ...@@ -95,6 +99,12 @@ Entry::Entry(const Entry &e)
groups->append(new QString(*s)); groups->append(new QString(*s));
} }
QListIterator<QString> sli2(*e.anchors);
for (;(s=sli2.current());++sli2)
{
anchors->append(new QString(*s));
}
// deep copy argument list // deep copy argument list
QListIterator<Argument> ali(*e.argList); QListIterator<Argument> ali(*e.argList);
Argument *a; Argument *a;
...@@ -128,6 +138,7 @@ Entry::~Entry() ...@@ -128,6 +138,7 @@ Entry::~Entry()
delete sublist; delete sublist;
delete extends; delete extends;
delete groups; delete groups;
delete anchors;
delete argList; delete argList;
//printf("Entry::~Entry() tArgList=%p\n",tArgList); //printf("Entry::~Entry() tArgList=%p\n",tArgList);
delete tArgList; delete tArgList;
...@@ -177,6 +188,7 @@ void Entry::reset() ...@@ -177,6 +188,7 @@ void Entry::reset()
sublist->clear(); sublist->clear();
extends->clear(); extends->clear();
groups->clear(); groups->clear();
anchors->clear();
argList->clear(); argList->clear();
if (tArgList) { delete tArgList; tArgList=0; } if (tArgList) { delete tArgList; tArgList=0; }
} }
...@@ -211,6 +223,13 @@ int Entry::getSize() ...@@ -211,6 +223,13 @@ int Entry::getSize()
size+=s->length()+1; size+=s->length()+1;
s=groups->next(); s=groups->next();
} }
s=anchors->first();
while (s)
{
size+=sizeof(QLNode);
size+=s->length()+1;
s=anchors->next();
}
Entry *e=sublist->first(); Entry *e=sublist->first();
while (e) while (e)
{ {
......
...@@ -140,6 +140,7 @@ class Entry ...@@ -140,6 +140,7 @@ class Entry
QList<Entry> *sublist; // entries that are children of this one QList<Entry> *sublist; // entries that are children of this one
QList<BaseInfo> *extends; // list of base classes QList<BaseInfo> *extends; // list of base classes
QList<QString> *groups; // list of groups this entry belongs to QList<QString> *groups; // list of groups this entry belongs to
QList<QString> *anchors; // list of anchors defined in this entry
QString fileName; // file this entry was extracted from QString fileName; // file this entry was extracted from
int startLine; // start line of entry in the source int startLine; // start line of entry in the source
int num; int num;
......
...@@ -69,7 +69,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -69,7 +69,7 @@ void FileDef::writeDocumentation(OutputList &ol)
QString pageTitle=name()+" File Reference"; QString pageTitle=name()+" File Reference";
startFile(ol,diskname,pageTitle); startFile(ol,diskname,pageTitle);
startTitle(ol); startTitle(ol);
ol.docify(pageTitle); parseText(ol,theTranslator->trFileReference(name()));
endTitle(ol,name()); endTitle(ol,name());
//ol.newParagraph(); //ol.newParagraph();
...@@ -86,8 +86,8 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -86,8 +86,8 @@ void FileDef::writeDocumentation(OutputList &ol)
ol+=briefOutput; ol+=briefOutput;
ol.writeString(" \n"); ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"details"); ol.startTextLink(0,"_details");
parseDoc(ol,0,0,theTranslator->trMore()); parseText(ol,theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
ol.enableAll(); ol.enableAll();
} }
...@@ -96,6 +96,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -96,6 +96,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Man);
ol.writeSynopsis(); ol.writeSynopsis();
ol.startMemberSections();
if (classList->count()>0) if (classList->count()>0)
{ {
ClassDef *cd=classList->first(); ClassDef *cd=classList->first();
...@@ -111,7 +112,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -111,7 +112,7 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!found) if (!found)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseDoc(ol,0,0,theTranslator->trCompounds()); parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader(); ol.endMemberHeader();
ol.startMemberList(); ol.startMemberList();
found=TRUE; found=TRUE;
...@@ -124,10 +125,11 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -124,10 +125,11 @@ void FileDef::writeDocumentation(OutputList &ol)
case ClassDef::Union: ol.writeString("union"); break; case ClassDef::Union: ol.writeString("union"); break;
} }
ol.writeString(" "); ol.writeString(" ");
ol.insertMemberAlign();
if (cd->hasDocumentation()) if (cd->hasDocumentation())
{ {
ol.writeObjectLink(cd->getReference(), ol.writeObjectLink(cd->getReference(),
cd->classFile(), cd->getOutputFileBase(),
0, 0,
cd->name() cd->name()
); );
...@@ -146,6 +148,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -146,6 +148,7 @@ void FileDef::writeDocumentation(OutputList &ol)
} }
writeMemberDecs(ol,0,0,this,0,0,memList); writeMemberDecs(ol,0,0,this,0,0,memList);
ol.endMemberSections();
//doc=doc.stripWhiteSpace(); //doc=doc.stripWhiteSpace();
//int bl=brief.length(); //int bl=brief.length();
...@@ -153,9 +156,12 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -153,9 +156,12 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!briefDescription().isEmpty() || !documentation().isEmpty()) if (!briefDescription().isEmpty() || !documentation().isEmpty())
{ {
ol.writeRuler(); ol.writeRuler();
ol.writeAnchor("details"); bool latexOn = ol.isEnabled(OutputGenerator::Latex);
if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor("_details");
if (latexOn) ol.enable(OutputGenerator::Latex);
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trDetailedDescription()); parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
if (!briefDescription().isEmpty()) if (!briefDescription().isEmpty())
{ {
...@@ -177,7 +183,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -177,7 +183,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trDefineDocumentation()); parseText(ol,theTranslator->trDefineDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Define); writeMemberDocs(ol,memList,name(),MemberDef::Define);
} }
...@@ -186,7 +192,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -186,7 +192,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trFunctionPrototypeDocumentation()); parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Prototype); writeMemberDocs(ol,memList,name(),MemberDef::Prototype);
} }
...@@ -195,7 +201,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -195,7 +201,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trTypedefDocumentation()); parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Typedef); writeMemberDocs(ol,memList,name(),MemberDef::Typedef);
} }
...@@ -204,7 +210,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -204,7 +210,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trEnumerationTypeDocumentation()); parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Enumeration); writeMemberDocs(ol,memList,name(),MemberDef::Enumeration);
} }
...@@ -213,7 +219,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -213,7 +219,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trEnumerationValueDocumentation()); parseText(ol,theTranslator->trEnumerationValueDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::EnumValue); writeMemberDocs(ol,memList,name(),MemberDef::EnumValue);
} }
...@@ -222,7 +228,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -222,7 +228,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trFunctionDocumentation()); parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Function); writeMemberDocs(ol,memList,name(),MemberDef::Function);
} }
...@@ -231,7 +237,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -231,7 +237,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trVariableDocumentation()); parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Variable); writeMemberDocs(ol,memList,name(),MemberDef::Variable);
} }
...@@ -239,9 +245,9 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -239,9 +245,9 @@ void FileDef::writeDocumentation(OutputList &ol)
// write Author section (Man only) // write Author section (Man only)
ol.disableAllBut(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trAuthor()); parseText(ol,theTranslator->trAuthor());
ol.endGroupHeader(); ol.endGroupHeader();
parseDoc(ol,0,0,theTranslator->trGeneratedAutomatically(projectName)); parseText(ol,theTranslator->trGeneratedAutomatically(projectName));
ol.enableAll(); ol.enableAll();
endFile(ol); endFile(ol);
} }
......
...@@ -62,7 +62,8 @@ class FileDef : public Definition ...@@ -62,7 +62,8 @@ class FileDef : public Definition
} }
/*! Returns nameString with all slashes replaced by underscores. */ /*! Returns nameString with all slashes replaced by underscores. */
const char *diskName() const { return diskname; } //const char *diskName() const { return diskname; }
QString getOutputFileBase() const { return diskname; }
/*! Returns the absolute path including the file name. */ /*! Returns the absolute path including the file name. */
QString absFilePath() const { return filepath; } QString absFilePath() const { return filepath; }
......
...@@ -90,20 +90,20 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -90,20 +90,20 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol+=briefOutput; ol+=briefOutput;
ol.writeString(" \n"); ol.writeString(" \n");
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.startTextLink(0,"details"); ol.startTextLink(0,"_details");
parseDoc(ol,0,0,theTranslator->trMore()); parseText(ol,theTranslator->trMore());
ol.enable(OutputGenerator::Latex); ol.enable(OutputGenerator::Latex);
} }
if (fileList->count()>0) if (fileList->count()>0)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseDoc(ol,0,0,theTranslator->trFiles()); parseText(ol,theTranslator->trFiles());
ol.endMemberHeader(); ol.endMemberHeader();
ol.startIndexList(); ol.startIndexList();
FileDef *fd=fileList->first(); FileDef *fd=fileList->first();
while (fd) while (fd)
{ {
ol.writeStartAnnoItem("file ",fd->diskName(),0,fd->name()); ol.writeStartAnnoItem("file ",fd->getOutputFileBase(),0,fd->name());
ol.writeEndAnnoItem(fd->name()); ol.writeEndAnnoItem(fd->name());
fd=fileList->next(); fd=fileList->next();
} }
...@@ -112,7 +112,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -112,7 +112,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (classList->count()>0) if (classList->count()>0)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseDoc(ol,0,0,theTranslator->trCompounds()); parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader(); ol.endMemberHeader();
ol.startIndexList(); ol.startIndexList();
ClassDef *cd=classList->first(); ClassDef *cd=classList->first();
...@@ -125,7 +125,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -125,7 +125,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
case ClassDef::Struct: type="struct"; break; case ClassDef::Struct: type="struct"; break;
case ClassDef::Union: type="union"; break; case ClassDef::Union: type="union"; break;
} }
ol.writeStartAnnoItem(type,cd->classFile(),0,cd->name()); ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->name());
ol.writeEndAnnoItem(cd->name()); ol.writeEndAnnoItem(cd->name());
cd=classList->next(); cd=classList->next();
} }
...@@ -136,9 +136,12 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -136,9 +136,12 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!briefDescription().isEmpty() || !documentation().isEmpty()) if (!briefDescription().isEmpty() || !documentation().isEmpty())
{ {
ol.writeRuler(); ol.writeRuler();
ol.writeAnchor("details"); bool latexOn = ol.isEnabled(OutputGenerator::Latex);
if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor("_details");
if (latexOn) ol.enable(OutputGenerator::Latex);
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trDetailedDescription()); parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty()) if (!briefDescription().isEmpty())
......
...@@ -35,7 +35,8 @@ class GroupDef : public Definition ...@@ -35,7 +35,8 @@ class GroupDef : public Definition
public: public:
GroupDef(const char *name,const char *title); GroupDef(const char *name,const char *title);
~GroupDef(); ~GroupDef();
const char *groupFile() const { return fileName; } //const char *groupFile() const { return fileName; }
QString getOutputFileBase() const { return fileName; }
const char *groupTitle() const { return title; } const char *groupTitle() const { return title; }
void addFile(const FileDef *def); void addFile(const FileDef *def);
void addClass(const ClassDef *def); void addClass(const ClassDef *def);
......
...@@ -51,77 +51,10 @@ void HtmlGenerator::init() ...@@ -51,77 +51,10 @@ void HtmlGenerator::init()
writeLogo(htmlOutputDir); writeLogo(htmlOutputDir);
} }
//void HtmlGenerator::generateExternalIndex()
//{
// //printf("Generating external index...\n");
// QFile f;
// f.setName(htmlOutputDir+"/header.html");
// if (f.open(IO_WriteOnly))
// {
// QTextStream tt(&f);
// if (header.length()==0)
// {
// tt << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
// "<html><head><meta name=\"robots\" content=\"noindex\">\n"
// "<title>Doxysearch</title>\n"
// "</head><body bgcolor=\"#ffffff\">\n";
// }
// else
// {
// tt << header;
// }
// if (!noIndexFlag)
// {
// tt << "<center>";
// if (documentedGroups>0)
// tt << "<a doxygen=\"_doc:\" href=\"/modules.html\">Modules</a> &nbsp; ";
// if (hierarchyClasses>0)
// tt << "<a doxygen=\"_doc:\" href=\"/hierarchy.html\">Class hierarchy</a> &nbsp; ";
// if (annotatedClasses>0)
// tt << "<a doxygen=\"_doc:\" href=\"/annotated.html\">Compound list</a> &nbsp; ";
// if (documentedFiles>0)
// tt << "<a doxygen=\"_doc:\" href=\"/files.html\">File list</a> &nbsp; ";
// if (includeFiles.count()>0)
// tt << "<a doxygen=\"_doc:\" href=\"/headers.html\">Header files</a> &nbsp; ";
// if (documentedMembers>0)
// tt << "<a doxygen=\"_doc:\" href=\"/functions.html\">Compound Members</a> &nbsp; ";
// if (documentedFunctions>0)
// tt << "<a doxygen=\"_doc:\" href=\"/globals.html\">File Members</a> &nbsp; ";
// if (pageList.count()>0)
// tt << "<a doxygen=\"_doc:\" href=\"/pages.html\">Related Pages</a> &nbsp; ";
// if (exampleList.count()>0)
// tt << "<a doxygen=\"_doc:\" href=\"/examples.html\">Examples</a> &nbsp; ";
// if (searchEngineFlag)
// tt << "<a doxygen=\"_cgi:\" href=\"\">Search</a>";
// tt << endl << "</center><hr>" << endl;
// }
// }
// f.close();
//
// f.setName(htmlOutputDir+"/footer.html");
// if (f.open(IO_WriteOnly))
// {
// QTextStream tt(&f);
// if (footer.length()==0)
// {
// tt << "<hr><address><small>Generated at " << dateToString(TRUE);
// if (projectName.length()>0) tt << " for " << projectName;
// tt << " by <a href=\"http://www.stack.nl/~dimitri/doxygen/index.html\">"
// "doxygen</a>&nbsp; written by <a href="
// "\"mailto:dimitri@stack.nl\">Dimitri van Heesch</a>, &copy; "
// "1997-1999</small></address>\n</body>\n</html>\n";
// }
// else
// {
// tt << footer;
// }
// }
// f.close();
//}
void HtmlGenerator::startFile(const char *name,const char *title,bool external) void HtmlGenerator::startFile(const char *name,const char *title,bool external)
{ {
QString fileName=name; QString fileName=name;
lastTitle=title;
if (fileName.right(5)!=".html") fileName+=".html"; if (fileName.right(5)!=".html") fileName+=".html";
startPlainFile(fileName); startPlainFile(fileName);
if (header.length()==0) if (header.length()==0)
...@@ -139,34 +72,14 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external) ...@@ -139,34 +72,14 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external)
} }
else else
{ {
t << header; t << substitute(
} substitute(
substitute(header,"$title",lastTitle),
// if (!noIndexFlag) "$datetime",dateToString(TRUE)
// { ),
// t << "<center>"; "$date",dateToString(FALSE)
// if (documentedGroups>0) );
// t << "<a href=\"modules.html\">Modules</a> &nbsp; "; }
// if (hierarchyClasses>0)
// t << "<a href=\"hierarchy.html\">Class hierarchy</a> &nbsp; ";
// if (annotatedClasses>0)
// t << "<a href=\"annotated.html\">Compound list</a> &nbsp; ";
// if (documentedFiles>0)
// t << "<a href=\"files.html\">File list</a> &nbsp; ";
// if (includeFiles.count()>0)
// t << "<a href=\"headers.html\">Header files</a> &nbsp; ";
// if (documentedMembers>0)
// t << "<a href=\"functions.html\">Compound Members</a> &nbsp; ";
// if (documentedFunctions>0)
// t << "<a href=\"globals.html\">File Members</a> &nbsp; ";
// if (pageList.count()>0)
// t << "<a href=\"pages.html\">Related Pages</a> &nbsp; ";
// if (exampleList.count()>0)
// t << "<a href=\"examples.html\">Examples</a> &nbsp; ";
// if (searchEngineFlag)
// t << "<a doxygen=\"_cgi:\" href=\"\">Search</a>";
// t << endl << "</center><hr>" << endl;
// }
} }
void HtmlGenerator::startQuickIndexItem(const char *s,const char *l) void HtmlGenerator::startQuickIndexItem(const char *s,const char *l)
...@@ -189,7 +102,13 @@ void HtmlGenerator::writeFooter(int part,bool external) ...@@ -189,7 +102,13 @@ void HtmlGenerator::writeFooter(int part,bool external)
if (footer.length()==0) if (footer.length()==0)
t << "<hr><address><small>"; t << "<hr><address><small>";
else else
t << footer; t << substitute(
substitute(
substitute(footer,"$title",lastTitle),
"$datetime",dateToString(TRUE)
),
"$date",dateToString(FALSE)
);
break; break;
case 1: case 1:
if (footer.length()==0) if (footer.length()==0)
...@@ -219,24 +138,6 @@ void HtmlGenerator::writeFooter(int part,bool external) ...@@ -219,24 +138,6 @@ void HtmlGenerator::writeFooter(int part,bool external)
void HtmlGenerator::endFile() void HtmlGenerator::endFile()
{ {
// if (footer.length()==0)
// {
// t << "<hr><address><small>Generated at " << dateToString(TRUE);
// if (projectName.length()>0)
// {
// t << " for ";
// docify(projectName);
// }
// t << " by <a href=\"http://www.stack.nl/~dimitri/doxygen/index.html\">"
// "<img src=\"doxygen.gif\" alt=\"doxygen\" align=center border=0 "
// "width=118 height=53></a>&nbsp; written by <a href="
// "\"mailto:dimitri@stack.nl\">Dimitri van Heesch</a>, &copy; "
// "1997-1999</small></address>\n</body>\n</html>\n";
// }
// else
// {
// t << footer;
// }
endPlainFile(); endPlainFile();
} }
...@@ -250,45 +151,6 @@ void HtmlGenerator::endProjectNumber() ...@@ -250,45 +151,6 @@ void HtmlGenerator::endProjectNumber()
t << "</h3>"; t << "</h3>";
} }
//void HtmlGenerator::writeIndex()
//{
// startFile("index.html","Main Index");
// t << "<h1 align=center>";
// docify(projectName);
// t << " Documentation</h1>"
// << "<p>" << endl << "<p>" << endl;
// if (!projectNumber.isEmpty())
// {
// t << "<h3 align=center>";
// docify(projectNumber);
// t << "</h3>\n<p>\n<p>\n";
// }
// if (noIndexFlag)
// {
// t << "<ul>" << endl;
// if (hierarchyClasses>0)
// t << "<li><a href=\"hierarchy.html\">Class hierarchy</a>" << endl;
// if (annotatedClasses>0)
// t << "<li><a href=\"annotated.html\">Compound list</a>" << endl;
// if (documentedFiles>0)
// t << "<li><a href=\"files.html\">File list</a>" << endl;
// if (includeFiles.count()>0)
// t << "<li><a href=\"headers.html\">Header files</a>" << endl;
// if (documentedMembers>0)
// t << "<li><a href=\"functions.html\">Compound Members</a>" << endl;
// if (documentedFunctions>0)
// t << "<li><a href=\"globals.html\">File Members</a>" << endl;
// if (pageList.count()>0)
// t << "<li><a href=\"pageList.html\">Related Pages</a>" << endl;
// if (exampleList.count()>0)
// t << "<li><a href=\"examples.html\">Examples</a>" << endl;
// if (searchEngineFlag)
// t << "<li><a doxygen=\"_cgi:\" href=\"\">Search</a>" << endl;
// t << "</ul>" << endl;
// }
// endFile();
//}
void HtmlGenerator::writeStyleInfo(int part) void HtmlGenerator::writeStyleInfo(int part)
{ {
if (part==0) if (part==0)
...@@ -414,9 +276,9 @@ void HtmlGenerator::writeSectionRef(const char *name,const char *lab, ...@@ -414,9 +276,9 @@ void HtmlGenerator::writeSectionRef(const char *name,const char *lab,
{ {
QString refName=name; QString refName=name;
if (refName.right(5)!=".html") refName+=".html"; if (refName.right(5)!=".html") refName+=".html";
t << "&quot;<a href=\"" << refName << "#" << lab << "\">"; t << "<a href=\"" << refName << "#" << lab << "\">";
docify(title); docify(title);
t << "</a>&quot;"; t << "</a>";
} }
void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab, void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
...@@ -429,12 +291,12 @@ void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab, ...@@ -429,12 +291,12 @@ void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
t << "</a>"; t << "</a>";
} }
//void HtmlGenerator::docify(const char *str) void HtmlGenerator::writeSectionRefAnchor(const char *name,const char *lab,
//{ const char *title)
// docifyStatic(t,str); {
//} writeSectionRef(name,lab,title);
}
//void HtmlGenerator::docifyStatic(QTextStream &t,const char *str)
void HtmlGenerator::docify(const char *str) void HtmlGenerator::docify(const char *str)
{ {
if (str) if (str)
...@@ -510,3 +372,121 @@ void HtmlGenerator::writeFormula(const char *n,const char *text) ...@@ -510,3 +372,121 @@ void HtmlGenerator::writeFormula(const char *n,const char *text)
t << "<img align=\"top\" src=\"" << n << "\">" << endl; t << "<img align=\"top\" src=\"" << n << "\">" << endl;
if (text && text[0]=='\\') t << "</center></p>" << endl; if (text && text[0]=='\\') t << "</center></p>" << endl;
} }
void HtmlGenerator::startMemberList()
{
if (htmlAlignMemberFlag)
{
//t << endl << "<p><table border=0 cellspacing=2 cellpadding=0>" << endl;
}
else
{
t << "<ul>" << endl;
}
}
void HtmlGenerator::endMemberList()
{
if (htmlAlignMemberFlag)
{
//t << "</table>" << endl;
}
else
{
t << "</ul>" << endl;
}
}
void HtmlGenerator::startMemberItem()
{
if (htmlAlignMemberFlag)
{
t << "<tr><td align=right valign=top>";
}
else
{
t << "<li>";
}
}
void HtmlGenerator::insertMemberAlign()
{
if (htmlAlignMemberFlag)
{
t << "</td><td valign=top>";
}
}
void HtmlGenerator::endMemberItem()
{
if (htmlAlignMemberFlag)
{
t << "</td></tr>";
}
t << endl;
}
void HtmlGenerator::startMemberDescription()
{
if (htmlAlignMemberFlag)
{
t << "<tr><td></td><td><font size=-1><em>";
}
else
{
t << "<dl class=\"el\"><dd><font size=-1><em>";
}
}
void HtmlGenerator::endMemberDescription()
{
if (htmlAlignMemberFlag)
{
t << "</em></font><br><br></td></tr>" << endl;
}
else
{
t << "</em></font></dl>";
}
}
void HtmlGenerator::startMemberSections()
{
if (htmlAlignMemberFlag)
{
t << "<table border=0 cellpadding=0 cellspacing=1>" << endl;
}
}
void HtmlGenerator::endMemberSections()
{
if (htmlAlignMemberFlag)
{
t << "</table>" << endl;
}
}
void HtmlGenerator::startMemberHeader()
{
if (htmlAlignMemberFlag)
{
t << "<tr><td colspan=2><br><h2>";
}
else
{
startGroupHeader();
}
}
void HtmlGenerator::endMemberHeader()
{
if (htmlAlignMemberFlag)
{
t << "</h2></td></tr>" << endl;
}
else
{
endGroupHeader();
}
}
...@@ -81,18 +81,23 @@ class HtmlGenerator : public OutputGenerator ...@@ -81,18 +81,23 @@ class HtmlGenerator : public OutputGenerator
void endGroupHeader(); void endGroupHeader();
void writeListItem() { t << "<li>"; } void writeListItem() { t << "<li>"; }
void startMemberHeader() { startGroupHeader(); } void startMemberSections();
void endMemberHeader() { endGroupHeader(); } void endMemberSections();
void startMemberList() { t << "<ul>" << endl; } void startMemberHeader();
void endMemberList() { t << "</ul>" << endl; } void endMemberHeader();
void startMemberItem() { t << "<li>"; } void startMemberList();
void endMemberItem() { t << endl; } void endMemberList();
void startMemberItem();
void insertMemberAlign();
void endMemberItem();
void startMemberDescription();
void endMemberDescription();
void writeRuler() { t << "<hr>"; } void writeRuler() { t << "<hr>"; }
void writeAnchor(const char *name) void writeAnchor(const char *name)
{ t << "<a name=\"" << name <<"\"></a>"; } { t << "<a name=\"" << name <<"\"></a>"; }
void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; } void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; }
void endCodeFragment() { t << "</div></pre>"; } void endCodeFragment() { t << "</pre></div>"; }
void writeBoldString(const char *text) void writeBoldString(const char *text)
{ t << "<b>"; docify(text); t << "</b>"; } { t << "<b>"; docify(text); t << "</b>"; }
void startEmphasis() { t << "<em>"; } void startEmphasis() { t << "<em>"; }
...@@ -111,6 +116,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -111,6 +116,7 @@ class HtmlGenerator : public OutputGenerator
void writeDoxyAnchor(const char *clName,const char *anchor, void writeDoxyAnchor(const char *clName,const char *anchor,
const char *name); const char *name);
void writeLatexSpacing() {} void writeLatexSpacing() {}
void writeLatexLabel(const char *,const char *) {}
void writeStartAnnoItem(const char *type,const char *file, void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name); const char *path,const char *name);
void writeEndAnnoItem(const char *) { t << endl; } void writeEndAnnoItem(const char *) { t << endl; }
...@@ -139,8 +145,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -139,8 +145,6 @@ class HtmlGenerator : public OutputGenerator
void writeGrave(char c) { t << "&" << c << "grave;"; } void writeGrave(char c) { t << "&" << c << "grave;"; }
void writeCirc(char c) { t << "&" << c << "circ;"; } void writeCirc(char c) { t << "&" << c << "circ;"; }
void writeTilde(char c) { t << "&" << c << "tilde;"; } void writeTilde(char c) { t << "&" << c << "tilde;"; }
void startMemberDescription() { t << "<dl class=\"el\"><dd><font size=-1><em>"; }
void endMemberDescription() { t << "</em></font></dl>"; }
void startDescList() { t << "<dl compact><dt>" << endl; } void startDescList() { t << "<dl compact><dt>" << endl; }
void endDescTitle() {} void endDescTitle() {}
void writeDescItem() { t << "<dd>" << endl; } void writeDescItem() { t << "<dd>" << endl; }
...@@ -148,6 +152,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -148,6 +152,7 @@ class HtmlGenerator : public OutputGenerator
void writeSection(const char *,const char *,bool); void writeSection(const char *,const char *,bool);
void writeSectionRef(const char *,const char *,const char *); void writeSectionRef(const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *);
void addToIndex(const char *,const char *) {} void addToIndex(const char *,const char *) {}
void startIndent() { t << "<div class=\"in\">" << endl; } void startIndent() { t << "<div class=\"in\">" << endl; }
void endIndent() { t << "</div>" << endl; } void endIndent() { t << "</div>" << endl; }
...@@ -166,6 +171,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -166,6 +171,7 @@ class HtmlGenerator : public OutputGenerator
private: private:
QString header; QString header;
QString footer; QString footer;
QString lastTitle;
HtmlGenerator &operator=(const HtmlGenerator &g); HtmlGenerator &operator=(const HtmlGenerator &g);
HtmlGenerator(const HtmlGenerator &g); HtmlGenerator(const HtmlGenerator &g);
......
This diff is collapsed.
...@@ -25,10 +25,12 @@ enum IndexSections ...@@ -25,10 +25,12 @@ enum IndexSections
isTitlePageStart, isTitlePageStart,
isTitlePageAuthor, isTitlePageAuthor,
isModuleIndex, isModuleIndex,
isNamespaceIndex,
isClassHierarchyIndex, isClassHierarchyIndex,
isCompoundIndex, isCompoundIndex,
isFileIndex, isFileIndex,
isModuleDocumentation, isModuleDocumentation,
isNamespaceDocumentation,
isClassDocumentation, isClassDocumentation,
isFileDocumentation, isFileDocumentation,
isExampleDocumentation, isExampleDocumentation,
...@@ -50,16 +52,18 @@ void writeHeaderIndex(OutputList &ol); ...@@ -50,16 +52,18 @@ void writeHeaderIndex(OutputList &ol);
void writeHeaderFileList(OutputList &ol); void writeHeaderFileList(OutputList &ol);
void writeExampleIndex(OutputList &ol); void writeExampleIndex(OutputList &ol);
void writePageIndex(OutputList &ol); void writePageIndex(OutputList &ol);
void writeFunctionIndex(OutputList &ol); void writeFileMemberIndex(OutputList &ol);
void writeGroupIndex(OutputList &ol); void writeGroupIndex(OutputList &ol);
void writeNamespaceIndex(OutputList &ol); void writeNamespaceIndex(OutputList &ol);
void writeNamespaceMemberIndex(OutputList &ol);
int countClassHierarchy(); int countClassHierarchy();
int countMemberList(); int countClassMembers();
int countFunctionList(); int countFileMembers();
int countFileList(); int countFiles();
int countGroupList(); int countGroups();
int countNamespaceList(); int countNamespaces();
int countAnnotatedClasses(); int countAnnotatedClasses();
int countNamespaceMembers();
#endif #endif
...@@ -172,6 +172,10 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -172,6 +172,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Index}\n" t << "{"; //Module Index}\n"
break; break;
case isNamespaceIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Namespace Index}\"
break;
case isClassHierarchyIndex: case isClassHierarchyIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Hierarchical Index}\n" t << "{"; //Hierarchical Index}\n"
...@@ -200,17 +204,28 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -200,17 +204,28 @@ void LatexGenerator::startIndexSection(IndexSections is)
} }
} }
break; break;
case isNamespaceDocumentation:
{
NamespaceDef *nd=namespaceList.first();
bool found=FALSE;
while (nd && !found)
{
if (nd->hasDocumentation())
{
if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; // Namespace Documentation}\n":
found=TRUE;
}
nd=namespaceList.next();
}
}
break;
case isClassDocumentation: case isClassDocumentation:
{ {
ClassDef *cd=classList.first(); ClassDef *cd=classList.first();
bool found=FALSE; bool found=FALSE;
while (cd && !found) while (cd && !found)
{ {
//if (cd->classFile()[0]!='@' && !cd->getReference() &&
// (cd->hasDocumentation() || !hideClassFlag) &&
// (cd->protection()!=Private || extractPrivateFlag)
// )
if (!cd->isReference() && cd->isVisible()) if (!cd->isReference() && cd->isVisible())
{ {
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
...@@ -282,6 +297,9 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -282,6 +297,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isModuleIndex: case isModuleIndex:
t << "}\n\\input{modules}\n"; t << "}\n\\input{modules}\n";
break; break;
case isNamespaceIndex:
t << "}\n\\input{namespaces}\n";
break;
case isClassHierarchyIndex: case isClassHierarchyIndex:
t << "}\n\\input{hierarchy}\n"; t << "}\n\\input{hierarchy}\n";
break; break;
...@@ -299,7 +317,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -299,7 +317,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
{ {
if (gd->hasDocumentation() || gd->countMembers()>0) if (gd->hasDocumentation() || gd->countMembers()>0)
{ {
t << "}\n\\input{" << gd->groupFile() << "}\n"; t << "}\n\\input{" << gd->getOutputFileBase() << "}\n";
found=TRUE; found=TRUE;
} }
gd=groupList.next(); gd=groupList.next();
...@@ -309,12 +327,36 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -309,12 +327,36 @@ void LatexGenerator::endIndexSection(IndexSections is)
if (gd->hasDocumentation() || gd->countMembers()>0) if (gd->hasDocumentation() || gd->countMembers()>0)
{ {
if (compactLatexFlag) t << "\\input"; else t << "\\include"; if (compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << gd->groupFile() << "}\n"; t << "{" << gd->getOutputFileBase() << "}\n";
} }
gd=groupList.next(); gd=groupList.next();
} }
} }
break; break;
case isNamespaceDocumentation:
{
NamespaceDef *nd=namespaceList.first();
bool found=FALSE;
while (nd && !found)
{
if (nd->hasDocumentation() || nd->countMembers()>0)
{
t << "}\n\\input{" << nd->getOutputFileBase() << "}\n";
found=TRUE;
}
nd=namespaceList.next();
}
while (nd)
{
if (nd->hasDocumentation() || nd->countMembers()>0)
{
if (compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << nd->getOutputFileBase() << "}\n";
}
nd=namespaceList.next();
}
}
break;
case isClassDocumentation: case isClassDocumentation:
{ {
ClassDef *cd=classList.first(); ClassDef *cd=classList.first();
...@@ -327,7 +369,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -327,7 +369,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
// ) // )
if (!cd->isReference() && cd->isVisible()) if (!cd->isReference() && cd->isVisible())
{ {
t << "}\n\\input{" << cd->classFile() << "}\n"; t << "}\n\\input{" << cd->getOutputFileBase() << "}\n";
found=TRUE; found=TRUE;
} }
cd=classList.next(); cd=classList.next();
...@@ -341,7 +383,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -341,7 +383,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
if (!cd->isReference() && cd->isVisible()) if (!cd->isReference() && cd->isVisible())
{ {
if (compactLatexFlag) t << "\\input"; else t << "\\include"; if (compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << cd->classFile() << "}\n"; t << "{" << cd->getOutputFileBase() << "}\n";
} }
cd=classList.next(); cd=classList.next();
} }
...@@ -360,13 +402,13 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -360,13 +402,13 @@ void LatexGenerator::endIndexSection(IndexSections is)
{ {
if (isFirst) if (isFirst)
{ {
t << "}\n\\input{" << fd->diskName() << "}\n"; t << "}\n\\input{" << fd->getOutputFileBase() << "}\n";
isFirst=FALSE; isFirst=FALSE;
} }
else else
{ {
if (compactLatexFlag) t << "\\input" ; else t << "\\include"; if (compactLatexFlag) t << "\\input" ; else t << "\\include";
t << "{" << fd->diskName() << "}\n"; t << "{" << fd->getOutputFileBase() << "}\n";
} }
} }
fd=fn->next(); fd=fn->next();
...@@ -670,6 +712,11 @@ void LatexGenerator::writeDoxyAnchor(const char *clname,const char *anchor,const ...@@ -670,6 +712,11 @@ void LatexGenerator::writeDoxyAnchor(const char *clname,const char *anchor,const
t << "}" << endl; t << "}" << endl;
} }
void LatexGenerator::writeLatexLabel(const char *clName,const char *anchor)
{
writeDoxyAnchor(clName,anchor,0);
}
void LatexGenerator::addToIndex(const char *s1,const char *s2) void LatexGenerator::addToIndex(const char *s1,const char *s2)
{ {
if (s1) if (s1)
...@@ -709,6 +756,15 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab, ...@@ -709,6 +756,15 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
t << "}{\\ref{" << lab << "}}" << endl; t << "}{\\ref{" << lab << "}}" << endl;
} }
void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
const char *title)
{
startBold();
docify(title);
endBold();
t << " (p. \\pageref{" << lab << "})" << endl;
}
//void LatexGenerator::docify(const char *str) //void LatexGenerator::docify(const char *str)
//{ //{
// docifyStatic(t,str); // docifyStatic(t,str);
......
...@@ -79,17 +79,20 @@ class LatexGenerator : public OutputGenerator ...@@ -79,17 +79,20 @@ class LatexGenerator : public OutputGenerator
void endGroupHeader(); void endGroupHeader();
void writeListItem() { t << "\\item " << endl; } void writeListItem() { t << "\\item " << endl; }
void startMemberSections() {}
void endMemberSections() {}
void startMemberHeader() { startGroupHeader(); } void startMemberHeader() { startGroupHeader(); }
void endMemberHeader() { endGroupHeader(); } void endMemberHeader() { endGroupHeader(); }
void startMemberList() { t << "\\begin{CompactItemize}" << endl; } void startMemberList() { t << "\\begin{CompactItemize}" << endl; }
void endMemberList() { t << "\\end{CompactItemize}" << endl; } void endMemberList() { t << "\\end{CompactItemize}" << endl; }
void startMemberItem() { t << "\\item " << endl; } void startMemberItem() { t << "\\item " << endl; }
void endMemberItem() { t << endl; } void endMemberItem() { t << endl; }
void insertMemberAlign() {}
void writeRuler() { t << "\\vspace{0.4cm}\\hrule\\vspace{0.2cm}"; } void writeRuler() { t << "\\vspace{0.4cm}\\hrule\\vspace{0.2cm}"; }
void writeAnchor(const char *) {} void writeAnchor(const char *name) { t << "\\label{" << name << "}" << endl; }
void startCodeFragment() { t << "\\small\\begin{verbatim}"; } void startCodeFragment() { t << "\\small\\begin{verbatim}"; }
void endCodeFragment() { t << "\\end{verbatim}\\normalsize "; } void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void writeBoldString(const char *text) void writeBoldString(const char *text)
{ t << "{\\bf "; docify(text); t << "}"; } { t << "{\\bf "; docify(text); t << "}"; }
void startEmphasis() { t << "{\\em "; } void startEmphasis() { t << "{\\em "; }
...@@ -99,13 +102,14 @@ class LatexGenerator : public OutputGenerator ...@@ -99,13 +102,14 @@ class LatexGenerator : public OutputGenerator
void startDescription() { t << "\\begin{description}" << endl; } void startDescription() { t << "\\begin{description}" << endl; }
void endDescription() { t << "\\end{description}" << endl; } void endDescription() { t << "\\end{description}" << endl; }
void startDescItem() { t << "\\item["; } void startDescItem() { t << "\\item["; }
void endDescItem() { t << "]"; } void endDescItem() { t << "]" << endl; }
void lineBreak() { t << "\\par\n"; } void lineBreak() { t << "\\par\n"; }
void startMemberDoc(const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *);
void endMemberDoc() { t << "}"; } void endMemberDoc() { t << "}"; }
void writeDoxyAnchor(const char *,const char *,const char *); void writeDoxyAnchor(const char *,const char *,const char *);
void writeChar(char c); void writeChar(char c);
void writeLatexSpacing() { t << "\\hspace{0.3cm}"; } void writeLatexSpacing() { t << "\\hspace{0.3cm}"; }
void writeLatexLabel(const char *scope,const char *anchor);
void writeStartAnnoItem(const char *type,const char *file, void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name); const char *path,const char *name);
void writeEndAnnoItem(const char *name); void writeEndAnnoItem(const char *name);
...@@ -148,11 +152,12 @@ class LatexGenerator : public OutputGenerator ...@@ -148,11 +152,12 @@ class LatexGenerator : public OutputGenerator
void endMemberDescription() { t << "\\item\\end{CompactList}"; } void endMemberDescription() { t << "\\item\\end{CompactList}"; }
void startDescList() { t << "\\begin{Desc}\\item["; } void startDescList() { t << "\\begin{Desc}\\item["; }
void endDescTitle() { t << "]"; } void endDescTitle() { t << "]"; }
void writeDescItem() { t << "\\par "; } void writeDescItem() { t << "\\par" << endl; }
void endDescList() { t << "\\end{Desc}"; } void endDescList() { t << "\\end{Desc}"; }
void writeSection(const char *,const char *,bool); void writeSection(const char *,const char *,bool);
void writeSectionRef(const char *,const char *,const char *); void writeSectionRef(const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *);
void addToIndex(const char *,const char *); void addToIndex(const char *,const char *);
void startIndent() {} void startIndent() {}
void endIndent() {} void endIndent() {}
......
...@@ -78,7 +78,7 @@ void ManGenerator::startFile(const char *name,const char *,bool) ...@@ -78,7 +78,7 @@ void ManGenerator::startFile(const char *name,const char *,bool)
{ {
fileName=fileName.left(i); fileName=fileName.left(i);
} }
if (fileName.right(2)!=".3") fileName+=".3"; if (fileName.right(2)!=manExtension) fileName+=manExtension;
startPlainFile(fileName); startPlainFile(fileName);
firstCol=TRUE; firstCol=TRUE;
} }
......
...@@ -77,8 +77,11 @@ class ManGenerator : public OutputGenerator ...@@ -77,8 +77,11 @@ class ManGenerator : public OutputGenerator
void endTypewriter() { t << "\\fR"; firstCol=FALSE; } void endTypewriter() { t << "\\fR"; firstCol=FALSE; }
void startGroupHeader(); void startGroupHeader();
void endGroupHeader(); void endGroupHeader();
void startMemberSections() {}
void endMemberSections() {}
void startMemberHeader(); void startMemberHeader();
void endMemberHeader(); void endMemberHeader();
void insertMemberAlign() {}
void writeListItem(); void writeListItem();
void startMemberList() { t << "\n.in +1c"; firstCol=FALSE; } void startMemberList() { t << "\n.in +1c"; firstCol=FALSE; }
void endMemberList() { t << "\n.in -1c"; firstCol=FALSE; } void endMemberList() { t << "\n.in -1c"; firstCol=FALSE; }
...@@ -107,6 +110,7 @@ class ManGenerator : public OutputGenerator ...@@ -107,6 +110,7 @@ class ManGenerator : public OutputGenerator
void endMemberDoc() {} void endMemberDoc() {}
void writeDoxyAnchor(const char *clName,const char *anchor,const char *name); void writeDoxyAnchor(const char *clName,const char *anchor,const char *name);
void writeLatexSpacing() {} void writeLatexSpacing() {}
void writeLatexLabel(const char *,const char *) {}
void writeStartAnnoItem(const char *type,const char *file, void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name); const char *path,const char *name);
void writeEndAnnoItem(const char *) { t << endl; firstCol=TRUE; } void writeEndAnnoItem(const char *) { t << endl; firstCol=TRUE; }
...@@ -144,6 +148,7 @@ class ManGenerator : public OutputGenerator ...@@ -144,6 +148,7 @@ class ManGenerator : public OutputGenerator
void writeSection(const char *,const char *,bool) {} void writeSection(const char *,const char *,bool) {}
void writeSectionRef(const char *,const char *,const char *) {} void writeSectionRef(const char *,const char *,const char *) {}
void writeSectionRefItem(const char *,const char *,const char *) {} void writeSectionRefItem(const char *,const char *,const char *) {}
void writeSectionRefAnchor(const char *,const char *,const char *) {}
void addToIndex(const char *,const char *) {} void addToIndex(const char *,const char *) {}
void startIndent() {} void startIndent() {}
void endIndent() {} void endIndent() {}
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "membername.h" #include "membername.h"
#include "doxygen.h" #include "doxygen.h"
#include "util.h" #include "util.h"
#include "message.h"
/*! Creates a new member definition. /*! Creates a new member definition.
* Members can be function/variables/enums/etc. inside a class or inside a * Members can be function/variables/enums/etc. inside a class or inside a
...@@ -159,7 +160,7 @@ bool MemberDef::hasExamples() ...@@ -159,7 +160,7 @@ bool MemberDef::hasExamples()
return exampleList->count()>0; return exampleList->count()>0;
} }
#if 0
void MemberDef::writeExample(OutputList &ol) void MemberDef::writeExample(OutputList &ol)
{ {
Example *e=exampleList->first(); Example *e=exampleList->first();
...@@ -177,4 +178,27 @@ void MemberDef::writeExample(OutputList &ol) ...@@ -177,4 +178,27 @@ void MemberDef::writeExample(OutputList &ol)
} }
ol.writeString("."); ol.writeString(".");
} }
#endif
QString MemberDef::getOutputFileBase() const
{
if (classDef)
{
return classDef->getOutputFileBase();
}
else if (fileDef)
{
return fileDef->getOutputFileBase();
}
else if (fileDec)
{
return fileDec->getOutputFileBase();
}
else if (nspace)
{
return nspace->getOutputFileBase();
}
warn("Warning: Internal inconsistency: member %s does not belong to any\n"
" container!\n",name().data());
return "dummy";
}
...@@ -55,6 +55,7 @@ class MemberDef : public Definition ...@@ -55,6 +55,7 @@ class MemberDef : public Definition
const ArgumentList *al); const ArgumentList *al);
~MemberDef(); ~MemberDef();
QString getOutputFileBase() const;
const char *declaration() const { return decl; } const char *declaration() const { return decl; }
const char *definition() const { return def; } const char *definition() const { return def; }
const char *typeString() const { return type; } const char *typeString() const { return type; }
...@@ -72,6 +73,7 @@ class MemberDef : public Definition ...@@ -72,6 +73,7 @@ class MemberDef : public Definition
void setFileDef(FileDef *fd) { fileDef=fd; } void setFileDef(FileDef *fd) { fileDef=fd; }
void setFileDec(FileDef *fd) { fileDec=fd; } void setFileDec(FileDef *fd) { fileDec=fd; }
void setAnchor(const char *a) { ref=a; } void setAnchor(const char *a) { ref=a; }
void setProtection(Protection p) { prot=p; }
FileDef *getFileDef() { return fileDef; } FileDef *getFileDef() { return fileDef; }
FileDef *getFileDec() { return fileDec; } FileDef *getFileDec() { return fileDec; }
void setMemberClass(ClassDef *cd) { classDef=cd; } void setMemberClass(ClassDef *cd) { classDef=cd; }
...@@ -105,8 +107,9 @@ class MemberDef : public Definition ...@@ -105,8 +107,9 @@ class MemberDef : public Definition
// example related members // example related members
bool addExample(const char *anchor,const char *name,const char *file); bool addExample(const char *anchor,const char *name,const char *file);
void writeExample(OutputList &ol); //void writeExample(OutputList &ol);
bool hasExamples(); bool hasExamples();
ExampleList *getExampleList() const { return exampleList; }
// prototype related members // prototype related members
const char *getDefFile() { return defFile; } const char *getDefFile() { return defFile; }
......
...@@ -43,7 +43,10 @@ void MemberList::countDecMembers() ...@@ -43,7 +43,10 @@ void MemberList::countDecMembers()
if ((!hideMemberFlag || md->hasDocumentation()) && if ((!hideMemberFlag || md->hasDocumentation()) &&
(!hideMemberFlag || !md->documentation().isEmpty() || (!hideMemberFlag || !md->documentation().isEmpty() ||
briefMemDescFlag || repeatBriefFlag briefMemDescFlag || repeatBriefFlag
) || extractAllFlag ) || extractAllFlag ||
(md->isEnumerate() &&
md->hasDocumentedEnumValues()
)
) )
{ {
switch(md->memberType()) switch(md->memberType())
......
...@@ -22,12 +22,14 @@ ...@@ -22,12 +22,14 @@
#include "classdef.h" #include "classdef.h"
#include "classlist.h" #include "classlist.h"
#include "memberlist.h" #include "memberlist.h"
#include "doxygen.h"
NamespaceDef::NamespaceDef(const char *name) : Definition(name) NamespaceDef::NamespaceDef(const char *name,const char *ref) : Definition(name)
{ {
fileName="namespace_"+nameToFile(name); fileName="namespace_"+nameToFile(name);
classList = new ClassList; classList = new ClassList;
memList = new MemberList; memList = new MemberList;
reference=ref;
} }
NamespaceDef::~NamespaceDef() NamespaceDef::~NamespaceDef()
...@@ -61,18 +63,21 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -61,18 +63,21 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
QString pageTitle=name()+" Namespace Reference"; QString pageTitle=name()+" Namespace Reference";
startFile(ol,fileName,pageTitle); startFile(ol,fileName,pageTitle);
startTitle(ol); startTitle(ol);
ol.docify(pageTitle); //ol.docify(pageTitle);
parseText(ol,theTranslator->trNamespaceReference(name()));
endTitle(ol,name()); endTitle(ol,name());
if (genTagFile.length()>0) tagFile << "%" << name() << ":\n";
OutputList briefOutput(&ol); OutputList briefOutput(&ol);
if (briefDescription()) if (briefDescription())
{ {
parseDoc(briefOutput,0,0,briefDescription()); parseDoc(briefOutput,name(),0,briefDescription());
ol+=briefOutput; ol+=briefOutput;
ol.writeString(" \n"); ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"details"); ol.startTextLink(0,"_details");
parseDoc(ol,0,0,theTranslator->trMore()); parseText(ol,theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
ol.enableAll(); ol.enableAll();
} }
...@@ -81,6 +86,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -81,6 +86,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Man);
ol.writeSynopsis(); ol.writeSynopsis();
ol.startMemberSections();
if (classList->count()>0) if (classList->count()>0)
{ {
ClassDef *cd=classList->first(); ClassDef *cd=classList->first();
...@@ -92,7 +98,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -92,7 +98,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
if (!found) if (!found)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseDoc(ol,0,0,theTranslator->trCompounds()); parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader(); ol.endMemberHeader();
ol.startMemberList(); ol.startMemberList();
found=TRUE; found=TRUE;
...@@ -111,10 +117,11 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -111,10 +117,11 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
case ClassDef::Union: ol.writeString("union"); break; case ClassDef::Union: ol.writeString("union"); break;
} }
ol.writeString(" "); ol.writeString(" ");
ol.insertMemberAlign();
if (cd->hasDocumentation()) if (cd->hasDocumentation())
{ {
ol.writeObjectLink(cd->getReference(), ol.writeObjectLink(cd->getReference(),
cd->classFile(), cd->getOutputFileBase(),
0, 0,
clName clName
); );
...@@ -133,13 +140,17 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -133,13 +140,17 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
} }
writeMemberDecs(ol,0,this,0,0,0,memList); writeMemberDecs(ol,0,this,0,0,0,memList);
ol.endMemberSections();
if (!briefDescription().isEmpty() || !documentation().isEmpty()) if (!briefDescription().isEmpty() || !documentation().isEmpty())
{ {
ol.writeRuler(); ol.writeRuler();
ol.writeAnchor("details"); bool latexOn = ol.isEnabled(OutputGenerator::Latex);
if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor("_details");
if (latexOn) ol.enable(OutputGenerator::Latex);
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trDetailedDescription()); parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
if (!briefDescription().isEmpty()) if (!briefDescription().isEmpty())
{ {
...@@ -148,7 +159,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -148,7 +159,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
} }
if (!documentation().isEmpty()) if (!documentation().isEmpty())
{ {
parseDoc(ol,0,0,documentation()+"\n"); parseDoc(ol,name(),0,documentation()+"\n");
ol.newParagraph(); ol.newParagraph();
} }
} }
...@@ -159,7 +170,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -159,7 +170,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trFunctionPrototypeDocumentation()); parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Prototype); writeMemberDocs(ol,memList,name(),MemberDef::Prototype);
} }
...@@ -168,7 +179,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -168,7 +179,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trTypedefDocumentation()); parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Typedef); writeMemberDocs(ol,memList,name(),MemberDef::Typedef);
} }
...@@ -177,7 +188,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -177,7 +188,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trEnumerationTypeDocumentation()); parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Enumeration); writeMemberDocs(ol,memList,name(),MemberDef::Enumeration);
} }
...@@ -186,7 +197,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -186,7 +197,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trEnumerationValueDocumentation()); parseText(ol,theTranslator->trEnumerationValueDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::EnumValue); writeMemberDocs(ol,memList,name(),MemberDef::EnumValue);
} }
...@@ -195,7 +206,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -195,7 +206,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trFunctionDocumentation()); parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Function); writeMemberDocs(ol,memList,name(),MemberDef::Function);
} }
...@@ -204,7 +215,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -204,7 +215,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trVariableDocumentation()); parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader(); ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Variable); writeMemberDocs(ol,memList,name(),MemberDef::Variable);
} }
...@@ -212,9 +223,15 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -212,9 +223,15 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
// write Author section (Man only) // write Author section (Man only)
ol.disableAllBut(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader(); ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trAuthor()); parseText(ol,theTranslator->trAuthor());
ol.endGroupHeader(); ol.endGroupHeader();
parseDoc(ol,0,0,theTranslator->trGeneratedAutomatically(projectName)); parseText(ol,theTranslator->trGeneratedAutomatically(projectName));
ol.enableAll(); ol.enableAll();
endFile(ol); endFile(ol);
} }
int NamespaceDef::countMembers()
{
memList->countDocMembers();
return memList->totalCount()+classList->count();
}
...@@ -31,16 +31,20 @@ class MemberDef; ...@@ -31,16 +31,20 @@ class MemberDef;
class NamespaceDef : public Definition class NamespaceDef : public Definition
{ {
public: public:
NamespaceDef(const char *name); NamespaceDef(const char *name,const char *ref=0);
~NamespaceDef(); ~NamespaceDef();
QString namespaceFile() const { return fileName; } //QString namespaceFile() const { return fileName; }
QString getOutputFileBase() const { return fileName; }
void insertUsedFile(const char *fname); void insertUsedFile(const char *fname);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void insertClass(ClassDef *cd); void insertClass(ClassDef *cd);
void insertMember(MemberDef *md); void insertMember(MemberDef *md);
void computeAnchors(); void computeAnchors();
int countMembers();
const char *getReference() { return reference; }
private: private:
QString reference;
QString fileName; QString fileName;
QStrList files; QStrList files;
ClassList *classList; ClassList *classList;
......
...@@ -84,12 +84,15 @@ class OutputGenerator ...@@ -84,12 +84,15 @@ class OutputGenerator
virtual void endGroupHeader() = 0; virtual void endGroupHeader() = 0;
virtual void writeListItem() = 0; virtual void writeListItem() = 0;
virtual void startMemberSections() = 0;
virtual void endMemberSections() = 0;
virtual void startMemberHeader() = 0; virtual void startMemberHeader() = 0;
virtual void endMemberHeader() = 0; virtual void endMemberHeader() = 0;
virtual void startMemberList() = 0; virtual void startMemberList() = 0;
virtual void endMemberList() = 0; virtual void endMemberList() = 0;
virtual void startMemberItem() = 0; virtual void startMemberItem() = 0;
virtual void endMemberItem() = 0; virtual void endMemberItem() = 0;
virtual void insertMemberAlign() = 0;
virtual void writeRuler() = 0; virtual void writeRuler() = 0;
virtual void writeAnchor(const char *name) = 0; virtual void writeAnchor(const char *name) = 0;
...@@ -103,6 +106,7 @@ class OutputGenerator ...@@ -103,6 +106,7 @@ class OutputGenerator
virtual void endMemberDoc() = 0; virtual void endMemberDoc() = 0;
virtual void writeDoxyAnchor(const char *clName,const char *anchor,const char *name) = 0; virtual void writeDoxyAnchor(const char *clName,const char *anchor,const char *name) = 0;
virtual void writeLatexSpacing() = 0; virtual void writeLatexSpacing() = 0;
virtual void writeLatexLabel(const char *clName,const char *anchor) = 0;
virtual void writeStartAnnoItem(const char *type,const char *file, virtual void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name) = 0; const char *path,const char *name) = 0;
virtual void writeEndAnnoItem(const char *name) = 0; virtual void writeEndAnnoItem(const char *name) = 0;
...@@ -144,6 +148,7 @@ class OutputGenerator ...@@ -144,6 +148,7 @@ class OutputGenerator
virtual void writeSection(const char *,const char *,bool) = 0; virtual void writeSection(const char *,const char *,bool) = 0;
virtual void writeSectionRef(const char *,const char *,const char *) = 0; virtual void writeSectionRef(const char *,const char *,const char *) = 0;
virtual void writeSectionRefItem(const char *,const char *,const char *) = 0; virtual void writeSectionRefItem(const char *,const char *,const char *) = 0;
virtual void writeSectionRefAnchor(const char *,const char *,const char *) = 0;
virtual void lineBreak() = 0; virtual void lineBreak() = 0;
virtual void addToIndex(const char *s1,const char *s2) = 0; virtual void addToIndex(const char *s1,const char *s2) = 0;
virtual void startIndent() = 0; virtual void startIndent() = 0;
......
...@@ -129,6 +129,10 @@ class OutputList ...@@ -129,6 +129,10 @@ class OutputList
{ forall(&OutputGenerator::endGroupHeader); } { forall(&OutputGenerator::endGroupHeader); }
void writeListItem() void writeListItem()
{ forall(&OutputGenerator::writeListItem); } { forall(&OutputGenerator::writeListItem); }
void startMemberSections()
{ forall(&OutputGenerator::startMemberSections); }
void endMemberSections()
{ forall(&OutputGenerator::endMemberSections); }
void startMemberHeader() void startMemberHeader()
{ forall(&OutputGenerator::startMemberHeader); } { forall(&OutputGenerator::startMemberHeader); }
void endMemberHeader() void endMemberHeader()
...@@ -141,6 +145,8 @@ class OutputList ...@@ -141,6 +145,8 @@ class OutputList
{ forall(&OutputGenerator::startMemberItem); } { forall(&OutputGenerator::startMemberItem); }
void endMemberItem() void endMemberItem()
{ forall(&OutputGenerator::endMemberItem); } { forall(&OutputGenerator::endMemberItem); }
void insertMemberAlign()
{ forall(&OutputGenerator::insertMemberAlign); }
void writeRuler() void writeRuler()
{ forall(&OutputGenerator::writeRuler); } { forall(&OutputGenerator::writeRuler); }
void writeAnchor(const char *name) void writeAnchor(const char *name)
...@@ -165,6 +171,8 @@ class OutputList ...@@ -165,6 +171,8 @@ class OutputList
{ forall(&OutputGenerator::writeDoxyAnchor,clName,anchor,name); } { forall(&OutputGenerator::writeDoxyAnchor,clName,anchor,name); }
void writeLatexSpacing() void writeLatexSpacing()
{ forall(&OutputGenerator::writeLatexSpacing); } { forall(&OutputGenerator::writeLatexSpacing); }
void writeLatexLabel(const char *scope,const char *anchor)
{ forall(&OutputGenerator::writeLatexLabel,scope,anchor); }
void startDescription() void startDescription()
{ forall(&OutputGenerator::startDescription); } { forall(&OutputGenerator::startDescription); }
void endDescription() void endDescription()
...@@ -251,6 +259,8 @@ class OutputList ...@@ -251,6 +259,8 @@ class OutputList
{ forall(&OutputGenerator::writeSectionRef,page,lab,title); } { forall(&OutputGenerator::writeSectionRef,page,lab,title); }
void writeSectionRefItem(const char *page,const char *lab, const char *title) void writeSectionRefItem(const char *page,const char *lab, const char *title)
{ forall(&OutputGenerator::writeSectionRefItem,page,lab,title); } { forall(&OutputGenerator::writeSectionRefItem,page,lab,title); }
void writeSectionRefAnchor(const char *page,const char *lab, const char *title)
{ forall(&OutputGenerator::writeSectionRefAnchor,page,lab,title); }
void addToIndex(const char *s1,const char *s2) void addToIndex(const char *s1,const char *s2)
{ forall(&OutputGenerator::addToIndex,s1,s2); } { forall(&OutputGenerator::addToIndex,s1,s2); }
void writeSynopsis() void writeSynopsis()
......
...@@ -1160,11 +1160,11 @@ BN [ \t\r\n] ...@@ -1160,11 +1160,11 @@ BN [ \t\r\n]
<SkipCommand>. <SkipCommand>.
<SkipLine>[^/\n]+ <SkipLine>[^/\n]+
<SkipLine>. <SkipLine>.
<SkipLine>"//" { <SkipLine,SkipCommand,SkipCPPBlock>"//" {
lastCPPContext=YY_START; lastCPPContext=YY_START;
BEGIN(RemoveCPPComment); BEGIN(RemoveCPPComment);
} }
<SkipLine>"/*" { <SkipLine,SkipCommand,SkipCPPBlock>"/*" {
lastCContext=YY_START; lastCContext=YY_START;
BEGIN(RemoveCComment); BEGIN(RemoveCComment);
} }
......
...@@ -31,4 +31,5 @@ extern void parseDoc(OutputList &ol,const char *clName, const char *memName, ...@@ -31,4 +31,5 @@ extern void parseDoc(OutputList &ol,const char *clName, const char *memName,
const QString &docString); const QString &docString);
extern void parseExample(OutputList &ol,const QString &docString, extern void parseExample(OutputList &ol,const QString &docString,
const char *fileName); const char *fileName);
extern void parseText(OutputList &ol,const QString &txtString);
#endif #endif
This diff is collapsed.
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#ifndef SECTION_H
#define SECTION_H
#include <qlist.h>
#include <qdict.h>
#include <qstring.h>
class Definition;
struct SectionInfo
{
enum SectionType { Section, Subsection, Anchor };
SectionInfo(const char *l,const char *t,SectionType st)
{ label=l; title=t; type=st; definition=0; }
QString fileName;
QString label;
QString title;
SectionType type;
Definition *definition;
};
class SectionList : public QList<SectionInfo>
{
};
class SectionDict : public QDict<SectionInfo>
{
public:
SectionDict(int size) : QDict<SectionInfo>(size) {}
};
#endif
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "classdef.h" #include "classdef.h"
#include "filedef.h" #include "filedef.h"
#include "namespacedef.h"
#include "memberdef.h" #include "memberdef.h"
#include "doxygen.h" #include "doxygen.h"
#include "util.h" #include "util.h"
...@@ -36,12 +37,14 @@ ...@@ -36,12 +37,14 @@
static int yyLineNr; static int yyLineNr;
static QString className; static QString className;
static QString fileName; static QString fileName;
static QString namespaceName;
static QString tagName; static QString tagName;
static QString memberName; static QString memberName;
static QString anchorName; static QString anchorName;
static QString argString; static QString argString;
static ClassDef *cd; static ClassDef *cd;
static FileDef *fd; static FileDef *fd;
static NamespaceDef *nd;
static void addClass(const char *name,const char *fileName) static void addClass(const char *name,const char *fileName)
{ {
...@@ -50,6 +53,7 @@ static void addClass(const char *name,const char *fileName) ...@@ -50,6 +53,7 @@ static void addClass(const char *name,const char *fileName)
{ {
cd = new ClassDef(name,ClassDef::Class,tagName,fileName); cd = new ClassDef(name,ClassDef::Class,tagName,fileName);
fd = 0; fd = 0;
nd = 0;
classList.inSort(cd); classList.inSort(cd);
classDict.insert(className,cd); classDict.insert(className,cd);
} }
...@@ -72,10 +76,27 @@ static void addFile(const char *name) ...@@ -72,10 +76,27 @@ static void addFile(const char *name)
inputNameDict.insert(name,mn); inputNameDict.insert(name,mn);
} }
cd = 0; cd = 0;
nd = 0;
//fileList.inSort(fd); //fileList.inSort(fd);
//fileDict.insert(fileName,fd); //fileDict.insert(fileName,fd);
} }
static void addNamespace(const char *name)
{
if ((nd=namespaceDict[name])==0)
{
// TODO: we assume that each namespace is limited to a single tagfile.
// since namespace are open, this need not to be the case. As a result
// namespace may contain members that are located in
// different namespaces!
nd = new NamespaceDef(name,tagName);
namespaceList.inSort(nd);
namespaceDict.insert(name,nd);
}
cd = 0;
fd = 0;
}
static void addMember(const char *name,const char *anchor,const char *args) static void addMember(const char *name,const char *anchor,const char *args)
{ {
//printf("adding member %s\n",name); //printf("adding member %s\n",name);
...@@ -87,21 +108,24 @@ static void addMember(const char *name,const char *anchor,const char *args) ...@@ -87,21 +108,24 @@ static void addMember(const char *name,const char *anchor,const char *args)
md=new MemberDef(0,name,args,0,Public,Normal,FALSE,FALSE, md=new MemberDef(0,name,args,0,Public,Normal,FALSE,FALSE,
MemberDef::Function,0,0); MemberDef::Function,0,0);
md->setReference(anchor); md->setReference(anchor);
if (cd) if (cd) // member of a class
{ {
//md=new MemberDef(cd,name,args,anchor,tagName);
md->setMemberClass(cd); md->setMemberClass(cd);
cd->insertMember(md); cd->insertMember(md);
//printf("Adding member %s %s to class\n",name,args);
mnd=&memberNameDict; mnd=&memberNameDict;
mnl=&memberNameList; mnl=&memberNameList;
} }
else else if (nd) // member of a namespace
{
md->setNamespace(nd);
nd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
else // member of a file
{ {
//md=new MemberDef(&unrelatedClass,name,args,anchor,tagName);
md->setFileDef(fd); md->setFileDef(fd);
fd->insertMember(md); fd->insertMember(md);
//printf("Adding global member %s %s\n",name,args);
mnd=&functionNameDict; mnd=&functionNameDict;
mnl=&functionNameList; mnl=&functionNameList;
} }
...@@ -130,6 +154,7 @@ static void addMember(const char *name,const char *anchor,const char *args) ...@@ -130,6 +154,7 @@ static void addMember(const char *name,const char *anchor,const char *args)
ID [a-z_A-Z][a-z_A-Z0-9]* ID [a-z_A-Z][a-z_A-Z0-9]*
FILE [a-z_A-Z0-9\.\-\+\:\\\/]+ FILE [a-z_A-Z0-9\.\-\+\:\\\/]+
SCOPE ({ID}"::")*{ID}
%x Pass1 %x Pass1
%x Pass2 %x Pass2
...@@ -139,18 +164,22 @@ FILE [a-z_A-Z0-9\.\-\+\:\\\/]+ ...@@ -139,18 +164,22 @@ FILE [a-z_A-Z0-9\.\-\+\:\\\/]+
%x ClassName1 %x ClassName1
%x ClassName2 %x ClassName2
%x FileName %x FileName
%x NamespaceName
%x BaseClasses %x BaseClasses
%x ClassFile1 %x ClassFile1
%x ClassFile2 %x ClassFile2
%% %%
<Pass1>^">" { <Pass1>^">" { // start of a class
BEGIN(ClassName1); BEGIN(ClassName1);
} }
<Pass1>^"&" { <Pass1>^"&" { // start of a file
BEGIN(FileName); BEGIN(FileName);
} }
<Pass1>^"%" { // start of a namespace
BEGIN(NamespaceName);
}
<Pass1>^[~a-z_A-Z][^ \n]*/" " { <Pass1>^[~a-z_A-Z][^ \n]*/" " {
memberName=yytext; memberName=yytext;
BEGIN(AnchorName); BEGIN(AnchorName);
...@@ -175,7 +204,12 @@ FILE [a-z_A-Z0-9\.\-\+\:\\\/]+ ...@@ -175,7 +204,12 @@ FILE [a-z_A-Z0-9\.\-\+\:\\\/]+
addFile(yytext); addFile(yytext);
BEGIN(Pass1); BEGIN(Pass1);
} }
<ClassName1>{ID}/":" { <NamespaceName>{SCOPE}/":" {
namespaceName=yytext;
addNamespace(yytext);
BEGIN(Pass1);
}
<ClassName1>{SCOPE}/":" {
className=yytext; className=yytext;
BEGIN(ClassFile1); BEGIN(ClassFile1);
} }
......
This diff is collapsed.
...@@ -255,7 +255,7 @@ class TranslatorFrench : public Translator ...@@ -255,7 +255,7 @@ class TranslatorFrench : public Translator
virtual QString trNamespaces() virtual QString trNamespaces()
{ return "Namespaces"; } { return "Namespaces"; }
virtual QString trNamespaceList() virtual QString trNamespaceList()
{ return "List des Namespaces"; } { return "Liste des Namespaces"; }
virtual QString trNamespaceListDescription(bool extractAll) virtual QString trNamespaceListDescription(bool extractAll)
{ {
QString result="Liste de tous les namespaces "; QString result="Liste de tous les namespaces ";
...@@ -265,6 +265,11 @@ class TranslatorFrench : public Translator ...@@ -265,6 +265,11 @@ class TranslatorFrench : public Translator
} }
virtual QString trFriends() virtual QString trFriends()
{ return "Friends"; } { return "Friends"; }
// new since 0.49-990405
virtual QString trRelatedFunctionDocumentation()
{ return "Documentation des fonctions amies et associées"; }
}; };
#endif #endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -46,7 +46,8 @@ extern QString dateToString(bool); ...@@ -46,7 +46,8 @@ extern QString dateToString(bool);
//extern OutputList linkifyText(const char *clName,const char *name, //extern OutputList linkifyText(const char *clName,const char *name,
// const char *text); // const char *text);
extern bool getDefs(const QString &memberName,const QString &className, extern bool getDefs(const QString &memberName,const QString &className,
const char *, MemberDef *&md, ClassDef *&cd,FileDef *&fd); const char *, MemberDef *&md, ClassDef *&cd,FileDef *&fd,
NamespaceDef *&nd);
extern void generateRef(OutputList &ol,const char *, extern void generateRef(OutputList &ol,const char *,
const char *,bool inSeeBlock,const char * =0); const char *,bool inSeeBlock,const char * =0);
extern void generateLink(OutputList &ol,const char *, extern void generateLink(OutputList &ol,const char *,
...@@ -78,5 +79,8 @@ void startFile(OutputList &ol,const char *name, ...@@ -78,5 +79,8 @@ void startFile(OutputList &ol,const char *name,
void endFile(OutputList &ol,bool external=FALSE); void endFile(OutputList &ol,bool external=FALSE);
void writeQuickLinks(OutputList &ol,bool compact,bool external=FALSE); void writeQuickLinks(OutputList &ol,bool compact,bool external=FALSE);
QString argListToString(ArgumentList *al); QString argListToString(ArgumentList *al);
QString generateMarker(int id);
void writeExample(OutputList &ol,ExampleList *el);
void setFileNameForSections(QList<QString> *anchorList,const char *fileName);
#endif #endif
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