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:
-----------------------------------
1. Unpack the archive, unless you already have:
gunzip doxygen-0.49-990425.src.tar.gz # uncompress the archive
tar xf doxygen-0.49-990425.src.tar # unpack it
gunzip doxygen-0.49-990522.src.tar.gz # uncompress the archive
tar xf doxygen-0.49-990522.src.tar # unpack it
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:
X-windows version as well!)
- Microsoft Visual C++ version 5.0, use the vcvars32.bat to set the environment
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.
......@@ -97,6 +101,11 @@ nmake -f Makefile.windows examples
-----------------------------------------------------------------------------
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:
- 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
Enjoy,
Dimitri van Heesch (25 April 1999)
Dimitri van Heesch (22 May 1999)
......@@ -9,4 +9,4 @@ PERL = perl
# The values below should probably be left unmodified
TAR = tar # name of the GNU tar tool
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.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (25 April 1999)
Dimitri van Heesch (22 May 1999)
......@@ -18,7 +18,7 @@
Most documentation systems have special `see also' sections where links
to other pieces of documentation can be inserted.
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.
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
......@@ -93,20 +93,7 @@
for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly
\subsection resolving Resolving of defines and 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
\subsection resolving typedefs.
Typedefs that involve classes, structs and unions, like
\verbatim
......
This diff is collapsed.
......@@ -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";
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";
\sa Section \ref cmdclass.
\sa Section \ref cmdclass "\\class".
</dl>
......@@ -216,7 +216,7 @@ Below is a list of tags that are recognized for each category.
\addindex EXAMPLE_PATH
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
the \\include command in section \ref cmdinclude).
the \\include command in section \ref cmdinclude "\\include").
<dt>\c INCLUDE_PATH <dd>
\addindex INCLUDE_PATH
......@@ -262,6 +262,7 @@ Below is a list of tags that are recognized for each category.
<HTML>
<HEAD>
<TITLE>My title</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
\endverbatim
......@@ -341,6 +342,10 @@ EXTRA_PACKAGES = times
A directory man3 will be created inside the directory specified by
\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>
\subsection config_prepro Preprocessor related options
......
......@@ -155,8 +155,9 @@ Ole Gerden,
Olaf Meeuwissen,
Feiyi Wang,
Robert J. Clark,
Matthias Baas and
Walter Mueller
Matthias Baas,
Walter Mueller, and
William van Dieten
for suggestions, patches and bug reports.
</ul>
*/
......
......@@ -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)
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>
*/
This diff is collapsed.
......@@ -49,10 +49,11 @@ class ClassDef : public Definition
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();
QString classFile() const { return fileName; }
int compoundType() const { return compType; }
//QString classFile() const { return fileName; }
QString getOutputFileBase() const { return fileName; }
CompoundType compoundType() const { return compType; }
const char *memberListFileName() const { return memListFileName; }
void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0);
BaseClassList *baseClasses() { return inherits; }
......@@ -75,7 +76,7 @@ class ClassDef : public Definition
void writeIncludeFile(OutputList &ol);
bool addExample(const char *anchor,const char *name, const char *file);
bool hasExamples();
void writeExample(OutputList &ol);
//void writeExample(OutputList &ol);
void setProtection(Protection p) { prot=p; }
Protection protection() const { return prot; }
bool isVisible()
......@@ -130,7 +131,7 @@ class ClassDef : public Definition
QString reference;
ExampleList *exampleList;
ExampleDict *exampleDict;
int compType;
CompoundType compType;
Protection prot;
};
......
......@@ -173,16 +173,19 @@ static void generateClassLink(OutputList &ol,const char *clName)
if (exampleBlock)
{
QString anchor;
anchor.sprintf("a%d",anchorCount);
anchor.sprintf("_a%d",anchorCount);
//printf("addExampleClass(%s,%s,%s)\n",anchor.data(),exampleName.data(),
// exampleFile.data());
if (cd->addExample(anchor,exampleName,exampleFile))
{
bool latexOn = ol.isEnabled(OutputGenerator::Latex);
if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor(anchor);
if (latexOn) ol.enable(OutputGenerator::Latex);
anchorCount++;
}
}
ol.writeCodeLink(cd->getReference(),cd->classFile(),0,className);
ol.writeCodeLink(cd->getReference(),cd->getOutputFileBase(),0,className);
}
else
{
......@@ -193,13 +196,14 @@ static void generateClassLink(OutputList &ol,const char *clName)
static bool getLink(const char *className,
const char *memberName,OutputList &result)
{
MemberDef *md;
ClassDef *cd;
FileDef *fd;
MemberDef *md;
ClassDef *cd;
FileDef *fd;
NamespaceDef *nd;
QString m=memberName;
QString c=className;
//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()))
{
//printf("Found!\n");
......@@ -217,13 +221,19 @@ static bool getLink(const char *className,
}
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);
return TRUE;
}
else if (fd)
{
result.writeCodeLink(fd->getReference(),fd->diskName(),
result.writeCodeLink(fd->getReference(),fd->getOutputFileBase(),
md->anchor(),memberName);
return TRUE;
}
......@@ -363,7 +373,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
if ((fd=findFileDef(&inputNameDict,yytext,ambig)) &&
fd->hasDocumentation())
{
code->writeCodeLink(0,fd->diskName(),0,yytext);
code->writeCodeLink(0,fd->getOutputFileBase(),0,yytext);
}
else
{
......
......@@ -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 paperType; // the page type to generate docs for
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 examplePath; // list of example paths
extern QStrList inputSources; // list of input files
......@@ -76,5 +77,6 @@ extern bool repeatBriefFlag; // repeat brief descriptions.
extern bool internalDocsFlag; // determines what happens to internal docs.
extern bool caseSensitiveNames; // determines if output can be mixed case.
extern bool verbatimHeaderFlag; // enable/disable generation of verb headers.
extern bool htmlAlignMemberFlag; // align members in HTML using tables.
#endif
......@@ -62,6 +62,7 @@ QString inputFilter;
QString paperType;
QString outputLanguage;
QString stripFromPath;
QString manExtension;
QStrList includePath;
QStrList examplePath;
QStrList inputSources;
......@@ -72,31 +73,32 @@ QStrList tagFileList;
QStrList extDocPathList;
QStrList predefined;
QStrList extraPackageList;
bool quietFlag = FALSE;
bool warningFlag = FALSE;
bool recursiveFlag = FALSE;
bool allExtFlag = FALSE;
bool searchEngineFlag = FALSE;
bool extractAllFlag = FALSE;
bool extractPrivateFlag = FALSE;
bool noIndexFlag = FALSE;
bool hideMemberFlag = FALSE;
bool hideClassFlag = FALSE;
bool macroExpansionFlag = FALSE;
bool onlyPredefinedFlag = FALSE;
bool fullPathNameFlag = FALSE;
bool compactLatexFlag = FALSE;
bool internalDocsFlag = FALSE;
bool caseSensitiveNames = FALSE;
bool generateHtml = TRUE;
bool generateLatex = TRUE;
bool generateMan = TRUE;
bool preprocessingFlag = TRUE;
bool briefMemDescFlag = TRUE;
bool searchIncludeFlag = TRUE;
bool classDiagramFlag = TRUE;
bool repeatBriefFlag = TRUE;
bool verbatimHeaderFlag = TRUE;
bool quietFlag = FALSE;
bool warningFlag = FALSE;
bool recursiveFlag = FALSE;
bool allExtFlag = FALSE;
bool searchEngineFlag = FALSE;
bool extractAllFlag = FALSE;
bool extractPrivateFlag = FALSE;
bool noIndexFlag = FALSE;
bool hideMemberFlag = FALSE;
bool hideClassFlag = FALSE;
bool macroExpansionFlag = FALSE;
bool onlyPredefinedFlag = FALSE;
bool fullPathNameFlag = FALSE;
bool compactLatexFlag = FALSE;
bool internalDocsFlag = FALSE;
bool caseSensitiveNames = FALSE;
bool generateHtml = TRUE;
bool generateLatex = TRUE;
bool generateMan = TRUE;
bool preprocessingFlag = TRUE;
bool briefMemDescFlag = TRUE;
bool searchIncludeFlag = TRUE;
bool classDiagramFlag = TRUE;
bool repeatBriefFlag = TRUE;
bool verbatimHeaderFlag = TRUE;
bool htmlAlignMemberFlag = TRUE;
/* -----------------------------------------------------------------
*
......@@ -162,7 +164,8 @@ static int yyread(char *buf,int max_size)
<Start>"INPUT_FILTER"[ \t]*"=" { BEGIN(GetString); s=&inputFilter; }
<Start>"PAPER_TYPE"[ \t]*"=" { BEGIN(GetString); s=&paperType; }
<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>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&examplePath; elemStr=""; }
<Start>"INPUT"[ \t]*"=" { BEGIN(GetStrList); l=&inputSources; elemStr=""; }
......@@ -198,6 +201,7 @@ static int yyread(char *buf,int max_size)
<Start>"INTERNAL_DOCS"[ \t]*"=" { BEGIN(GetBool); b=&internalDocsFlag; }
<Start>"CASE_SENSE_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&caseSensitiveNames; }
<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); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n {
......@@ -634,6 +638,15 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "HTML_FOOTER =\n";
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";
......@@ -701,6 +714,15 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "\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)
{
t << "\n";
......@@ -870,6 +892,12 @@ void checkConfig()
// 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();
if (paperType.isEmpty())
{
......
......@@ -16,6 +16,17 @@
#include <ctype.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)
{
......@@ -42,3 +53,22 @@ QString Definition::nameToFile(const char *name)
}
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 @@
#define DEFINITION_H
#include <qstring.h>
#include <qlist.h>
#include "config.h"
#include "section.h"
/*! The common base class of all definitions. */
class Definition
{
public:
//! create a new definition
Definition(const char *name,const char *b=0,const char *d=0)
{ n=name; brief=b; doc=d; }
Definition(const char *name,const char *b=0,const char *d=0);
//! destroys the definition
virtual ~Definition() {}
virtual ~Definition();
//! returns the name of the definition
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
QString documentation() const { return doc; }
//! returns the brief description of this definition
......@@ -55,10 +58,13 @@ class Definition
{ return !doc.isNull() || !brief.isNull() || extractAllFlag; }
QString nameToFile(const char *name);
void addSectionsToDefinition(QList<QString> *anchorList);
private:
QString n; // name of the definition
QString brief; // brief description
QString doc; // detailed description
SectionList *sectionList; // list of all sections
};
#endif
......@@ -152,7 +152,7 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,int x,int y,int w,int h)
{
t << "<area ";
if (cd->getReference()) t << "doxygen=\"" << cd->getReference() << ":\" ";
t << "href=\"" << cd->classFile() << ".html\" ";
t << "href=\"" << cd->getOutputFileBase() << ".html\" ";
t << "ALT=\"" << cd->name();
t << "\" shape=\"rect\" coords=\"" << x << "," << y << ",";
t << x+w << "," << y+h << "\">" << endl;
......@@ -187,7 +187,7 @@ QString DiagramItem::label() const
QString DiagramItem::fileName() const
{
return classDef->classFile();
return classDef->getOutputFileBase();
}
int DiagramItem::avgChildPos() const
......
This diff is collapsed.
......@@ -28,6 +28,7 @@
#include "define.h"
#include "namespacedef.h"
#include "formula.h"
#include "section.h"
struct PageInfo
{
......@@ -72,23 +73,12 @@ class BufStr : public QString
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 QDict<MemberDef> MemberDict;
typedef QDict<ClassDef> ClassDict;
typedef QDict<FileDef> FileDict;
typedef QDict<QString> StringDict;
typedef QDict<PageInfo> PageDict;
typedef QDict<SectionInfo> SectionDict;
typedef QDict<GroupDef> GroupDict;
extern const char * getOverloadDocs();
......@@ -118,6 +108,7 @@ extern FileList includeFiles;
extern StringDict typedefDict;
extern GroupList groupList;
extern NamespaceList namespaceList;
extern NamespaceDict namespaceDict;
extern FormulaList formulaList;
extern FormulaDict formulaDict;
extern FormulaDict formulaNameDict;
......@@ -130,5 +121,6 @@ extern int documentedDefines;
extern int documentedFiles;
extern int documentedGroups;
extern int documentedNamespaces;
extern int documentedNamespaceMembers;
#endif
......@@ -14,7 +14,7 @@
# TMake project file for doxygen
TEMPLATE = doxygen.t
CONFIG = console qt warn_on release #debug
CONFIG = console qt warn_on release #debug
HEADERS = doxygen.h scanner.h classdef.h classlist.h memberdef.h \
membername.h index.h memberlist.h definition.h \
entry.h logos.h instdox.h message.h code.h \
......
......@@ -251,7 +251,8 @@ QString unhtmlify(const char *str)
}
<SearchWords>[a-z_A-Z0-9]+ {
docAnchor = yytext;
if (docAnchor=="details")
if (docAnchor=="details" ||
docAnchor=="_details")
{
docRefName=className.copy();
addReference();
......
......@@ -29,6 +29,8 @@ Entry::Entry()
extends->setAutoDelete(TRUE);
groups = new QList<QString>;
groups->setAutoDelete(TRUE);
anchors = new QList<QString>;
anchors->setAutoDelete(TRUE);
argList = new ArgumentList;
argList->setAutoDelete(TRUE);
//printf("Entry::Entry() tArgList=0\n");
......@@ -66,6 +68,8 @@ Entry::Entry(const Entry &e)
extends->setAutoDelete(TRUE);
groups = new QList<QString>;
groups->setAutoDelete(TRUE);
anchors = new QList<QString>;
anchors->setAutoDelete(TRUE);
argList = new ArgumentList;
argList->setAutoDelete(TRUE);
//printf("Entry::Entry(copy) tArgList=0\n");
......@@ -94,6 +98,12 @@ Entry::Entry(const Entry &e)
{
groups->append(new QString(*s));
}
QListIterator<QString> sli2(*e.anchors);
for (;(s=sli2.current());++sli2)
{
anchors->append(new QString(*s));
}
// deep copy argument list
QListIterator<Argument> ali(*e.argList);
......@@ -128,6 +138,7 @@ Entry::~Entry()
delete sublist;
delete extends;
delete groups;
delete anchors;
delete argList;
//printf("Entry::~Entry() tArgList=%p\n",tArgList);
delete tArgList;
......@@ -177,6 +188,7 @@ void Entry::reset()
sublist->clear();
extends->clear();
groups->clear();
anchors->clear();
argList->clear();
if (tArgList) { delete tArgList; tArgList=0; }
}
......@@ -211,6 +223,13 @@ int Entry::getSize()
size+=s->length()+1;
s=groups->next();
}
s=anchors->first();
while (s)
{
size+=sizeof(QLNode);
size+=s->length()+1;
s=anchors->next();
}
Entry *e=sublist->first();
while (e)
{
......
......@@ -140,6 +140,7 @@ class Entry
QList<Entry> *sublist; // entries that are children of this one
QList<BaseInfo> *extends; // list of base classes
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
int startLine; // start line of entry in the source
int num;
......
......@@ -69,7 +69,7 @@ void FileDef::writeDocumentation(OutputList &ol)
QString pageTitle=name()+" File Reference";
startFile(ol,diskname,pageTitle);
startTitle(ol);
ol.docify(pageTitle);
parseText(ol,theTranslator->trFileReference(name()));
endTitle(ol,name());
//ol.newParagraph();
......@@ -86,8 +86,8 @@ void FileDef::writeDocumentation(OutputList &ol)
ol+=briefOutput;
ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"details");
parseDoc(ol,0,0,theTranslator->trMore());
ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore());
ol.endTextLink();
ol.enableAll();
}
......@@ -96,6 +96,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.enable(OutputGenerator::Man);
ol.writeSynopsis();
ol.startMemberSections();
if (classList->count()>0)
{
ClassDef *cd=classList->first();
......@@ -111,7 +112,7 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!found)
{
ol.startMemberHeader();
parseDoc(ol,0,0,theTranslator->trCompounds());
parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader();
ol.startMemberList();
found=TRUE;
......@@ -124,10 +125,11 @@ void FileDef::writeDocumentation(OutputList &ol)
case ClassDef::Union: ol.writeString("union"); break;
}
ol.writeString(" ");
ol.insertMemberAlign();
if (cd->hasDocumentation())
{
ol.writeObjectLink(cd->getReference(),
cd->classFile(),
cd->getOutputFileBase(),
0,
cd->name()
);
......@@ -146,6 +148,7 @@ void FileDef::writeDocumentation(OutputList &ol)
}
writeMemberDecs(ol,0,0,this,0,0,memList);
ol.endMemberSections();
//doc=doc.stripWhiteSpace();
//int bl=brief.length();
......@@ -153,9 +156,12 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!briefDescription().isEmpty() || !documentation().isEmpty())
{
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();
parseDoc(ol,0,0,theTranslator->trDetailedDescription());
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
if (!briefDescription().isEmpty())
{
......@@ -177,7 +183,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trDefineDocumentation());
parseText(ol,theTranslator->trDefineDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Define);
}
......@@ -186,7 +192,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trFunctionPrototypeDocumentation());
parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Prototype);
}
......@@ -195,7 +201,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trTypedefDocumentation());
parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Typedef);
}
......@@ -204,7 +210,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trEnumerationTypeDocumentation());
parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Enumeration);
}
......@@ -213,7 +219,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trEnumerationValueDocumentation());
parseText(ol,theTranslator->trEnumerationValueDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::EnumValue);
}
......@@ -222,7 +228,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trFunctionDocumentation());
parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Function);
}
......@@ -231,7 +237,7 @@ void FileDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trVariableDocumentation());
parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Variable);
}
......@@ -239,9 +245,9 @@ void FileDef::writeDocumentation(OutputList &ol)
// write Author section (Man only)
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trAuthor());
parseText(ol,theTranslator->trAuthor());
ol.endGroupHeader();
parseDoc(ol,0,0,theTranslator->trGeneratedAutomatically(projectName));
parseText(ol,theTranslator->trGeneratedAutomatically(projectName));
ol.enableAll();
endFile(ol);
}
......
......@@ -62,7 +62,8 @@ class FileDef : public Definition
}
/*! 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. */
QString absFilePath() const { return filepath; }
......
......@@ -90,20 +90,20 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol+=briefOutput;
ol.writeString(" \n");
ol.disable(OutputGenerator::Latex);
ol.startTextLink(0,"details");
parseDoc(ol,0,0,theTranslator->trMore());
ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore());
ol.enable(OutputGenerator::Latex);
}
if (fileList->count()>0)
{
ol.startMemberHeader();
parseDoc(ol,0,0,theTranslator->trFiles());
parseText(ol,theTranslator->trFiles());
ol.endMemberHeader();
ol.startIndexList();
FileDef *fd=fileList->first();
while (fd)
{
ol.writeStartAnnoItem("file ",fd->diskName(),0,fd->name());
ol.writeStartAnnoItem("file ",fd->getOutputFileBase(),0,fd->name());
ol.writeEndAnnoItem(fd->name());
fd=fileList->next();
}
......@@ -112,7 +112,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (classList->count()>0)
{
ol.startMemberHeader();
parseDoc(ol,0,0,theTranslator->trCompounds());
parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader();
ol.startIndexList();
ClassDef *cd=classList->first();
......@@ -125,7 +125,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
case ClassDef::Struct: type="struct"; 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());
cd=classList->next();
}
......@@ -136,9 +136,12 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!briefDescription().isEmpty() || !documentation().isEmpty())
{
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();
parseDoc(ol,0,0,theTranslator->trDetailedDescription());
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
// repeat brief description
if (!briefDescription().isEmpty())
......
......@@ -35,7 +35,8 @@ class GroupDef : public Definition
public:
GroupDef(const char *name,const char *title);
~GroupDef();
const char *groupFile() const { return fileName; }
//const char *groupFile() const { return fileName; }
QString getOutputFileBase() const { return fileName; }
const char *groupTitle() const { return title; }
void addFile(const FileDef *def);
void addClass(const ClassDef *def);
......
......@@ -51,77 +51,10 @@ void HtmlGenerator::init()
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)
{
QString fileName=name;
lastTitle=title;
if (fileName.right(5)!=".html") fileName+=".html";
startPlainFile(fileName);
if (header.length()==0)
......@@ -139,34 +72,14 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external)
}
else
{
t << header;
t << substitute(
substitute(
substitute(header,"$title",lastTitle),
"$datetime",dateToString(TRUE)
),
"$date",dateToString(FALSE)
);
}
// if (!noIndexFlag)
// {
// t << "<center>";
// 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)
......@@ -189,7 +102,13 @@ void HtmlGenerator::writeFooter(int part,bool external)
if (footer.length()==0)
t << "<hr><address><small>";
else
t << footer;
t << substitute(
substitute(
substitute(footer,"$title",lastTitle),
"$datetime",dateToString(TRUE)
),
"$date",dateToString(FALSE)
);
break;
case 1:
if (footer.length()==0)
......@@ -219,24 +138,6 @@ void HtmlGenerator::writeFooter(int part,bool external)
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();
}
......@@ -250,45 +151,6 @@ void HtmlGenerator::endProjectNumber()
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)
{
if (part==0)
......@@ -414,9 +276,9 @@ void HtmlGenerator::writeSectionRef(const char *name,const char *lab,
{
QString refName=name;
if (refName.right(5)!=".html") refName+=".html";
t << "&quot;<a href=\"" << refName << "#" << lab << "\">";
t << "<a href=\"" << refName << "#" << lab << "\">";
docify(title);
t << "</a>&quot;";
t << "</a>";
}
void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
......@@ -429,12 +291,12 @@ void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
t << "</a>";
}
//void HtmlGenerator::docify(const char *str)
//{
// docifyStatic(t,str);
//}
void HtmlGenerator::writeSectionRefAnchor(const char *name,const char *lab,
const char *title)
{
writeSectionRef(name,lab,title);
}
//void HtmlGenerator::docifyStatic(QTextStream &t,const char *str)
void HtmlGenerator::docify(const char *str)
{
if (str)
......@@ -510,3 +372,121 @@ void HtmlGenerator::writeFormula(const char *n,const char *text)
t << "<img align=\"top\" src=\"" << n << "\">" << 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
void endGroupHeader();
void writeListItem() { t << "<li>"; }
void startMemberHeader() { startGroupHeader(); }
void endMemberHeader() { endGroupHeader(); }
void startMemberList() { t << "<ul>" << endl; }
void endMemberList() { t << "</ul>" << endl; }
void startMemberItem() { t << "<li>"; }
void endMemberItem() { t << endl; }
void startMemberSections();
void endMemberSections();
void startMemberHeader();
void endMemberHeader();
void startMemberList();
void endMemberList();
void startMemberItem();
void insertMemberAlign();
void endMemberItem();
void startMemberDescription();
void endMemberDescription();
void writeRuler() { t << "<hr>"; }
void writeAnchor(const char *name)
{ t << "<a name=\"" << name <<"\"></a>"; }
void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; }
void endCodeFragment() { t << "</div></pre>"; }
void endCodeFragment() { t << "</pre></div>"; }
void writeBoldString(const char *text)
{ t << "<b>"; docify(text); t << "</b>"; }
void startEmphasis() { t << "<em>"; }
......@@ -111,6 +116,7 @@ class HtmlGenerator : public OutputGenerator
void writeDoxyAnchor(const char *clName,const char *anchor,
const char *name);
void writeLatexSpacing() {}
void writeLatexLabel(const char *,const char *) {}
void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name);
void writeEndAnnoItem(const char *) { t << endl; }
......@@ -139,8 +145,6 @@ class HtmlGenerator : public OutputGenerator
void writeGrave(char c) { t << "&" << c << "grave;"; }
void writeCirc(char c) { t << "&" << c << "circ;"; }
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 endDescTitle() {}
void writeDescItem() { t << "<dd>" << endl; }
......@@ -148,6 +152,7 @@ class HtmlGenerator : public OutputGenerator
void writeSection(const char *,const char *,bool);
void writeSectionRef(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 startIndent() { t << "<div class=\"in\">" << endl; }
void endIndent() { t << "</div>" << endl; }
......@@ -166,6 +171,7 @@ class HtmlGenerator : public OutputGenerator
private:
QString header;
QString footer;
QString lastTitle;
HtmlGenerator &operator=(const HtmlGenerator &g);
HtmlGenerator(const HtmlGenerator &g);
......
This diff is collapsed.
......@@ -25,10 +25,12 @@ enum IndexSections
isTitlePageStart,
isTitlePageAuthor,
isModuleIndex,
isNamespaceIndex,
isClassHierarchyIndex,
isCompoundIndex,
isFileIndex,
isModuleDocumentation,
isNamespaceDocumentation,
isClassDocumentation,
isFileDocumentation,
isExampleDocumentation,
......@@ -50,16 +52,18 @@ void writeHeaderIndex(OutputList &ol);
void writeHeaderFileList(OutputList &ol);
void writeExampleIndex(OutputList &ol);
void writePageIndex(OutputList &ol);
void writeFunctionIndex(OutputList &ol);
void writeFileMemberIndex(OutputList &ol);
void writeGroupIndex(OutputList &ol);
void writeNamespaceIndex(OutputList &ol);
void writeNamespaceMemberIndex(OutputList &ol);
int countClassHierarchy();
int countMemberList();
int countFunctionList();
int countFileList();
int countGroupList();
int countNamespaceList();
int countClassMembers();
int countFileMembers();
int countFiles();
int countGroups();
int countNamespaces();
int countAnnotatedClasses();
int countNamespaceMembers();
#endif
......@@ -172,6 +172,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Index}\n"
break;
case isNamespaceIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Namespace Index}\"
break;
case isClassHierarchyIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Hierarchical Index}\n"
......@@ -200,17 +204,28 @@ void LatexGenerator::startIndexSection(IndexSections is)
}
}
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:
{
ClassDef *cd=classList.first();
bool found=FALSE;
while (cd && !found)
{
//if (cd->classFile()[0]!='@' && !cd->getReference() &&
// (cd->hasDocumentation() || !hideClassFlag) &&
// (cd->protection()!=Private || extractPrivateFlag)
// )
if (!cd->isReference() && cd->isVisible())
{
if (compactLatexFlag) t << "\\section"; else t << "\\chapter";
......@@ -282,6 +297,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isModuleIndex:
t << "}\n\\input{modules}\n";
break;
case isNamespaceIndex:
t << "}\n\\input{namespaces}\n";
break;
case isClassHierarchyIndex:
t << "}\n\\input{hierarchy}\n";
break;
......@@ -299,7 +317,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
if (gd->hasDocumentation() || gd->countMembers()>0)
{
t << "}\n\\input{" << gd->groupFile() << "}\n";
t << "}\n\\input{" << gd->getOutputFileBase() << "}\n";
found=TRUE;
}
gd=groupList.next();
......@@ -309,12 +327,36 @@ void LatexGenerator::endIndexSection(IndexSections is)
if (gd->hasDocumentation() || gd->countMembers()>0)
{
if (compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << gd->groupFile() << "}\n";
t << "{" << gd->getOutputFileBase() << "}\n";
}
gd=groupList.next();
}
}
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:
{
ClassDef *cd=classList.first();
......@@ -327,7 +369,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
// )
if (!cd->isReference() && cd->isVisible())
{
t << "}\n\\input{" << cd->classFile() << "}\n";
t << "}\n\\input{" << cd->getOutputFileBase() << "}\n";
found=TRUE;
}
cd=classList.next();
......@@ -341,7 +383,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
if (!cd->isReference() && cd->isVisible())
{
if (compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << cd->classFile() << "}\n";
t << "{" << cd->getOutputFileBase() << "}\n";
}
cd=classList.next();
}
......@@ -360,13 +402,13 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
if (isFirst)
{
t << "}\n\\input{" << fd->diskName() << "}\n";
t << "}\n\\input{" << fd->getOutputFileBase() << "}\n";
isFirst=FALSE;
}
else
{
if (compactLatexFlag) t << "\\input" ; else t << "\\include";
t << "{" << fd->diskName() << "}\n";
t << "{" << fd->getOutputFileBase() << "}\n";
}
}
fd=fn->next();
......@@ -670,6 +712,11 @@ void LatexGenerator::writeDoxyAnchor(const char *clname,const char *anchor,const
t << "}" << endl;
}
void LatexGenerator::writeLatexLabel(const char *clName,const char *anchor)
{
writeDoxyAnchor(clName,anchor,0);
}
void LatexGenerator::addToIndex(const char *s1,const char *s2)
{
if (s1)
......@@ -709,6 +756,15 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
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)
//{
// docifyStatic(t,str);
......
......@@ -79,17 +79,20 @@ class LatexGenerator : public OutputGenerator
void endGroupHeader();
void writeListItem() { t << "\\item " << endl; }
void startMemberSections() {}
void endMemberSections() {}
void startMemberHeader() { startGroupHeader(); }
void endMemberHeader() { endGroupHeader(); }
void startMemberList() { t << "\\begin{CompactItemize}" << endl; }
void endMemberList() { t << "\\end{CompactItemize}" << endl; }
void startMemberItem() { t << "\\item " << endl; }
void endMemberItem() { t << endl; }
void insertMemberAlign() {}
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 endCodeFragment() { t << "\\end{verbatim}\\normalsize "; }
void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void writeBoldString(const char *text)
{ t << "{\\bf "; docify(text); t << "}"; }
void startEmphasis() { t << "{\\em "; }
......@@ -99,13 +102,14 @@ class LatexGenerator : public OutputGenerator
void startDescription() { t << "\\begin{description}" << endl; }
void endDescription() { t << "\\end{description}" << endl; }
void startDescItem() { t << "\\item["; }
void endDescItem() { t << "]"; }
void endDescItem() { t << "]" << endl; }
void lineBreak() { t << "\\par\n"; }
void startMemberDoc(const char *,const char *,const char *);
void endMemberDoc() { t << "}"; }
void writeDoxyAnchor(const char *,const char *,const char *);
void writeChar(char c);
void writeLatexSpacing() { t << "\\hspace{0.3cm}"; }
void writeLatexLabel(const char *scope,const char *anchor);
void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name);
void writeEndAnnoItem(const char *name);
......@@ -148,11 +152,12 @@ class LatexGenerator : public OutputGenerator
void endMemberDescription() { t << "\\item\\end{CompactList}"; }
void startDescList() { t << "\\begin{Desc}\\item["; }
void endDescTitle() { t << "]"; }
void writeDescItem() { t << "\\par "; }
void writeDescItem() { t << "\\par" << endl; }
void endDescList() { t << "\\end{Desc}"; }
void writeSection(const char *,const char *,bool);
void writeSectionRef(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 startIndent() {}
void endIndent() {}
......
......@@ -78,7 +78,7 @@ void ManGenerator::startFile(const char *name,const char *,bool)
{
fileName=fileName.left(i);
}
if (fileName.right(2)!=".3") fileName+=".3";
if (fileName.right(2)!=manExtension) fileName+=manExtension;
startPlainFile(fileName);
firstCol=TRUE;
}
......
......@@ -77,8 +77,11 @@ class ManGenerator : public OutputGenerator
void endTypewriter() { t << "\\fR"; firstCol=FALSE; }
void startGroupHeader();
void endGroupHeader();
void startMemberSections() {}
void endMemberSections() {}
void startMemberHeader();
void endMemberHeader();
void insertMemberAlign() {}
void writeListItem();
void startMemberList() { t << "\n.in +1c"; firstCol=FALSE; }
void endMemberList() { t << "\n.in -1c"; firstCol=FALSE; }
......@@ -107,6 +110,7 @@ class ManGenerator : public OutputGenerator
void endMemberDoc() {}
void writeDoxyAnchor(const char *clName,const char *anchor,const char *name);
void writeLatexSpacing() {}
void writeLatexLabel(const char *,const char *) {}
void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name);
void writeEndAnnoItem(const char *) { t << endl; firstCol=TRUE; }
......@@ -144,6 +148,7 @@ class ManGenerator : public OutputGenerator
void writeSection(const char *,const char *,bool) {}
void writeSectionRef(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 startIndent() {}
void endIndent() {}
......
......@@ -20,6 +20,7 @@
#include "membername.h"
#include "doxygen.h"
#include "util.h"
#include "message.h"
/*! Creates a new member definition.
* Members can be function/variables/enums/etc. inside a class or inside a
......@@ -159,7 +160,7 @@ bool MemberDef::hasExamples()
return exampleList->count()>0;
}
#if 0
void MemberDef::writeExample(OutputList &ol)
{
Example *e=exampleList->first();
......@@ -177,4 +178,27 @@ void MemberDef::writeExample(OutputList &ol)
}
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
const ArgumentList *al);
~MemberDef();
QString getOutputFileBase() const;
const char *declaration() const { return decl; }
const char *definition() const { return def; }
const char *typeString() const { return type; }
......@@ -72,6 +73,7 @@ class MemberDef : public Definition
void setFileDef(FileDef *fd) { fileDef=fd; }
void setFileDec(FileDef *fd) { fileDec=fd; }
void setAnchor(const char *a) { ref=a; }
void setProtection(Protection p) { prot=p; }
FileDef *getFileDef() { return fileDef; }
FileDef *getFileDec() { return fileDec; }
void setMemberClass(ClassDef *cd) { classDef=cd; }
......@@ -105,8 +107,9 @@ class MemberDef : public Definition
// example related members
bool addExample(const char *anchor,const char *name,const char *file);
void writeExample(OutputList &ol);
//void writeExample(OutputList &ol);
bool hasExamples();
ExampleList *getExampleList() const { return exampleList; }
// prototype related members
const char *getDefFile() { return defFile; }
......
......@@ -43,7 +43,10 @@ void MemberList::countDecMembers()
if ((!hideMemberFlag || md->hasDocumentation()) &&
(!hideMemberFlag || !md->documentation().isEmpty() ||
briefMemDescFlag || repeatBriefFlag
) || extractAllFlag
) || extractAllFlag ||
(md->isEnumerate() &&
md->hasDocumentedEnumValues()
)
)
{
switch(md->memberType())
......
......@@ -22,12 +22,14 @@
#include "classdef.h"
#include "classlist.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);
classList = new ClassList;
memList = new MemberList;
reference=ref;
}
NamespaceDef::~NamespaceDef()
......@@ -61,18 +63,21 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
QString pageTitle=name()+" Namespace Reference";
startFile(ol,fileName,pageTitle);
startTitle(ol);
ol.docify(pageTitle);
//ol.docify(pageTitle);
parseText(ol,theTranslator->trNamespaceReference(name()));
endTitle(ol,name());
if (genTagFile.length()>0) tagFile << "%" << name() << ":\n";
OutputList briefOutput(&ol);
if (briefDescription())
{
parseDoc(briefOutput,0,0,briefDescription());
parseDoc(briefOutput,name(),0,briefDescription());
ol+=briefOutput;
ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"details");
parseDoc(ol,0,0,theTranslator->trMore());
ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore());
ol.endTextLink();
ol.enableAll();
}
......@@ -81,6 +86,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.enable(OutputGenerator::Man);
ol.writeSynopsis();
ol.startMemberSections();
if (classList->count()>0)
{
ClassDef *cd=classList->first();
......@@ -92,7 +98,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
if (!found)
{
ol.startMemberHeader();
parseDoc(ol,0,0,theTranslator->trCompounds());
parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader();
ol.startMemberList();
found=TRUE;
......@@ -111,13 +117,14 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
case ClassDef::Union: ol.writeString("union"); break;
}
ol.writeString(" ");
ol.insertMemberAlign();
if (cd->hasDocumentation())
{
ol.writeObjectLink(cd->getReference(),
cd->classFile(),
0,
clName
);
cd->getOutputFileBase(),
0,
clName
);
}
else
{
......@@ -133,13 +140,17 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
}
writeMemberDecs(ol,0,this,0,0,0,memList);
ol.endMemberSections();
if (!briefDescription().isEmpty() || !documentation().isEmpty())
{
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();
parseDoc(ol,0,0,theTranslator->trDetailedDescription());
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
if (!briefDescription().isEmpty())
{
......@@ -148,7 +159,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
}
if (!documentation().isEmpty())
{
parseDoc(ol,0,0,documentation()+"\n");
parseDoc(ol,name(),0,documentation()+"\n");
ol.newParagraph();
}
}
......@@ -159,7 +170,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trFunctionPrototypeDocumentation());
parseText(ol,theTranslator->trFunctionPrototypeDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Prototype);
}
......@@ -168,7 +179,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trTypedefDocumentation());
parseText(ol,theTranslator->trTypedefDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Typedef);
}
......@@ -177,7 +188,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trEnumerationTypeDocumentation());
parseText(ol,theTranslator->trEnumerationTypeDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Enumeration);
}
......@@ -186,7 +197,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trEnumerationValueDocumentation());
parseText(ol,theTranslator->trEnumerationValueDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::EnumValue);
}
......@@ -195,7 +206,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trFunctionDocumentation());
parseText(ol,theTranslator->trFunctionDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Function);
}
......@@ -204,7 +215,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{
ol.writeRuler();
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trVariableDocumentation());
parseText(ol,theTranslator->trVariableDocumentation());
ol.endGroupHeader();
writeMemberDocs(ol,memList,name(),MemberDef::Variable);
}
......@@ -212,9 +223,15 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
// write Author section (Man only)
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
parseDoc(ol,0,0,theTranslator->trAuthor());
parseText(ol,theTranslator->trAuthor());
ol.endGroupHeader();
parseDoc(ol,0,0,theTranslator->trGeneratedAutomatically(projectName));
parseText(ol,theTranslator->trGeneratedAutomatically(projectName));
ol.enableAll();
endFile(ol);
}
int NamespaceDef::countMembers()
{
memList->countDocMembers();
return memList->totalCount()+classList->count();
}
......@@ -31,16 +31,20 @@ class MemberDef;
class NamespaceDef : public Definition
{
public:
NamespaceDef(const char *name);
NamespaceDef(const char *name,const char *ref=0);
~NamespaceDef();
QString namespaceFile() const { return fileName; }
//QString namespaceFile() const { return fileName; }
QString getOutputFileBase() const { return fileName; }
void insertUsedFile(const char *fname);
void writeDocumentation(OutputList &ol);
void insertClass(ClassDef *cd);
void insertMember(MemberDef *md);
void computeAnchors();
int countMembers();
const char *getReference() { return reference; }
private:
QString reference;
QString fileName;
QStrList files;
ClassList *classList;
......
......@@ -84,12 +84,15 @@ class OutputGenerator
virtual void endGroupHeader() = 0;
virtual void writeListItem() = 0;
virtual void startMemberSections() = 0;
virtual void endMemberSections() = 0;
virtual void startMemberHeader() = 0;
virtual void endMemberHeader() = 0;
virtual void startMemberList() = 0;
virtual void endMemberList() = 0;
virtual void startMemberItem() = 0;
virtual void endMemberItem() = 0;
virtual void insertMemberAlign() = 0;
virtual void writeRuler() = 0;
virtual void writeAnchor(const char *name) = 0;
......@@ -103,6 +106,7 @@ class OutputGenerator
virtual void endMemberDoc() = 0;
virtual void writeDoxyAnchor(const char *clName,const char *anchor,const char *name) = 0;
virtual void writeLatexSpacing() = 0;
virtual void writeLatexLabel(const char *clName,const char *anchor) = 0;
virtual void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name) = 0;
virtual void writeEndAnnoItem(const char *name) = 0;
......@@ -144,6 +148,7 @@ class OutputGenerator
virtual void writeSection(const char *,const char *,bool) = 0;
virtual void writeSectionRef(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 addToIndex(const char *s1,const char *s2) = 0;
virtual void startIndent() = 0;
......
......@@ -129,6 +129,10 @@ class OutputList
{ forall(&OutputGenerator::endGroupHeader); }
void writeListItem()
{ forall(&OutputGenerator::writeListItem); }
void startMemberSections()
{ forall(&OutputGenerator::startMemberSections); }
void endMemberSections()
{ forall(&OutputGenerator::endMemberSections); }
void startMemberHeader()
{ forall(&OutputGenerator::startMemberHeader); }
void endMemberHeader()
......@@ -141,6 +145,8 @@ class OutputList
{ forall(&OutputGenerator::startMemberItem); }
void endMemberItem()
{ forall(&OutputGenerator::endMemberItem); }
void insertMemberAlign()
{ forall(&OutputGenerator::insertMemberAlign); }
void writeRuler()
{ forall(&OutputGenerator::writeRuler); }
void writeAnchor(const char *name)
......@@ -165,6 +171,8 @@ class OutputList
{ forall(&OutputGenerator::writeDoxyAnchor,clName,anchor,name); }
void writeLatexSpacing()
{ forall(&OutputGenerator::writeLatexSpacing); }
void writeLatexLabel(const char *scope,const char *anchor)
{ forall(&OutputGenerator::writeLatexLabel,scope,anchor); }
void startDescription()
{ forall(&OutputGenerator::startDescription); }
void endDescription()
......@@ -251,6 +259,8 @@ class OutputList
{ forall(&OutputGenerator::writeSectionRef,page,lab,title); }
void writeSectionRefItem(const char *page,const char *lab, const char *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)
{ forall(&OutputGenerator::addToIndex,s1,s2); }
void writeSynopsis()
......
......@@ -1160,11 +1160,11 @@ BN [ \t\r\n]
<SkipCommand>.
<SkipLine>[^/\n]+
<SkipLine>.
<SkipLine>"//" {
<SkipLine,SkipCommand,SkipCPPBlock>"//" {
lastCPPContext=YY_START;
BEGIN(RemoveCPPComment);
}
<SkipLine>"/*" {
<SkipLine,SkipCommand,SkipCPPBlock>"/*" {
lastCContext=YY_START;
BEGIN(RemoveCComment);
}
......
......@@ -31,4 +31,5 @@ extern void parseDoc(OutputList &ol,const char *clName, const char *memName,
const QString &docString);
extern void parseExample(OutputList &ol,const QString &docString,
const char *fileName);
extern void parseText(OutputList &ol,const QString &txtString);
#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 @@
#include "classdef.h"
#include "filedef.h"
#include "namespacedef.h"
#include "memberdef.h"
#include "doxygen.h"
#include "util.h"
......@@ -36,12 +37,14 @@
static int yyLineNr;
static QString className;
static QString fileName;
static QString namespaceName;
static QString tagName;
static QString memberName;
static QString anchorName;
static QString argString;
static ClassDef *cd;
static FileDef *fd;
static NamespaceDef *nd;
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);
fd = 0;
nd = 0;
classList.inSort(cd);
classDict.insert(className,cd);
}
......@@ -72,10 +76,27 @@ static void addFile(const char *name)
inputNameDict.insert(name,mn);
}
cd = 0;
nd = 0;
//fileList.inSort(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)
{
//printf("adding member %s\n",name);
......@@ -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,
MemberDef::Function,0,0);
md->setReference(anchor);
if (cd)
if (cd) // member of a class
{
//md=new MemberDef(cd,name,args,anchor,tagName);
md->setMemberClass(cd);
cd->insertMember(md);
//printf("Adding member %s %s to class\n",name,args);
mnd=&memberNameDict;
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);
fd->insertMember(md);
//printf("Adding global member %s %s\n",name,args);
mnd=&functionNameDict;
mnl=&functionNameList;
}
......@@ -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]*
FILE [a-z_A-Z0-9\.\-\+\:\\\/]+
SCOPE ({ID}"::")*{ID}
%x Pass1
%x Pass2
......@@ -139,18 +164,22 @@ FILE [a-z_A-Z0-9\.\-\+\:\\\/]+
%x ClassName1
%x ClassName2
%x FileName
%x NamespaceName
%x BaseClasses
%x ClassFile1
%x ClassFile2
%%
<Pass1>^">" {
<Pass1>^">" { // start of a class
BEGIN(ClassName1);
}
<Pass1>^"&" {
<Pass1>^"&" { // start of a file
BEGIN(FileName);
}
<Pass1>^"%" { // start of a namespace
BEGIN(NamespaceName);
}
<Pass1>^[~a-z_A-Z][^ \n]*/" " {
memberName=yytext;
BEGIN(AnchorName);
......@@ -175,7 +204,12 @@ FILE [a-z_A-Z0-9\.\-\+\:\\\/]+
addFile(yytext);
BEGIN(Pass1);
}
<ClassName1>{ID}/":" {
<NamespaceName>{SCOPE}/":" {
namespaceName=yytext;
addNamespace(yytext);
BEGIN(Pass1);
}
<ClassName1>{SCOPE}/":" {
className=yytext;
BEGIN(ClassFile1);
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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