Commit d745dd37 authored by dimitri's avatar dimitri

Release-1.4.1-20050227

parent 11de530b
DOXYGEN Version 1.4.1-20050210 DOXYGEN Version 1.4.1-20050227
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (10 February 2005) Dimitri van Heesch (27 February 2005)
DOXYGEN Version 1.4.1_20050210 DOXYGEN Version 1.4.1_20050227
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (10 February 2005) Dimitri van Heesch (dimitri@stack.nl) (27 February 2005)
1.4.1-20050210 1.4.1-20050227
...@@ -186,6 +186,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -186,6 +186,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_rtf_stylesheet_file RTF_STYLESHEET_FILE \refitem cfg_rtf_stylesheet_file RTF_STYLESHEET_FILE
\refitem cfg_search_includes SEARCH_INCLUDES \refitem cfg_search_includes SEARCH_INCLUDES
\refitem cfg_searchengine SEARCHENGINE \refitem cfg_searchengine SEARCHENGINE
\refitem cfg_separate_member_pages SEPARATE_MEMBER_PAGES
\refitem cfg_short_names SHORT_NAMES \refitem cfg_short_names SHORT_NAMES
\refitem cfg_show_dirs SHOW_DIRECTORIES \refitem cfg_show_dirs SHOW_DIRECTORIES
\refitem cfg_show_include_files SHOW_INCLUDE_FILES \refitem cfg_show_include_files SHOW_INCLUDE_FILES
...@@ -410,6 +411,13 @@ followed by the descriptions of the tags grouped by category. ...@@ -410,6 +411,13 @@ followed by the descriptions of the tags grouped by category.
member in the group (if any) for the other members of the group. By default member in the group (if any) for the other members of the group. By default
all members of a group must be documented explicitly. all members of a group must be documented explicitly.
\anchor cfg_separate_member_pages
<dt>\c SEPARATE_MEMBER_PAGES <dd>
\addindex SEPARATE_MEMBER_PAGES
If the \c SEPARATE_MEMBER_PAGES tag is set to \c YES, then doxygen will produce
a new page for each member. If set to \c NO, the documentation of a member will
be part of the file/class/namespace that contains it.
\anchor cfg_tab_size \anchor cfg_tab_size
<dt>\c TAB_SIZE <dd> <dt>\c TAB_SIZE <dd>
\addindex TAB_SIZE \addindex TAB_SIZE
......
...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other ...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile). configuration file (with default name and known as Doxyfile).
Currently (version 1.4.1-20050129), 30 languages Currently (version 1.4.1-20050227), 30 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French, Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
......
(1.4.1-20050129) (1.4.1-20050227)
Doxygen supports the following 30 languages (sorted alphabetically): Doxygen supports the following 30 languages (sorted alphabetically):
...@@ -20,7 +20,7 @@ still may be some details listed even for them: ...@@ -20,7 +20,7 @@ still may be some details listed even for them:
TranslatorBrazilian -- Remove the obsolete methods (never used). TranslatorBrazilian -- Remove the obsolete methods (never used).
TranslatorChinese -- Remove the obsolete methods (never used). TranslatorChinese -- Remove the obsolete methods (never used).
TranslatorCroatian -- Remove the obsolete methods (never used). TranslatorCroatian -- Remove the obsolete methods (never used).
TranslatorCzech -- Remove the obsolete methods (never used). TranslatorCzech
TranslatorDutch -- Remove the obsolete methods (never used). TranslatorDutch -- Remove the obsolete methods (never used).
TranslatorEnglish -- Remove the obsolete methods (never used). TranslatorEnglish -- Remove the obsolete methods (never used).
TranslatorFrench -- Remove the obsolete methods (never used). TranslatorFrench -- Remove the obsolete methods (never used).
...@@ -226,25 +226,6 @@ TranslatorCroatian (Translator) ...@@ -226,25 +226,6 @@ TranslatorCroatian (Translator)
QCString trNoDescriptionAvailable() QCString trNoDescriptionAvailable()
TranslatorCzech (Translator)
---------------
Implements 191 of the required methods.
Obsolete methods (should be removed, never used):
virtual QCString trHeaderFilesDescription()
virtual QCString trField(bool first_capital, bool singular)
virtual QCString trPackageDocumentation()
virtual QCString trSources()
virtual QCString trReimplementedForInternalReasons()
virtual QCString trInterfaces()
virtual QCString trHeaderFiles()
virtual QCString trBugsAndLimitations()
virtual QCString trEnumerationValueDocumentation()
virtual QCString trNoDescriptionAvailable()
TranslatorDanish (TranslatorAdapter_1_3_9) 6 methods to implement TranslatorDanish (TranslatorAdapter_1_3_9) 6 methods to implement
---------------- ----------------
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.4.1_20050210 Version: 1.4.1_20050227
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -1340,6 +1340,11 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1340,6 +1340,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeDetailedDescription(ol,pageType,exampleFlag); writeDetailedDescription(ol,pageType,exampleFlag);
} }
///////////////////////////////////////////////////////////////////////////
//// Member declarations + brief descriptions
///////////////////////////////////////////////////////////////////////////
// write member groups // write member groups
ol.startMemberSections(); ol.startMemberSections();
...@@ -1436,6 +1441,54 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1436,6 +1441,54 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeDetailedDescription(ol,pageType,exampleFlag); writeDetailedDescription(ol,pageType,exampleFlag);
} }
writeMemberDocumentation(ol);
/////////////////////////////////////////////////////////////////////
ol.startTextBlock();
// write the list of used files (not for man pages)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
showUsedFiles(ol);
// write Author section (Man only)
ol.enable(OutputGenerator::Man);
ol.disableAllBut(OutputGenerator::Man);
ol.writeString("\n");
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.popGeneratorState();
ol.endTextBlock();
/////////////////////////////////////////////////////////////////////
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
endFile(ol);
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
writeMemberPages(ol);
}
}
void ClassDef::writeMemberDocumentation(OutputList &ol)
{
///////////////////////////////////////////////////////////////////////////
//// Member definitions + detailed documentation
///////////////////////////////////////////////////////////////////////////
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
ol.disable(OutputGenerator::Html);
}
typedefMembers.writeDocumentation(ol,name(),this, typedefMembers.writeDocumentation(ol,name(),this,
theTranslator->trMemberTypedefDocumentation()); theTranslator->trMemberTypedefDocumentation());
...@@ -1461,36 +1514,77 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1461,36 +1514,77 @@ void ClassDef::writeDocumentation(OutputList &ol)
eventMembers.writeDocumentation(ol,name(),this, eventMembers.writeDocumentation(ol,name(),this,
theTranslator->trEventDocumentation()); theTranslator->trEventDocumentation());
ol.startTextBlock(); if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
ol.enable(OutputGenerator::Html);
}
}
void ClassDef::writeMemberPages(OutputList &ol)
{
///////////////////////////////////////////////////////////////////////////
//// Member definitions on separate pages
///////////////////////////////////////////////////////////////////////////
// write the list of used files (not for man pages)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Html);
showUsedFiles(ol); typedefMembers.writeDocumentationPage(ol,name(),this);
enumMembers.writeDocumentationPage(ol,name(),this);
constructors.writeDocumentationPage(ol,name(),this);
functionMembers.writeDocumentationPage(ol,name(),this);
relatedMembers.writeDocumentationPage(ol,name(),this);
variableMembers.writeDocumentationPage(ol,name(),this);
propertyMembers.writeDocumentationPage(ol,name(),this);
eventMembers.writeDocumentationPage(ol,name(),this);
// write Author section (Man only)
ol.enable(OutputGenerator::Man);
ol.disableAllBut(OutputGenerator::Man);
ol.writeString("\n");
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.popGeneratorState(); ol.popGeneratorState();
}
ol.endTextBlock(); void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) MemberNameInfoSDict::Iterator mnili(*m_allMemberNameInfoSDict);
MemberNameInfo *mni;
for (;(mni=mnili.current());++mnili)
{ {
writeDocAnchorsToTagFile(); MemberNameInfoIterator mnii(*mni);
Doxygen::tagFile << " </compound>" << endl; MemberInfo *mi;
for (mnii.toFirst();(mi=mnii.current());++mnii)
{
MemberDef *md=mi->memberDef;
if (md->getClassDef()==this && md->isLinkable())
{
ol.writeString(" <tr><td class=\"navtab\">");
if (md->isLinkableInProject())
{
if (md==currentMd) // selected item => highlight
{
ol.writeString("<a class=\"qindexHL\" ");
}
else
{
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->localName());
ol.writeString("</a>");
}
ol.writeString("</td></tr>\n");
}
}
} }
endFile(ol); ol.writeString(" </table>\n");
ol.writeString(" </div>\n");
} }
void ClassDef::writeDocumentationForInnerClasses(OutputList &ol) void ClassDef::writeDocumentationForInnerClasses(OutputList &ol)
{ {
// write inner classes after the parent, so the tag files contain // write inner classes after the parent, so the tag files contain
......
...@@ -67,7 +67,7 @@ class ClassDef : public Definition ...@@ -67,7 +67,7 @@ class ClassDef : public Definition
Category=Entry::CATEGORY_SEC, Category=Entry::CATEGORY_SEC,
Exception=Entry::EXCEPTION_SEC Exception=Entry::EXCEPTION_SEC
}; };
DefType definitionType() { return TypeClass; } DefType definitionType() const { return TypeClass; }
QCString getOutputFileBase() const; QCString getOutputFileBase() const;
QCString getInstanceOutputFileBase() const; QCString getInstanceOutputFileBase() const;
QCString getFileBase() const; QCString getFileBase() const;
...@@ -104,9 +104,12 @@ class ClassDef : public Definition ...@@ -104,9 +104,12 @@ class ClassDef : public Definition
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeDocumentationForInnerClasses(OutputList &ol); void writeDocumentationForInnerClasses(OutputList &ol);
void writeMemberDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
void writeMemberList(OutputList &ol); void writeMemberList(OutputList &ol);
void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup); void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup);
void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag); void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag);
void writeQuickMemberLinks(OutputList &ol,MemberDef *md) const;
/*! Return the protection level (Public,Protected,Private) in which /*! Return the protection level (Public,Protected,Private) in which
* this compound was found. * this compound was found.
......
...@@ -752,6 +752,85 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst) ...@@ -752,6 +752,85 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
} }
static bool getLinkInScope(const QCString &c, // scope
const QCString &m, // member
const char *memberText, // exact text
BaseCodeDocInterface &ol,
const char *text
)
{
MemberDef *md;
ClassDef *cd;
FileDef *fd;
NamespaceDef *nd;
GroupDef *gd;
//printf("Trying `%s'::`%s'\n",c.data(),m.data());
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) &&
md->isLinkable())
{
//printf("Found!\n");
if (g_exampleBlock)
{
QCString anchor;
anchor.sprintf("a%d",g_anchorCount);
//printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
// g_exampleFile.data());
if (md->addExample(anchor,g_exampleName,g_exampleFile))
{
ol.writeCodeAnchor(anchor);
g_anchorCount++;
}
}
//Definition *d=0;
//if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable())
{
g_theCallContext.setClass(stripClassName(md->typeString()));
//printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
// g_currentDefinition,g_currentMemberDef,g_insideBody);
if (g_currentDefinition && g_currentMemberDef &&
md!=g_currentMemberDef && g_insideBody)
{
addDocCrossReference(g_currentMemberDef,md);
}
//printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
writeMultiLineCodeLink(ol,md->getReference(),
md->getOutputFileBase(),
md->anchor(),
text ? text : memberText);
addToSearchIndex(text ? text : memberText);
return TRUE;
}
}
return FALSE;
}
static bool getLink(const char *className,
const char *memberName,
BaseCodeDocInterface &ol,
const char *text=0)
{
QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className;
if (!getLinkInScope(c,m,memberName,ol,text))
{
if (!g_curClassName.isEmpty())
{
if (!c.isEmpty()) c.prepend("::");
c.prepend(g_curClassName);
return getLinkInScope(c,m,memberName,ol,text);
}
return FALSE;
}
return TRUE;
}
static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
bool typeOnly=FALSE) bool typeOnly=FALSE)
{ {
...@@ -780,7 +859,14 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, ...@@ -780,7 +859,14 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{ {
cd=getResolvedClass(d,g_sourceFileDef,className.left(i),&md); cd=getResolvedClass(d,g_sourceFileDef,className.left(i),&md);
} }
//fprintf(stderr,"is found as a type %s\n",cd?cd->name().data():"<null>"); //print("is found as a type %s\n",cd?cd->name().data():"<null>");
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
if (getLink(g_classScope,clName,ol,clName))
{
return;
}
}
} }
else else
{ {
...@@ -825,8 +911,8 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, ...@@ -825,8 +911,8 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{ {
if (md==0) // not found as a typedef if (md==0) // not found as a typedef
{ {
//printf("setCallContextForVar(%s)\n",clName);
md = setCallContextForVar(clName); md = setCallContextForVar(clName);
//printf("setCallContextForVar(%s) md=%p g_currentDefinition=%p\n",clName,md,g_currentDefinition);
if (md && g_currentDefinition) if (md && g_currentDefinition)
{ {
//fprintf(stderr,"%s accessible from %s? %d md->getOuterScope=%s\n", //fprintf(stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
...@@ -863,85 +949,6 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, ...@@ -863,85 +949,6 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
} }
} }
static bool getLinkInScope(const QCString &c, // scope
const QCString &m, // member
const char *memberText, // exact text
BaseCodeDocInterface &ol,
const char *text
)
{
MemberDef *md;
ClassDef *cd;
FileDef *fd;
NamespaceDef *nd;
GroupDef *gd;
//printf("Trying `%s'::`%s'\n",c.data(),m.data());
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) &&
md->isLinkable())
{
//printf("Found!\n");
if (g_exampleBlock)
{
QCString anchor;
anchor.sprintf("a%d",g_anchorCount);
//printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
// g_exampleFile.data());
if (md->addExample(anchor,g_exampleName,g_exampleFile))
{
ol.writeCodeAnchor(anchor);
g_anchorCount++;
}
}
//Definition *d=0;
//if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable())
{
g_theCallContext.setClass(stripClassName(md->typeString()));
//printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
// g_currentDefinition,g_currentMemberDef,g_insideBody);
if (g_currentDefinition && g_currentMemberDef &&
md!=g_currentMemberDef && g_insideBody)
{
addDocCrossReference(g_currentMemberDef,md);
}
//printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
writeMultiLineCodeLink(ol,md->getReference(),
md->getOutputFileBase(),
md->anchor(),
text ? text : memberText);
addToSearchIndex(text ? text : memberText);
return TRUE;
}
}
return FALSE;
}
static bool getLink(const char *className,
const char *memberName,
BaseCodeDocInterface &ol,
const char *text=0)
{
QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className;
if (!getLinkInScope(c,m,memberName,ol,text))
{
if (!g_curClassName.isEmpty())
{
if (!c.isEmpty()) c.prepend("::");
c.prepend(g_curClassName);
return getLinkInScope(c,m,memberName,ol,text);
}
return FALSE;
}
return TRUE;
}
static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const char *memName) static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const char *memName)
{ {
if (mcd) if (mcd)
...@@ -2404,9 +2411,12 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2404,9 +2411,12 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
} }
} }
<MemberCall2,FuncCall>{OPERATOR} { // operator <MemberCall2,FuncCall>{OPERATOR} { // operator
g_code->codify(yytext); if (strcmp(yytext,"*") && strcmp(yytext,"&")) // typically a pointer or reference
{
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
} }
g_code->codify(yytext);
}
<MemberCall,MemberCall2,FuncCall>")" { <MemberCall,MemberCall2,FuncCall>")" {
g_theVarContext.addVariable(g_parmType,g_parmName); g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope(); g_theCallContext.popScope();
......
...@@ -112,6 +112,7 @@ struct DocCmdMap ...@@ -112,6 +112,7 @@ struct DocCmdMap
DocCmdFunc handler; DocCmdFunc handler;
}; };
// map of command to handler function
static DocCmdMap docCmdMap[] = static DocCmdMap docCmdMap[] =
{ {
{ "brief", &handleBrief }, { "brief", &handleBrief },
...@@ -246,7 +247,8 @@ enum XRefKind ...@@ -246,7 +247,8 @@ enum XRefKind
XRef_Todo, XRef_Todo,
XRef_Test, XRef_Test,
XRef_Bug, XRef_Bug,
XRef_Deprecated XRef_Deprecated,
XRef_None
}; };
enum OutputContext enum OutputContext
...@@ -294,6 +296,7 @@ static QCString *pOutputString; // pointer to string to which the o ...@@ -294,6 +296,7 @@ static QCString *pOutputString; // pointer to string to which the o
static QCString outputXRef; // temp argument of todo/test/../xrefitem commands static QCString outputXRef; // temp argument of todo/test/../xrefitem commands
static QCString blockName; // preformatted block name (e.g. verbatim, latexonly,...) static QCString blockName; // preformatted block name (e.g. verbatim, latexonly,...)
static XRefKind xrefKind; // kind of cross-reference command static XRefKind xrefKind; // kind of cross-reference command
static XRefKind newXRefKind; //
static GuardType guardType; // kind of guard for conditional section static GuardType guardType; // kind of guard for conditional section
static QCString nameHeader; // heading of the @name command static QCString nameHeader; // heading of the @name command
static QCString functionProto; // function prototype static QCString functionProto; // function prototype
...@@ -308,10 +311,14 @@ static bool needNewEntry; ...@@ -308,10 +311,14 @@ static bool needNewEntry;
static QCString sectionLabel; static QCString sectionLabel;
static QCString sectionTitle; static QCString sectionTitle;
static QCString xrefItemKey; static QCString xrefItemKey;
static QCString newXRefItemKey;
static QCString xrefItemTitle; static QCString xrefItemTitle;
static QCString xrefListTitle; static QCString xrefListTitle;
static Protection protection; static Protection protection;
static bool xrefAppendToPrev;
static bool xrefAppendFlag;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void initParser() static void initParser()
...@@ -323,12 +330,53 @@ static void initParser() ...@@ -323,12 +330,53 @@ static void initParser()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static QCString getDocSectionName(int s)
{
switch(s)
{
case Entry::CLASSDOC_SEC: return "@class";
case Entry::STRUCTDOC_SEC: return "@struct";
case Entry::UNIONDOC_SEC: return "@union";
case Entry::EXCEPTIONDOC_SEC: return "@exception";
case Entry::NAMESPACEDOC_SEC: return "@namespace";
case Entry::PROTOCOLDOC_SEC: return "@protocol";
case Entry::CATEGORYDOC_SEC: return "@category";
case Entry::ENUMDOC_SEC: return "@enum";
case Entry::PAGEDOC_SEC: return "@page";
case Entry::MEMBERDOC_SEC: return "@fn";
case Entry::OVERLOADDOC_SEC: return "@overload";
case Entry::FILEDOC_SEC: return "@file";
case Entry::DEFINEDOC_SEC: return "@def";
case Entry::GROUPDOC_SEC: return "@defgroup";
case Entry::MAINPAGEDOC_SEC: return "@mainpage";
case Entry::PACKAGEDOC_SEC: return "@package";
case Entry::DIRDOC_SEC: return "@dir";
case Entry::EXAMPLE_SEC: return "@example";
case Entry::MEMBERGRP_SEC: return "@name";
default: return "";
}
}
//-----------------------------------------------------------------------------
static void makeStructuralIndicator(Entry::Sections s) static void makeStructuralIndicator(Entry::Sections s)
{ {
if (!getDocSectionName(current->section).isEmpty())
{
warn(yyFileName,yyLineNr,
"Warning: found a structural command %s for a section already "
"marked with structural command %s. Ignoring the latter command.",
getDocSectionName(s).data(),
getDocSectionName(current->section).data()
);
}
else
{
needNewEntry = TRUE; needNewEntry = TRUE;
current->section = s; current->section = s;
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
}
} }
static void lineCount() static void lineCount()
...@@ -352,13 +400,13 @@ static QCString stripQuotes(const char *s) ...@@ -352,13 +400,13 @@ static QCString stripQuotes(const char *s)
//----------------------------------------------------------------- //-----------------------------------------------------------------
static void addXRefItem(const char *listName,const char *itemTitle,const char *listTitle) static void addXRefItem(const char *listName,const char *itemTitle,
const char *listTitle,bool append)
{ {
Entry *docEntry = current; // inBody && previous ? previous : current; Entry *docEntry = current; // inBody && previous ? previous : current;
//printf("docEntry=%p\n",docEntry);
if (listName==0) return; if (listName==0) return;
//printf("addXRefItem(%s,%s,%s)\n",listName,itemTitle,listTitle); //printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append);
ListItemInfo *lii=0; ListItemInfo *lii=0;
RefList *refList = Doxygen::xrefLists->find(listName); RefList *refList = Doxygen::xrefLists->find(listName);
if (refList==0) // new list if (refList==0) // new list
...@@ -379,9 +427,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l ...@@ -379,9 +427,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
} }
} }
} }
#if 0 // with this code multiple @todo items can be put under the same if (lii && append) // already found item of same type just before this one
// heading, I removed it because it changes the text flow.
if (lii) // already found item of same type before
{ {
//printf("listName=%s item id = %d existing\n",listName,lii->itemId); //printf("listName=%s item id = %d existing\n",listName,lii->itemId);
RefItem *item = refList->getRefItem(lii->itemId); RefItem *item = refList->getRefItem(lii->itemId);
...@@ -391,7 +437,6 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l ...@@ -391,7 +437,6 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
//printf("%s: text +=%s\n",listName,item->text.data()); //printf("%s: text +=%s\n",listName,item->text.data());
} }
else // new item else // new item
#endif
{ {
int itemId = refList->addRefItem(); int itemId = refList->addRefItem();
//printf("listName=%s item id = %d new current=%p\n",listName,itemId,current); //printf("listName=%s item id = %d new current=%p\n",listName,itemId,current);
...@@ -412,9 +457,8 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l ...@@ -412,9 +457,8 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
sectionTitle,SectionInfo::Anchor); sectionTitle,SectionInfo::Anchor);
Doxygen::sectionDict.insert(anchorLabel,si); Doxygen::sectionDict.insert(anchorLabel,si);
docEntry->anchors->append(si); docEntry->anchors->append(si);
outputXRef.resize(0);
} }
//current->brief = slString; // restore orginial brief desc. outputXRef.resize(0);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -492,27 +536,59 @@ static void addSection() ...@@ -492,27 +536,59 @@ static void addSection()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// determines the string to write to // selects the output to write to
static inline void setOutput(OutputContext ctx) static inline void setOutput(OutputContext ctx)
{ {
//printf("setOutput(inContext=%d ctx=%d)\n",inContext,ctx);
if (inContext==OutputXRef) // end of XRef section => add the item if (inContext==OutputXRef) // end of XRef section => add the item
{ {
// See if we can append this new xref item to the previous one.
// We know this at the start of the next item of the same
// type and need to remember this until the end of that item.
xrefAppendToPrev = xrefAppendFlag;
xrefAppendFlag = ctx==OutputXRef && newXRefKind==xrefKind &&
(xrefKind!=XRef_Item || newXRefItemKey==xrefItemKey);
//printf("refKind=%d newXRefKind=%d xrefAppendToPrev=%d xrefAppendFlag=%d\n",
// xrefKind,newXRefKind,xrefAppendToPrev,xrefAppendFlag);
switch(xrefKind) switch(xrefKind)
{ {
case XRef_Todo: case XRef_Todo:
addXRefItem("todo",theTranslator->trTodo(),theTranslator->trTodoList()); addXRefItem("todo",
theTranslator->trTodo(),
theTranslator->trTodoList(),
xrefAppendToPrev
);
break; break;
case XRef_Test: case XRef_Test:
addXRefItem("test",theTranslator->trTest(),theTranslator->trTestList()); addXRefItem("test",
theTranslator->trTest(),
theTranslator->trTestList(),
xrefAppendToPrev
);
break; break;
case XRef_Bug: case XRef_Bug:
addXRefItem("bug",theTranslator->trBug(),theTranslator->trBugList()); addXRefItem("bug",
theTranslator->trBug(),
theTranslator->trBugList(),
xrefAppendToPrev
);
break; break;
case XRef_Deprecated: case XRef_Deprecated:
addXRefItem("deprecated",theTranslator->trDeprecated(),theTranslator->trDeprecatedList()); addXRefItem("deprecated",
theTranslator->trDeprecated(),
theTranslator->trDeprecatedList(),
xrefAppendToPrev
);
break;
case XRef_Item: // user defined list
addXRefItem(xrefItemKey,
xrefItemTitle,
xrefListTitle,
xrefAppendToPrev
);
break; break;
case XRef_Item: case XRef_None:
addXRefItem(xrefItemKey,xrefItemTitle,xrefListTitle); ASSERT(0);
break; break;
} }
} }
...@@ -527,6 +603,8 @@ static inline void setOutput(OutputContext ctx) ...@@ -527,6 +603,8 @@ static inline void setOutput(OutputContext ctx)
break; break;
case OutputXRef: case OutputXRef:
pOutputString = &outputXRef; pOutputString = &outputXRef;
// first item found, so can't append to previous
xrefAppendFlag = FALSE;
break; break;
} }
} }
...@@ -638,8 +716,8 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -638,8 +716,8 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
* directories (e.g. \doxygen\src\) * directories (e.g. \doxygen\src\)
* autolist end. (e.g. a dot on an otherwise empty line) * autolist end. (e.g. a dot on an otherwise empty line)
* newlines. * newlines.
* end of brief due to blank line. * end of brief description due to blank line.
* end of brief due to some command (@command, or <command>). * end of brief description due to some command (@command, or <command>).
* words and whitespace and other characters (#,?!, etc). * words and whitespace and other characters (#,?!, etc).
* grouping commands (e.g. @{ and @}) * grouping commands (e.g. @{ and @})
*/ */
...@@ -651,7 +729,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -651,7 +729,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
addOutput(yytext); addOutput(yytext);
} }
<Comment>{DETAILEDCMD}/[^a-z_A-Z] { // command that can end a brief description <Comment>{DETAILEDCMD}/[^a-z_A-Z] { // command that can end a brief description
setOutput(OutputDoc); if (inContext!=OutputXRef) setOutput(OutputDoc);
// continue with the same input // continue with the same input
REJECT; REJECT;
} }
...@@ -668,7 +746,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -668,7 +746,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
DocCmdFunc *funcPtr = DocCmdMapper::map(cmdName); DocCmdFunc *funcPtr = DocCmdMapper::map(cmdName);
if (funcPtr) // special action is required if (funcPtr) // special action is required
{ {
//printf("Special command %s\n",yytext); //printf("Special command '%s'\n",yytext);
(*funcPtr)(cmdName); (*funcPtr)(cmdName);
} }
else // command not relevant else // command not relevant
...@@ -1001,7 +1079,6 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -1001,7 +1079,6 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
addOutput('\n'); addOutput('\n');
} }
<FileDocArg1>{DOCNL} { // no file name specfied <FileDocArg1>{DOCNL} { // no file name specfied
current->name = yyFileName;
if (*yytext=='\n') yyLineNr++; if (*yytext=='\n') yyLineNr++;
addOutput('\n'); addOutput('\n');
BEGIN( Comment ); BEGIN( Comment );
...@@ -1012,7 +1089,9 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -1012,7 +1089,9 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
/* --------- handle arguments of the xrefitem command ------------ */ /* --------- handle arguments of the xrefitem command ------------ */
<XRefItemParam1>{ID} { // first argument <XRefItemParam1>{ID} { // first argument
xrefItemKey=yytext; newXRefItemKey=yytext;
setOutput(OutputXRef);
xrefItemKey==yytext;
BEGIN(XRefItemParam2); BEGIN(XRefItemParam2);
} }
<XRefItemParam1>{LC} { // line continuation <XRefItemParam1>{LC} { // line continuation
...@@ -1053,6 +1132,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ...@@ -1053,6 +1132,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<XRefItemParam3>"\""[^\n\"]*"\"" { // third argument <XRefItemParam3>"\""[^\n\"]*"\"" { // third argument
xrefListTitle = stripQuotes(yytext); xrefListTitle = stripQuotes(yytext);
xrefKind = XRef_Item;
BEGIN( Comment ); BEGIN( Comment );
} }
<XRefItemParam2>{LC} { // line continuation <XRefItemParam2>{LC} { // line continuation
...@@ -1570,18 +1650,21 @@ static void handleMainpage(const QCString &) ...@@ -1570,18 +1650,21 @@ static void handleMainpage(const QCString &)
static void handleFile(const QCString &) static void handleFile(const QCString &)
{ {
makeStructuralIndicator(Entry::FILEDOC_SEC); makeStructuralIndicator(Entry::FILEDOC_SEC);
current->name = yyFileName;
BEGIN( FileDocArg1 ); BEGIN( FileDocArg1 );
} }
static void handleDir(const QCString &) static void handleDir(const QCString &)
{ {
makeStructuralIndicator(Entry::DIRDOC_SEC); makeStructuralIndicator(Entry::DIRDOC_SEC);
current->name = yyFileName;
BEGIN( FileDocArg1 ); BEGIN( FileDocArg1 );
} }
static void handleExample(const QCString &) static void handleExample(const QCString &)
{ {
makeStructuralIndicator(Entry::EXAMPLE_SEC); makeStructuralIndicator(Entry::EXAMPLE_SEC);
current->name = yyFileName;
BEGIN( FileDocArg1 ); BEGIN( FileDocArg1 );
} }
...@@ -1599,32 +1682,34 @@ static void handleName(const QCString &) ...@@ -1599,32 +1682,34 @@ static void handleName(const QCString &)
static void handleTodo(const QCString &) static void handleTodo(const QCString &)
{ {
xrefKind = XRef_Todo; newXRefKind = XRef_Todo;
setOutput(OutputXRef); setOutput(OutputXRef);
xrefKind = XRef_Todo;
} }
static void handleTest(const QCString &) static void handleTest(const QCString &)
{ {
xrefKind = XRef_Test; newXRefKind = XRef_Test;
setOutput(OutputXRef); setOutput(OutputXRef);
xrefKind = XRef_Test;
} }
static void handleBug(const QCString &) static void handleBug(const QCString &)
{ {
xrefKind = XRef_Bug; newXRefKind = XRef_Bug;
setOutput(OutputXRef); setOutput(OutputXRef);
xrefKind = XRef_Bug;
} }
static void handleDeprecated(const QCString &) static void handleDeprecated(const QCString &)
{ {
xrefKind = XRef_Deprecated; newXRefKind = XRef_Deprecated;
setOutput(OutputXRef); setOutput(OutputXRef);
xrefKind = XRef_Deprecated;
} }
static void handleXRefItem(const QCString &) static void handleXRefItem(const QCString &)
{ {
xrefKind = XRef_Item;
setOutput(OutputXRef);
BEGIN(XRefItemParam1); BEGIN(XRefItemParam1);
} }
...@@ -1846,6 +1931,8 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry, ...@@ -1846,6 +1931,8 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
//inBody = foundInBody; //inBody = foundInBody;
protection = prot; protection = prot;
needNewEntry = FALSE; needNewEntry = FALSE;
xrefKind = XRef_None;
xrefAppendFlag = FALSE;
outputXRef.resize(0); outputXRef.resize(0);
setOutput( isBrief || isJavaDocStyle ? OutputBrief : OutputDoc ); setOutput( isBrief || isJavaDocStyle ? OutputBrief : OutputDoc );
briefEndsAtDot = isJavaDocStyle; briefEndsAtDot = isJavaDocStyle;
......
...@@ -1479,6 +1479,13 @@ void Config::create() ...@@ -1479,6 +1479,13 @@ void Config::create()
"all members of a group must be documented explicitly.\n", "all members of a group must be documented explicitly.\n",
FALSE FALSE
); );
cb = addBool(
"SEPARATE_MEMBER_PAGES",
"If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce \n"
"a new page for each member. If set to NO, the documentation of a member will \n"
"be part of the file/class/namespace that contains it.\n",
FALSE
);
ci = addInt( ci = addInt(
"TAB_SIZE", "TAB_SIZE",
"The TAB_SIZE tag can be used to set the number of spaces in a tab. \n" "The TAB_SIZE tag can be used to set the number of spaces in a tab. \n"
......
...@@ -784,9 +784,16 @@ void Definition::writePathFragment(OutputList &ol) const ...@@ -784,9 +784,16 @@ void Definition::writePathFragment(OutputList &ol) const
} }
} }
if (isLinkable()) if (isLinkable())
{
if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle())
{
ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const GroupDef*)this)->groupTitle());
}
else
{ {
ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName); ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName);
} }
}
else else
{ {
ol.startBold(); ol.startBold();
......
...@@ -51,7 +51,7 @@ class Definition ...@@ -51,7 +51,7 @@ class Definition
TypeNamespace, TypePackage, TypePage, TypeDir TypeNamespace, TypePackage, TypePage, TypeDir
}; };
/*! Use this for dynamic inspection of the type of the derived class */ /*! Use this for dynamic inspection of the type of the derived class */
virtual DefType definitionType() = 0; virtual DefType definitionType() const = 0;
/*! Create a new definition */ /*! Create a new definition */
Definition( Definition(
...@@ -195,6 +195,7 @@ class Definition ...@@ -195,6 +195,7 @@ class Definition
void writePathFragment(OutputList &ol) const; void writePathFragment(OutputList &ol) const;
void writeNavigationPath(OutputList &ol) const; void writeNavigationPath(OutputList &ol) const;
virtual void writeQuickMemberLinks(OutputList &,MemberDef *) const {}
protected: protected:
void setLocalName(const QCString name) { m_localName=name; } void setLocalName(const QCString name) { m_localName=name; }
......
...@@ -49,7 +49,7 @@ class DirDef : public Definition ...@@ -49,7 +49,7 @@ class DirDef : public Definition
virtual ~DirDef(); virtual ~DirDef();
// accessors // accessors
virtual DefType definitionType() { return TypeDir; } virtual DefType definitionType() const { return TypeDir; }
virtual QCString getOutputFileBase() const; virtual QCString getOutputFileBase() const;
virtual bool isLinkableInProject() const; virtual bool isLinkableInProject() const;
virtual bool isLinkable() const; virtual bool isLinkable() const;
......
...@@ -557,6 +557,7 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode ...@@ -557,6 +557,7 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
QString title() const { return m_title; } QString title() const { return m_title; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
QString relPath() const { return m_relPath; } QString relPath() const { return m_relPath; }
QString key() const { return m_key; }
void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); }
bool parse(); bool parse();
......
...@@ -369,6 +369,7 @@ static void buildFileList(Entry *root) ...@@ -369,6 +369,7 @@ static void buildFileList(Entry *root)
{ {
bool ambig; bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->name,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->name,ambig);
//printf("**************** root->name=%s fd=%p\n",root->name.data(),fd);
if (fd && !ambig) if (fd && !ambig)
{ {
if ((!root->doc.isEmpty() && !fd->documentation().isEmpty()) || if ((!root->doc.isEmpty() && !fd->documentation().isEmpty()) ||
...@@ -383,6 +384,7 @@ static void buildFileList(Entry *root) ...@@ -383,6 +384,7 @@ static void buildFileList(Entry *root)
} }
else else
{ {
//printf("Adding documentation!\n");
// using FALSE in setDocumentation is small hack to make sure a file // using FALSE in setDocumentation is small hack to make sure a file
// is documented even if a \file command is used without further // is documented even if a \file command is used without further
// documentation // documentation
...@@ -627,30 +629,47 @@ ArgumentList *getTemplateArgumentsFromName( ...@@ -627,30 +629,47 @@ ArgumentList *getTemplateArgumentsFromName(
static void addClassToContext(Entry *root) static void addClassToContext(Entry *root)
{ {
QCString fullName=removeRedundantWhiteSpace(root->name); // QCString fullName=removeRedundantWhiteSpace(root->name);
if (fullName.isEmpty()) //
{ // if (fullName.isEmpty())
// this should not be called // {
warn(root->fileName,root->startLine, // // this should not be called
"Warning: invalid class name found!" // warn(root->fileName,root->startLine,
); // "Warning: invalid class name found!"
return; // );
} // return;
Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data()); // }
// Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data());
//
// fullName=stripAnonymousNamespaceScope(fullName);
// fullName=stripTemplateSpecifiersFromScope(fullName);
//
// Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data());
fullName=stripAnonymousNamespaceScope(fullName); bool ambig;
fullName=stripTemplateSpecifiersFromScope(fullName);
Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data()); NamespaceDef *nd = 0;
FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
bool ambig; // see if the using statement was found inside a namespace or inside
ClassDef *cd; // the global file scope.
//printf("findFileDef(%s)\n",root->fileName.data()); if (root->parent->section == Entry::NAMESPACE_SEC)
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); {
QCString scName=root->parent->name;
if (!scName.isEmpty())
{
nd = getResolvedNamespace(scName);
}
}
QCString fullName = root->name;
ClassDef *cd = getResolvedClass(nd,fd,root->name,0,0,TRUE);
Debug::print(Debug::Classes,0, " Found class with name %s (cd=%p)\n",
cd ? cd->name().data() : root->name.data(), cd);
if ((cd=getClass(fullName))) if (cd)
{ {
Debug::print(Debug::Classes,0," Existing class!\n",fullName.data()); fullName=cd->name();
Debug::print(Debug::Classes,0," Existing class %s!\n",cd->name().data());
//if (cd->templateArguments()==0) //if (cd->templateArguments()==0)
//{ //{
// //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data()); // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
...@@ -693,7 +712,7 @@ static void addClassToContext(Entry *root) ...@@ -693,7 +712,7 @@ static void addClassToContext(Entry *root)
cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig)); cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
} }
cd->addSectionsToDefinition(root->anchors); cd->addSectionsToDefinition(root->anchors);
cd->setName(fullName); // change name to match docs //cd->setName(fullName); // change name to match docs
} }
cd->setFileDef(fd); cd->setFileDef(fd);
if (cd->hasDocumentation()) if (cd->hasDocumentation())
...@@ -719,7 +738,7 @@ static void addClassToContext(Entry *root) ...@@ -719,7 +738,7 @@ static void addClassToContext(Entry *root)
// this happens if a template class declared with @class is found // this happens if a template class declared with @class is found
// before the actual definition. // before the actual definition.
ArgumentList *tArgList = ArgumentList *tArgList =
getTemplateArgumentsFromName(fullName,root->tArgLists); getTemplateArgumentsFromName(cd->name(),root->tArgLists);
cd->setTemplateArguments(tArgList); cd->setTemplateArguments(tArgList);
} }
} }
...@@ -1703,7 +1722,7 @@ static MemberDef *addVariableToFile( ...@@ -1703,7 +1722,7 @@ static MemberDef *addVariableToFile(
*/ */
static int findFunctionPtr(const QCString &type,int *pLength=0) static int findFunctionPtr(const QCString &type,int *pLength=0)
{ {
static const QRegExp re("([^)]*\\*"); static const QRegExp re("([^)]*)");
int i=-1,l; int i=-1,l;
if (!type.isEmpty() && // return type is non-empty if (!type.isEmpty() && // return type is non-empty
(i=re.match(type,0,&l))!=-1 && // contains a (* (i=re.match(type,0,&l))!=-1 && // contains a (*
...@@ -2424,27 +2443,52 @@ static void buildFunctionList(Entry *root) ...@@ -2424,27 +2443,52 @@ static void buildFunctionList(Entry *root)
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setMemberSpecifiers(root->memSpec); md->setMemberSpecifiers(root->memSpec);
md->setMemberGroupId(root->mGrpId); md->setMemberGroupId(root->mGrpId);
// see if the function is inside a namespace
NamespaceDef *nd = 0;
QCString scope;
if (root->parent->section == Entry::NAMESPACE_SEC )
{
QCString nscope=removeAnonymousScopes(root->parent->name);
if (!nscope.isEmpty())
{
nd = getResolvedNamespace(nscope);
if (nd)
{
scope+=nd->name();
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
scope+=".";
}
else
{
scope+="::";
}
}
}
}
QCString def; QCString def;
if (!root->type.isEmpty()) if (!root->type.isEmpty())
{ {
if (root->argList) if (root->argList)
{ {
def=root->type+" "+name; def=root->type+" "+scope+name;
} }
else else
{ {
def=root->type+" "+name+root->args; def=root->type+" "+scope+name+root->args;
} }
} }
else else
{ {
if (root->argList) if (root->argList)
{ {
def=name.copy(); def=scope+name.copy();
} }
else else
{ {
def=name+root->args; def=scope+name+root->args;
} }
} }
Debug::print(Debug::Functions,0, Debug::print(Debug::Functions,0,
...@@ -2465,17 +2509,6 @@ static void buildFunctionList(Entry *root) ...@@ -2465,17 +2509,6 @@ static void buildFunctionList(Entry *root)
// md->setMemberGroup(memberGroupDict[root->mGrpId]); // md->setMemberGroup(memberGroupDict[root->mGrpId]);
//} //}
// see if the function is inside a namespace
NamespaceDef *nd = 0;
if (root->parent->section == Entry::NAMESPACE_SEC )
{
QCString nscope=removeAnonymousScopes(root->parent->name);
if (!nscope.isEmpty())
{
nd = getResolvedNamespace(nscope);
}
}
md->setRefItems(root->sli); md->setRefItems(root->sli);
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{ {
......
...@@ -501,6 +501,38 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -501,6 +501,38 @@ void FileDef::writeDocumentation(OutputList &ol)
writeDetailedDocumentation(ol); writeDetailedDocumentation(ol);
} }
writeMemberDocumentation(ol);
// write Author section (Man only)
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.enableAll();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
endFile(ol);
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
allMemberList.sort();
writeMemberPages(ol);
}
}
void FileDef::writeMemberDocumentation(OutputList &ol)
{
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
ol.disable(OutputGenerator::Html);
}
docDefineMembers.writeDocumentation(ol,name(),this, docDefineMembers.writeDocumentation(ol,name(),this,
theTranslator->trDefineDocumentation()); theTranslator->trDefineDocumentation());
...@@ -519,21 +551,61 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -519,21 +551,61 @@ void FileDef::writeDocumentation(OutputList &ol)
docVarMembers.writeDocumentation(ol,name(),this, docVarMembers.writeDocumentation(ol,name(),this,
theTranslator->trVariableDocumentation()); theTranslator->trVariableDocumentation());
// write Author section (Man only) if (Config_getBool("SEPARATE_MEMBER_PAGES"))
ol.disableAllBut(OutputGenerator::Man); {
ol.startGroupHeader(); ol.enable(OutputGenerator::Html);
ol.parseText(theTranslator->trAuthor(TRUE,TRUE)); }
ol.endGroupHeader(); }
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.enableAll();
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) void FileDef::writeMemberPages(OutputList &ol)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
docDefineMembers.writeDocumentationPage(ol,name(),this);
docProtoMembers.writeDocumentationPage(ol,name(),this);
docTypedefMembers.writeDocumentationPage(ol,name(),this);
docEnumMembers.writeDocumentationPage(ol,name(),this);
docFuncMembers.writeDocumentationPage(ol,name(),this);
docVarMembers.writeDocumentationPage(ol,name(),this);
ol.popGeneratorState();
}
void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
MemberListIterator mli(allMemberList);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{ {
writeDocAnchorsToTagFile(); if (md->getFileDef()==this && md->getNamespaceDef()==0 && md->isLinkable())
Doxygen::tagFile << " </compound>" << endl; {
ol.writeString(" <tr><td class=\"navtab\">");
if (md->isLinkableInProject())
{
if (md==currentMd) // selected item => highlight
{
ol.writeString("<a class=\"qindexHL\" ");
}
else
{
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->localName());
ol.writeString("</a>");
}
ol.writeString("</td></tr>\n");
}
} }
endFile(ol); ol.writeString(" </table>\n");
ol.writeString(" </div>\n");
} }
/*! Write a source listing of this file to the output */ /*! Write a source listing of this file to the output */
......
...@@ -69,7 +69,7 @@ class FileDef : public Definition ...@@ -69,7 +69,7 @@ class FileDef : public Definition
FileDef(const char *p,const char *n,const char *ref=0,const char *dn=0); FileDef(const char *p,const char *n,const char *ref=0,const char *dn=0);
~FileDef(); ~FileDef();
DefType definitionType() { return TypeFile; } DefType definitionType() const { return TypeFile; }
/*! Returns the unique file name (this may include part of the path). */ /*! Returns the unique file name (this may include part of the path). */
QCString name() const QCString name() const
...@@ -126,6 +126,10 @@ class FileDef : public Definition ...@@ -126,6 +126,10 @@ class FileDef : public Definition
void writeDetailedDocumentation(OutputList &ol); void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeMemberDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
void writeSource(OutputList &ol); void writeSource(OutputList &ol);
void parseSource(); void parseSource();
friend void generatedFileNames(); friend void generatedFileNames();
......
...@@ -687,6 +687,32 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -687,6 +687,32 @@ void GroupDef::writeDocumentation(OutputList &ol)
} }
} }
writeMemberDocumentation(ol);
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
endFile(ol);
ol.popGeneratorState();
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
allMemberList->sort();
writeMemberPages(ol);
}
}
void GroupDef::writeMemberDocumentation(OutputList &ol)
{
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
ol.disable(OutputGenerator::Html);
}
docDefineMembers.writeDocumentation(ol,name(),this, docDefineMembers.writeDocumentation(ol,name(),this,
theTranslator->trDefineDocumentation()); theTranslator->trDefineDocumentation());
...@@ -705,16 +731,65 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -705,16 +731,65 @@ void GroupDef::writeDocumentation(OutputList &ol)
docVarMembers.writeDocumentation(ol,name(),this, docVarMembers.writeDocumentation(ol,name(),this,
theTranslator->trVariableDocumentation()); theTranslator->trVariableDocumentation());
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{ {
writeDocAnchorsToTagFile(); ol.enable(OutputGenerator::Html);
Doxygen::tagFile << " </compound>" << endl;
} }
}
void GroupDef::writeMemberPages(OutputList &ol)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
docDefineMembers.writeDocumentationPage(ol,name(),this);
docProtoMembers.writeDocumentationPage(ol,name(),this);
docTypedefMembers.writeDocumentationPage(ol,name(),this);
docEnumMembers.writeDocumentationPage(ol,name(),this);
docFuncMembers.writeDocumentationPage(ol,name(),this);
docVarMembers.writeDocumentationPage(ol,name(),this);
endFile(ol);
ol.popGeneratorState(); ol.popGeneratorState();
} }
void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
MemberListIterator mli(*allMemberList);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
if (md->getGroupDef()==this && md->isLinkable())
{
ol.writeString(" <tr><td class=\"navtab\">");
if (md->isLinkableInProject())
{
if (md==currentMd) // selected item => highlight
{
ol.writeString("<a class=\"qindexHL\" ");
}
else
{
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->localName());
ol.writeString("</a>");
}
ol.writeString("</td></tr>\n");
}
}
ol.writeString(" </table>\n");
ol.writeString(" </div>\n");
}
//---- helper functions ------------------------------------------------------ //---- helper functions ------------------------------------------------------
void addClassToGroups(Entry *root,ClassDef *cd) void addClassToGroups(Entry *root,ClassDef *cd)
......
...@@ -45,7 +45,7 @@ class GroupDef : public Definition ...@@ -45,7 +45,7 @@ class GroupDef : public Definition
public: public:
GroupDef(const char *fileName,int line,const char *name,const char *title,const char *refFileName=0); GroupDef(const char *fileName,int line,const char *name,const char *title,const char *refFileName=0);
~GroupDef(); ~GroupDef();
DefType definitionType() { return TypeGroup; } DefType definitionType() const { return TypeGroup; }
QCString getOutputFileBase() const; QCString getOutputFileBase() const;
const char *groupTitle() const { return title; } const char *groupTitle() const { return title; }
void setGroupTitle( const char *newtitle ); void setGroupTitle( const char *newtitle );
...@@ -63,6 +63,9 @@ class GroupDef : public Definition ...@@ -63,6 +63,9 @@ class GroupDef : public Definition
bool containsGroup(const GroupDef *def); // true if def is already a subgroup bool containsGroup(const GroupDef *def); // true if def is already a subgroup
void writeDetailedDocumentation(OutputList &ol); void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeMemberDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
int countMembers() const; int countMembers() const;
bool isLinkableInProject() const bool isLinkableInProject() const
{ {
......
...@@ -78,6 +78,17 @@ static const char *defaultStyleSheet = ...@@ -78,6 +78,17 @@ static const char *defaultStyleSheet =
" padding: 2px;\n" " padding: 2px;\n"
" line-height: 140%;\n" " line-height: 140%;\n"
"}\n" "}\n"
"DIV.navtab {\n"
" background-color: #eeeeff;\n"
" border: 1px solid #b0b0b0;\n"
" text-align: center;\n"
" margin: 2px;\n"
" margin-right: 15px;\n"
" padding: 2px;\n"
"}\n"
"TD.navtab {\n"
" font-size: 70%;\n"
"}\n"
"A.qindex {\n" "A.qindex {\n"
" text-decoration: none;\n" " text-decoration: none;\n"
" font-weight: bold;\n" " font-weight: bold;\n"
...@@ -495,34 +506,6 @@ void HtmlGenerator::startFile(const char *name,const char *, ...@@ -495,34 +506,6 @@ void HtmlGenerator::startFile(const char *name,const char *,
<< versionString << " -->" << endl; << versionString << " -->" << endl;
} }
//void HtmlGenerator::startQuickIndexItem(const char *s,const char *l)
//{
// QCString *dest;
// if (s)
// {
// t << "<a class=\"qindexRef\" ";
// t << "doxygen=\"" << s << ":";
// if ((dest=Doxygen::tagDestinationDict[s])) t << *dest;
// if (strcmp(s,"_cgi")!=0) t << "/"; // small hack to get the cgi binary link right
// t << "\" ";
// }
// else
// {
// t << "<a class=\"qindex\" ";
// }
// t << "href=\"";
// if (s)
// {
// if ((dest=Doxygen::tagDestinationDict[s])) t << *dest;
// if (strcmp(s,"_cgi")!=0) t << "/";
// }
// t << l << "\">";
//}
//
//void HtmlGenerator::endQuickIndexItem()
//{
// t << "</a> &nbsp; ";
//}
static void writePageFooter(QTextStream &t,const QCString &lastTitle, static void writePageFooter(QTextStream &t,const QCString &lastTitle,
const QCString relPath) const QCString relPath)
......
...@@ -36,7 +36,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -36,7 +36,8 @@ class HtmlGenerator : public OutputGenerator
static void writeHeaderFile(QFile &f); static void writeHeaderFile(QFile &f);
static void writeFooterFile(QFile &f); static void writeFooterFile(QFile &f);
void enable() { active=TRUE; } void enable()
{ if (genStack->top()) active=*genStack->top(); else active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Html) active=TRUE; } void enableIf(OutputType o) { if (o==Html) active=TRUE; }
void disableIf(OutputType o) { if (o==Html) active=FALSE; } void disableIf(OutputType o) { if (o==Html) active=FALSE; }
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
#include "pagedef.h" #include "pagedef.h"
#include "dirdef.h" #include "dirdef.h"
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200
#define MAX_ITEMS_BEFORE_QUICK_INDEX 30
int annotatedClasses; int annotatedClasses;
int hierarchyClasses; int hierarchyClasses;
int documentedFiles; int documentedFiles;
...@@ -122,7 +125,7 @@ static bool g_fileIndexLetterUsed[FMHL_Total][256]; ...@@ -122,7 +125,7 @@ static bool g_fileIndexLetterUsed[FMHL_Total][256];
static bool g_namespaceIndexLetterUsed[NMHL_Total][256]; static bool g_namespaceIndexLetterUsed[NMHL_Total][256];
static bool g_classIndexLetterUsed[CHL_Total][256]; static bool g_classIndexLetterUsed[CHL_Total][256];
const int maxItemsBeforeQuickIndex = 30; const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -1508,7 +1511,8 @@ void writeAnnotatedIndex(OutputList &ol) ...@@ -1508,7 +1511,8 @@ void writeAnnotatedIndex(OutputList &ol)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter) void writeMemberList(OutputList &ol,bool useSections,
ClassMemberHighlight filter,char sectionFilter)
{ {
bool first = TRUE; bool first = TRUE;
char lastChar = 0; char lastChar = 0;
...@@ -1516,6 +1520,8 @@ void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter ...@@ -1516,6 +1520,8 @@ void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter
MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict);
MemberName *mn=0; MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli) for (mnli.toFirst();(mn=mnli.current());++mnli)
{
if (sectionFilter==0 || tolower(sectionFilter)==tolower(mn->memberName()[0]))
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
bool found=FALSE; bool found=FALSE;
...@@ -1531,7 +1537,7 @@ void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter ...@@ -1531,7 +1537,7 @@ void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter
md->isLinkableInProject() && md->isLinkableInProject() &&
(cd=md->getClassDef()) && (cd=md->getClassDef()) &&
cd->isLinkableInProject() && cd->templateMaster()==0 && cd->isLinkableInProject() && cd->templateMaster()==0 &&
( filter==CMHL_All && !(md->isFriend() && isFriendToHide) || ( (filter==CMHL_All && !(md->isFriend() && isFriendToHide)) ||
(filter==CMHL_Functions && (md->isFunction() || md->isSlot() || md->isSignal())) || (filter==CMHL_Functions && (md->isFunction() || md->isSlot() || md->isSignal())) ||
(filter==CMHL_Variables && md->isVariable()) || (filter==CMHL_Variables && md->isVariable()) ||
(filter==CMHL_Typedefs && md->isTypedef()) || (filter==CMHL_Typedefs && md->isTypedef()) ||
...@@ -1603,6 +1609,7 @@ void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter ...@@ -1603,6 +1609,7 @@ void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter
} }
} }
} }
}
ol.endItemList(); ol.endItemList();
} }
...@@ -1657,18 +1664,26 @@ int countClassMembers(int filter) ...@@ -1657,18 +1664,26 @@ int countClassMembers(int filter)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void writeQuickMemberIndex(OutputList &ol,bool *charUsed) void writeQuickMemberIndex(OutputList &ol,bool *charUsed,int page,
QCString fullName,bool multiPage)
{ {
bool first=TRUE; bool first=TRUE;
int i; int i;
ol.writeString("<div class=\"qindex\">"); ol.writeString("<div class=\"qindex\">");
for (i=33;i<127;i++) for (i=33;i<127;i++)
{ {
QCString anchor="#index_";
char is[2];is[0]=(char)i;is[1]='\0'; char is[2];is[0]=(char)i;is[1]='\0';
if (charUsed[i]) if (charUsed[i])
{ {
startQuickIndexItem(ol,anchor+is,FALSE,TRUE,first); QCString anchor;
QCString extension=Doxygen::htmlFileExtension;
if (!multiPage)
anchor="#index_";
else if (first)
anchor=fullName+extension+"#index_";
else
anchor=fullName+QCString().sprintf("_0x%02x",i)+extension+"#index_";
startQuickIndexItem(ol,anchor+is,i==page,TRUE,first);
ol.writeString(is); ol.writeString(is);
endQuickIndexItem(ol); endQuickIndexItem(ol);
first=FALSE; first=FALSE;
...@@ -1680,139 +1695,154 @@ void writeQuickMemberIndex(OutputList &ol,bool *charUsed) ...@@ -1680,139 +1695,154 @@ void writeQuickMemberIndex(OutputList &ol,bool *charUsed)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void writeMemberIndexFiltered(OutputList &ol, static void writeMemberIndexFiltered(OutputList &ol, ClassMemberHighlight hl)
const char *fileName,ClassMemberHighlight hl,
const QCString& title)
{ {
if (documentedClassMembers[hl]==0) return; if (documentedClassMembers[hl]==0) return;
bool multiPageIndex=FALSE;
int numPages=1;
if (documentedClassMembers[hl]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
{
multiPageIndex=TRUE;
numPages=127;
}
struct
{
const char *fname;
QCString title;
} cmhlInfo[] =
{
{ "functions", 0 },
{ "functions_func",0 },
{ "functions_vars",0 },
{ "functions_type",0 },
{ "functions_enum",0 },
{ "functions_eval",0 },
{ "functions_rela",0 },
{ "functions_prop",0 },
{ "functions_evnt",0 },
{ "functions_rela",0 },
};
cmhlInfo[0].title=theTranslator->trAll();
cmhlInfo[1].title=theTranslator->trFunctions();
cmhlInfo[2].title=theTranslator->trVariables();
cmhlInfo[3].title=theTranslator->trTypedefs();
cmhlInfo[4].title=theTranslator->trEnumerations();
cmhlInfo[5].title=theTranslator->trEnumerationValues();
cmhlInfo[6].title=theTranslator->trProperties();
cmhlInfo[7].title=theTranslator->trEvents();
cmhlInfo[8].title=theTranslator->trRelatedFunctions();
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
startFile(ol,fileName,0,title.data(),HLI_Functions);
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
ol.writeString("<div class=\"qindex\">"); QCString extension=Doxygen::htmlFileExtension;
QCString title = theTranslator->trCompoundMembers();
if (hl!=CMHL_All) title+=(QCString)" - "+cmhlInfo[hl].title;
int page;
bool first=TRUE; bool first=TRUE;
startQuickIndexItem(ol, for (page=0;page<numPages;page++)
"functions"+Doxygen::htmlFileExtension,hl==CMHL_All,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trAll()));
endQuickIndexItem(ol);
if (documentedClassMembers[CMHL_Functions]>0)
{
startQuickIndexItem(ol,
"functions_func"+Doxygen::htmlFileExtension,hl==CMHL_Functions,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trFunctions()));
endQuickIndexItem(ol);
}
if (documentedClassMembers[CMHL_Variables]>0)
{ {
startQuickIndexItem(ol, if (!multiPageIndex || g_memberIndexLetterUsed[hl][page])
"functions_vars"+Doxygen::htmlFileExtension,hl==CMHL_Variables,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trVariables()));
endQuickIndexItem(ol);
}
if (documentedClassMembers[CMHL_Typedefs]>0)
{ {
startQuickIndexItem(ol, QCString fileName = cmhlInfo[hl].fname;
"functions_type"+Doxygen::htmlFileExtension,hl==CMHL_Typedefs,TRUE,first); if (multiPageIndex && !first)
ol.writeString(fixSpaces(theTranslator->trTypedefs()));
endQuickIndexItem(ol);
}
if (documentedClassMembers[CMHL_Enums]>0)
{ {
startQuickIndexItem(ol, fileName+=QCString().sprintf("_0x%02x",page);
"functions_enum"+Doxygen::htmlFileExtension,hl==CMHL_Enums,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trEnumerations()));
endQuickIndexItem(ol);
} }
if (documentedClassMembers[CMHL_EnumValues]>0)
{ startFile(ol,fileName+extension,0,title,HLI_Functions);
ol.writeString("<div class=\"qindex\">");
// index item for global member list
startQuickIndexItem(ol, startQuickIndexItem(ol,
"functions_eval"+Doxygen::htmlFileExtension,hl==CMHL_EnumValues,TRUE,first); cmhlInfo[0].fname+Doxygen::htmlFileExtension,hl==CMHL_All,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trEnumerationValues())); ol.writeString(fixSpaces(cmhlInfo[0].title));
endQuickIndexItem(ol); endQuickIndexItem(ol);
}
if (documentedClassMembers[CMHL_Properties]>0) // index items per category member lists
int i;
for (i=1;i<CMHL_Total;i++)
{ {
startQuickIndexItem(ol, if (documentedClassMembers[i]>0)
"functions_prop"+Doxygen::htmlFileExtension,hl==CMHL_Properties,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trProperties()));
endQuickIndexItem(ol);
}
if (documentedClassMembers[CMHL_Events]>0)
{ {
startQuickIndexItem(ol, startQuickIndexItem(ol,cmhlInfo[i].fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
"functions_evnt"+Doxygen::htmlFileExtension,hl==CMHL_Events,TRUE,first); ol.writeString(fixSpaces(cmhlInfo[i].title));
ol.writeString(fixSpaces(theTranslator->trEvents())); //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
// multiPageIndex,first,fileName.data(),cmhlInfo[i].fname,cmhlInfo[i].title.data());
endQuickIndexItem(ol); endQuickIndexItem(ol);
} }
if (documentedClassMembers[CMHL_Related]>0)
{
startQuickIndexItem(ol,
"functions_rela"+Doxygen::htmlFileExtension,hl==CMHL_Related,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trRelatedFunctions()));
endQuickIndexItem(ol);
} }
ol.writeString("</div>\n"); ol.writeString("</div>\n");
// quick alphabetical index
bool quickIndex = documentedClassMembers[hl]>maxItemsBeforeQuickIndex; bool quickIndex = documentedClassMembers[hl]>maxItemsBeforeQuickIndex;
if (quickIndex) if (quickIndex)
{ {
writeQuickMemberIndex(ol,g_memberIndexLetterUsed[hl]); writeQuickMemberIndex(ol,g_memberIndexLetterUsed[hl],page,
cmhlInfo[hl].fname,multiPageIndex);
} }
ol.newParagraph();
if (hl==CMHL_All) if (hl==CMHL_All)
{ {
ol.parseText(theTranslator->trCompoundMembersDescription(Config_getBool("EXTRACT_ALL")));
}
ol.newParagraph();
writeMemberList(ol,quickIndex,hl,page);
endFile(ol);
first=FALSE;
}
}
ol.popGeneratorState();
}
void writeMemberIndex(OutputList &ol)
{
writeMemberIndexFiltered(ol,CMHL_All);
writeMemberIndexFiltered(ol,CMHL_Functions);
writeMemberIndexFiltered(ol,CMHL_Variables);
writeMemberIndexFiltered(ol,CMHL_Typedefs);
writeMemberIndexFiltered(ol,CMHL_Enums);
writeMemberIndexFiltered(ol,CMHL_EnumValues);
writeMemberIndexFiltered(ol,CMHL_Properties);
writeMemberIndexFiltered(ol,CMHL_Events);
writeMemberIndexFiltered(ol,CMHL_Related);
QCString title = theTranslator->trCompoundMembers();
bool &generateHtml = Config_getBool("GENERATE_HTML") ; bool &generateHtml = Config_getBool("GENERATE_HTML") ;
bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
HtmlHelp *htmlHelp = HtmlHelp::getInstance(); HtmlHelp *htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"functions"); htmlHelp->addContentsItem(FALSE,title,"functions");
} }
if (hasFtvHelp) if (hasFtvHelp)
{ {
FTVHelp *ftvHelp = FTVHelp::getInstance(); FTVHelp *ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(FALSE,0,"functions",0,ftvHelpTitle); ftvHelp->addContentsItem(FALSE,0,"functions",0,title);
} }
ol.parseText(theTranslator->trCompoundMembersDescription(Config_getBool("EXTRACT_ALL")));
}
writeMemberList(ol,quickIndex,hl);
endFile(ol);
ol.popGeneratorState();
}
void writeMemberIndex(OutputList &ol)
{
QCString ext=Doxygen::htmlFileExtension;
QCString title = theTranslator->trCompoundMembers();
writeMemberIndexFiltered(ol,"functions"+ext,CMHL_All,title);
title += " - ";
writeMemberIndexFiltered(ol,"functions_func"+ext,CMHL_Functions, title + theTranslator->trFunctions());
writeMemberIndexFiltered(ol,"functions_vars"+ext,CMHL_Variables, title + theTranslator->trVariables());
writeMemberIndexFiltered(ol,"functions_type"+ext,CMHL_Typedefs, title + theTranslator->trTypedefs());
writeMemberIndexFiltered(ol,"functions_enum"+ext,CMHL_Enums, title + theTranslator->trEnumerations());
writeMemberIndexFiltered(ol,"functions_eval"+ext,CMHL_EnumValues, title + theTranslator->trEnumerationValues());
writeMemberIndexFiltered(ol,"functions_prop"+ext,CMHL_Properties, title + theTranslator->trProperties());
writeMemberIndexFiltered(ol,"functions_evnt"+ext,CMHL_Events, title + theTranslator->trEvents());
writeMemberIndexFiltered(ol,"functions_rela"+ext,CMHL_Related, title + theTranslator->trRelatedFunctions());
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void writeFileMemberList(OutputList &ol, static void writeFileMemberList(OutputList &ol,
bool useSections, bool useSections,
FileMemberHighlight filter) FileMemberHighlight filter,
char sectionFilter)
{ {
char lastChar=0; char lastChar=0;
bool first=TRUE; bool first=TRUE;
MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict);
MemberName *mn=0; MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli) for (mnli.toFirst();(mn=mnli.current());++mnli)
{
if (sectionFilter==0 || tolower(sectionFilter)==tolower(mn->memberName()[0]))
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
bool found=FALSE; bool found=FALSE;
...@@ -1894,19 +1924,23 @@ static void writeFileMemberList(OutputList &ol, ...@@ -1894,19 +1924,23 @@ static void writeFileMemberList(OutputList &ol,
} }
} }
} }
}
ol.endItemList(); ol.endItemList();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void writeNamespaceMemberList(OutputList &ol,bool useSections, void writeNamespaceMemberList(OutputList &ol,bool useSections,
NamespaceMemberHighlight filter) NamespaceMemberHighlight filter,
char sectionFilter)
{ {
char lastChar=0; char lastChar=0;
bool first=TRUE; bool first=TRUE;
MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict); MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict);
MemberName *mn=0; MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli) for (mnli.toFirst();(mn=mnli.current());++mnli)
{
if (sectionFilter==0 || tolower(sectionFilter)==tolower(mn->memberName()[0]))
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
bool found=FALSE; bool found=FALSE;
...@@ -1982,6 +2016,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections, ...@@ -1982,6 +2016,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections,
} }
} }
} }
}
if (!first) ol.endItemList(); if (!first) ol.endItemList();
} }
...@@ -2067,215 +2102,248 @@ int countFileMembers(int filter) ...@@ -2067,215 +2102,248 @@ int countFileMembers(int filter)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void writeFileMemberIndexFiltered(OutputList &ol, static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
const char *fileName,FileMemberHighlight hl,
const QCString& title)
{ {
if (documentedFileMembers[hl]==0) return; if (documentedFileMembers[hl]==0) return;
bool multiPageIndex=FALSE;
int numPages=1;
if (documentedFileMembers[hl]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
{
multiPageIndex=TRUE;
numPages=127;
}
struct
{
const char *fname;
QCString title;
} fmhlInfo[] =
{
{ "globals", 0 },
{ "globals_func",0 },
{ "globals_vars",0 },
{ "globals_type",0 },
{ "globals_enum",0 },
{ "globals_eval",0 },
{ "globals_defs",0 }
};
fmhlInfo[0].title=theTranslator->trAll();
fmhlInfo[1].title=theTranslator->trFunctions();
fmhlInfo[2].title=theTranslator->trVariables();
fmhlInfo[3].title=theTranslator->trTypedefs();
fmhlInfo[4].title=theTranslator->trEnumerations();
fmhlInfo[5].title=theTranslator->trEnumerationValues();
fmhlInfo[6].title=theTranslator->trDefines();
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
startFile(ol,fileName,0,title.data(),HLI_Globals);
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
ol.writeString("<div class=\"qindex\">"); QCString extension=Doxygen::htmlFileExtension;
QCString title = theTranslator->trCompoundMembers();
int page;
bool first=TRUE; bool first=TRUE;
startQuickIndexItem(ol, for (page=0;page<numPages;page++)
"globals"+Doxygen::htmlFileExtension,hl==FMHL_All,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trAll()));
endQuickIndexItem(ol);
if (documentedFileMembers[FMHL_Functions]>0)
{ {
startQuickIndexItem(ol, if (!multiPageIndex || g_fileIndexLetterUsed[hl][page])
"globals_func"+Doxygen::htmlFileExtension,hl==FMHL_Functions,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trFunctions()));
endQuickIndexItem(ol);
}
if (documentedFileMembers[FMHL_Variables]>0)
{ {
startQuickIndexItem(ol, QCString fileName = fmhlInfo[hl].fname;
"globals_vars"+Doxygen::htmlFileExtension,hl==FMHL_Variables,TRUE,first); if (multiPageIndex && !first)
ol.writeString(fixSpaces(theTranslator->trVariables()));
endQuickIndexItem(ol);
}
if (documentedFileMembers[FMHL_Typedefs]>0)
{ {
startQuickIndexItem(ol, fileName+=QCString().sprintf("_0x%02x",page);
"globals_type"+Doxygen::htmlFileExtension,hl==FMHL_Typedefs,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trTypedefs()));
endQuickIndexItem(ol);
} }
if (documentedFileMembers[FMHL_Enums]>0)
{ startFile(ol,fileName+extension,0,title.data(),HLI_Globals);
ol.writeString("<div class=\"qindex\">");
// index item for all member lists
startQuickIndexItem(ol, startQuickIndexItem(ol,
"globals_enum"+Doxygen::htmlFileExtension,hl==FMHL_Enums,TRUE,first); fmhlInfo[0].fname+Doxygen::htmlFileExtension,hl==FMHL_All,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trEnumerations())); ol.writeString(fixSpaces(fmhlInfo[0].title));
endQuickIndexItem(ol); endQuickIndexItem(ol);
}
if (documentedFileMembers[FMHL_EnumValues]>0) int i;
// index items for per category member lists
for (i=1;i<FMHL_Total;i++)
{ {
startQuickIndexItem(ol, if (documentedFileMembers[i]>0)
"globals_eval"+Doxygen::htmlFileExtension,hl==FMHL_EnumValues,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trEnumerationValues()));
endQuickIndexItem(ol);
}
if (documentedFileMembers[FMHL_Defines]>0)
{ {
startQuickIndexItem(ol, startQuickIndexItem(ol,
"globals_defs"+Doxygen::htmlFileExtension,hl==FMHL_Defines,TRUE,first); fmhlInfo[i].fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trDefines())); ol.writeString(fixSpaces(fmhlInfo[i].title));
endQuickIndexItem(ol); endQuickIndexItem(ol);
} }
ol.writeString("</div>\n"); }
ol.writeString("</div>\n");
bool quickIndex = documentedFileMembers[hl]>maxItemsBeforeQuickIndex; bool quickIndex = documentedFileMembers[hl]>maxItemsBeforeQuickIndex;
if (quickIndex) if (quickIndex)
{ {
writeQuickMemberIndex(ol,g_fileIndexLetterUsed[hl]); writeQuickMemberIndex(ol,g_fileIndexLetterUsed[hl],page,
fmhlInfo[hl].fname,multiPageIndex);
} }
ol.newParagraph();
if (hl==FMHL_All) if (hl==FMHL_All)
{ {
ol.parseText(theTranslator->trFileMembersDescription(Config_getBool("EXTRACT_ALL")));
}
ol.newParagraph();
writeFileMemberList(ol,quickIndex,hl,page);
endFile(ol);
first=FALSE;
}
}
ol.popGeneratorState();
}
void writeFileMemberIndex(OutputList &ol)
{
writeFileMemberIndexFiltered(ol,FMHL_All);
writeFileMemberIndexFiltered(ol,FMHL_Functions);
writeFileMemberIndexFiltered(ol,FMHL_Variables);
writeFileMemberIndexFiltered(ol,FMHL_Typedefs);
writeFileMemberIndexFiltered(ol,FMHL_Enums);
writeFileMemberIndexFiltered(ol,FMHL_EnumValues);
writeFileMemberIndexFiltered(ol,FMHL_Defines);
QCString title = theTranslator->trFileMembers();
bool &generateHtml = Config_getBool("GENERATE_HTML") ; bool &generateHtml = Config_getBool("GENERATE_HTML") ;
bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
HtmlHelp *htmlHelp = HtmlHelp::getInstance(); HtmlHelp *htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"globals"); htmlHelp->addContentsItem(FALSE,title,"globals");
} }
if (hasFtvHelp) if (hasFtvHelp)
{ {
FTVHelp *ftvHelp = FTVHelp::getInstance(); FTVHelp *ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(FALSE,0,"globals",0,ftvHelpTitle); ftvHelp->addContentsItem(FALSE,0,"globals",0,title);
}
ol.parseText(theTranslator->trFileMembersDescription(Config_getBool("EXTRACT_ALL")));
} }
writeFileMemberList(ol,quickIndex,hl);
endFile(ol);
ol.popGeneratorState();
}
void writeFileMemberIndex(OutputList &ol)
{
QCString ext=Doxygen::htmlFileExtension;
QCString title = theTranslator->trFileMembers();
writeFileMemberIndexFiltered(ol,"globals"+ext,FMHL_All, title);
title += " - ";
writeFileMemberIndexFiltered(ol,"globals_func"+ext,FMHL_Functions, title + theTranslator->trFunctions());
writeFileMemberIndexFiltered(ol,"globals_vars"+ext,FMHL_Variables, title + theTranslator->trVariables());
writeFileMemberIndexFiltered(ol,"globals_type"+ext,FMHL_Typedefs, title + theTranslator->trTypedefs());
writeFileMemberIndexFiltered(ol,"globals_enum"+ext,FMHL_Enums, title + theTranslator->trEnumerations());
writeFileMemberIndexFiltered(ol,"globals_eval"+ext,FMHL_EnumValues, title + theTranslator->trEnumerationValues());
writeFileMemberIndexFiltered(ol,"globals_defs"+ext,FMHL_Defines, title + theTranslator->trDefines());
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void writeNamespaceMemberIndexFiltered(OutputList &ol, static void writeNamespaceMemberIndexFiltered(OutputList &ol,
const char *fileName, NamespaceMemberHighlight hl)
NamespaceMemberHighlight hl,
const QCString& title)
{ {
if (documentedNamespaceMembers[hl]==0) return; if (documentedNamespaceMembers[hl]==0) return;
bool multiPageIndex=FALSE;
int numPages=1;
if (documentedNamespaceMembers[hl]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
{
multiPageIndex=TRUE;
numPages=127;
}
struct
{
const char *fname;
QCString title;
} nmhlInfo[] =
{
{ "namespacemembers", 0 },
{ "namespacemembers_func",0 },
{ "namespacemembers_vars",0 },
{ "namespacemembers_type",0 },
{ "namespacemembers_enum",0 },
{ "namespacemembers_eval",0 }
};
nmhlInfo[0].title=theTranslator->trAll();
nmhlInfo[1].title=theTranslator->trFunctions();
nmhlInfo[2].title=theTranslator->trVariables();
nmhlInfo[3].title=theTranslator->trTypedefs();
nmhlInfo[4].title=theTranslator->trEnumerations();
nmhlInfo[5].title=theTranslator->trEnumerationValues();
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
startFile(ol,fileName,0,title.data(),HLI_NamespaceMembers);
QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title;
//if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
//startTitle(ol,0);
//ol.parseText(title);
//endTitle(ol,0,0);
ol.writeString("<div class=\"qindex\">"); QCString extension=Doxygen::htmlFileExtension;
QCString title = theTranslator->trCompoundMembers();
int page;
bool first=TRUE; bool first=TRUE;
startQuickIndexItem(ol, for (page=0;page<numPages;page++)
"namespacemembers"+Doxygen::htmlFileExtension,hl==NMHL_All,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trAll()));
endQuickIndexItem(ol);
if (documentedNamespaceMembers[NMHL_Functions]>0)
{ {
startQuickIndexItem(ol, if (!multiPageIndex || g_namespaceIndexLetterUsed[hl][page])
"namespacemembers_func"+Doxygen::htmlFileExtension,hl==NMHL_Functions,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trFunctions()));
endQuickIndexItem(ol);
}
if (documentedNamespaceMembers[NMHL_Variables]>0)
{ {
startQuickIndexItem(ol, QCString fileName = nmhlInfo[hl].fname;
"namespacemembers_vars"+Doxygen::htmlFileExtension,hl==NMHL_Variables,TRUE,first); if (multiPageIndex && !first)
ol.writeString(fixSpaces(theTranslator->trVariables()));
endQuickIndexItem(ol);
}
if (documentedNamespaceMembers[NMHL_Typedefs]>0)
{ {
startQuickIndexItem(ol, fileName+=QCString().sprintf("_0x%02x",page);
"namespacemembers_type"+Doxygen::htmlFileExtension,hl==NMHL_Typedefs,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trTypedefs()));
endQuickIndexItem(ol);
} }
if (documentedNamespaceMembers[NMHL_Enums]>0)
{ startFile(ol,fileName+extension,0,title,HLI_NamespaceMembers);
ol.writeString("<div class=\"qindex\">");
startQuickIndexItem(ol, startQuickIndexItem(ol,
"namespacemembers_enum"+Doxygen::htmlFileExtension,hl==NMHL_Enums,TRUE,first); nmhlInfo[0].fname+Doxygen::htmlFileExtension,hl==NMHL_All,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trEnumerations())); ol.writeString(fixSpaces(nmhlInfo[0].title));
endQuickIndexItem(ol); endQuickIndexItem(ol);
}
if (documentedNamespaceMembers[NMHL_EnumValues]>0) int i;
for (i=1;i<NMHL_Total;i++)
{
if (documentedNamespaceMembers[i]>0)
{ {
startQuickIndexItem(ol, startQuickIndexItem(ol,
"namespacemembers_eval"+Doxygen::htmlFileExtension,hl==NMHL_EnumValues,TRUE,first); nmhlInfo[i].fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
ol.writeString(fixSpaces(theTranslator->trEnumerationValues())); ol.writeString(fixSpaces(nmhlInfo[i].title));
endQuickIndexItem(ol); endQuickIndexItem(ol);
} }
}
ol.writeString("</div>\n"); ol.writeString("</div>\n");
bool quickIndex = documentedNamespaceMembers[hl]>maxItemsBeforeQuickIndex; bool quickIndex = documentedNamespaceMembers[hl]>maxItemsBeforeQuickIndex;
if (quickIndex) if (quickIndex)
{ {
writeQuickMemberIndex(ol,g_namespaceIndexLetterUsed[hl]); writeQuickMemberIndex(ol,g_namespaceIndexLetterUsed[hl],page,
nmhlInfo[hl].fname,multiPageIndex);
} }
ol.newParagraph();
if (hl==NMHL_All) if (hl==NMHL_All)
{ {
ol.parseText(theTranslator->trNamespaceMemberDescription(Config_getBool("EXTRACT_ALL")));
}
ol.newParagraph();
writeNamespaceMemberList(ol,quickIndex,hl,page);
endFile(ol);
}
}
ol.popGeneratorState();
}
void writeNamespaceMemberIndex(OutputList &ol)
{
writeNamespaceMemberIndexFiltered(ol,NMHL_All);
writeNamespaceMemberIndexFiltered(ol,NMHL_Functions);
writeNamespaceMemberIndexFiltered(ol,NMHL_Variables);
writeNamespaceMemberIndexFiltered(ol,NMHL_Typedefs);
writeNamespaceMemberIndexFiltered(ol,NMHL_Enums);
writeNamespaceMemberIndexFiltered(ol,NMHL_EnumValues);
QCString title = theTranslator->trNamespaceMembers();
bool &generateHtml = Config_getBool("GENERATE_HTML") ; bool &generateHtml = Config_getBool("GENERATE_HTML") ;
bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
HtmlHelp *htmlHelp = HtmlHelp::getInstance(); HtmlHelp *htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(FALSE,htmlHelpTitle,"namespacemembers"); htmlHelp->addContentsItem(FALSE,title,"namespacemembers");
} }
if (hasFtvHelp) if (hasFtvHelp)
{ {
FTVHelp *ftvHelp = FTVHelp::getInstance(); FTVHelp *ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(FALSE,0,"namespacemembers",0,ftvHelpTitle); ftvHelp->addContentsItem(FALSE,0,"namespacemembers",0,title);
} }
ol.parseText(theTranslator->trNamespaceMemberDescription(Config_getBool("EXTRACT_ALL")));
}
writeNamespaceMemberList(ol,quickIndex,hl);
endFile(ol);
ol.popGeneratorState();
}
void writeNamespaceMemberIndex(OutputList &ol)
{
QCString ext=Doxygen::htmlFileExtension;
QCString title = theTranslator->trNamespaceMembers();
writeNamespaceMemberIndexFiltered(ol,"namespacemembers"+ext,NMHL_All, title);
title += " - ";
writeNamespaceMemberIndexFiltered(ol,"namespacemembers_func"+ext,NMHL_Functions, title + theTranslator->trFunctions());
writeNamespaceMemberIndexFiltered(ol,"namespacemembers_vars"+ext,NMHL_Variables, title + theTranslator->trVariables());
writeNamespaceMemberIndexFiltered(ol,"namespacemembers_type"+ext,NMHL_Typedefs, title + theTranslator->trTypedefs());
writeNamespaceMemberIndexFiltered(ol,"namespacemembers_enum"+ext,NMHL_Enums, title + theTranslator->trEnumerations());
writeNamespaceMemberIndexFiltered(ol,"namespacemembers_eval"+ext,NMHL_EnumValues, title + theTranslator->trEnumerationValues());
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -97,9 +97,9 @@ enum ClassMemberHighlight ...@@ -97,9 +97,9 @@ enum ClassMemberHighlight
CMHL_Typedefs, CMHL_Typedefs,
CMHL_Enums, CMHL_Enums,
CMHL_EnumValues, CMHL_EnumValues,
CMHL_Related,
CMHL_Properties, CMHL_Properties,
CMHL_Events, CMHL_Events,
CMHL_Related,
CMHL_Total = CMHL_Events+1 CMHL_Total = CMHL_Events+1
}; };
......
...@@ -34,7 +34,8 @@ class LatexGenerator : public OutputGenerator ...@@ -34,7 +34,8 @@ class LatexGenerator : public OutputGenerator
//OutputGenerator *copy(); //OutputGenerator *copy();
//OutputGenerator *clone() { return new LatexGenerator(*this); } //OutputGenerator *clone() { return new LatexGenerator(*this); }
//void append(const OutputGenerator *o); //void append(const OutputGenerator *o);
void enable() { active=TRUE; } void enable()
{ if (genStack->top()) active=*genStack->top(); else active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Latex) active=TRUE; } void enableIf(OutputType o) { if (o==Latex) active=TRUE; }
void disableIf(OutputType o) { if (o==Latex) active=FALSE; } void disableIf(OutputType o) { if (o==Latex) active=FALSE; }
......
...@@ -31,7 +31,8 @@ class ManGenerator : public OutputGenerator ...@@ -31,7 +31,8 @@ class ManGenerator : public OutputGenerator
//OutputGenerator *copy() { return new ManGenerator; } //OutputGenerator *copy() { return new ManGenerator; }
//OutputGenerator *clone() { return new ManGenerator(*this); } //OutputGenerator *clone() { return new ManGenerator(*this); }
//void append(const OutputGenerator *o); //void append(const OutputGenerator *o);
void enable() { active=TRUE; } void enable()
{ if (genStack->top()) active=*genStack->top(); else active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Man) active=TRUE; } void enableIf(OutputType o) { if (o==Man) active=TRUE; }
void disableIf(OutputType o) { if (o==Man) active=FALSE; } void disableIf(OutputType o) { if (o==Man) active=FALSE; }
......
...@@ -232,11 +232,13 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -232,11 +232,13 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
first=FALSE; first=FALSE;
} }
ol.pushGeneratorState(); ol.pushGeneratorState();
bool htmlOn = ol.isEnabled(OutputGenerator::Html);
ol.disable(OutputGenerator::Html); ol.disable(OutputGenerator::Html);
//if (!first) ol.writeString("&nbsp;"); //if (!first) ol.writeString("&nbsp;");
if (!md->isObjCMethod()) ol.docify(")"); // end argument list if (!md->isObjCMethod()) ol.docify(")"); // end argument list
ol.enableAll(); ol.enableAll();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
if (!htmlOn) ol.disable(OutputGenerator::Html);
if (!md->isDefine()) if (!md->isDefine())
{ {
if (first) ol.startParameterName(defArgList->count()<2); if (first) ol.startParameterName(defArgList->count()<2);
...@@ -506,31 +508,48 @@ bool MemberDef::hasExamples() ...@@ -506,31 +508,48 @@ bool MemberDef::hasExamples()
QCString MemberDef::getOutputFileBase() const QCString MemberDef::getOutputFileBase() const
{ {
QCString baseName;
if (m_templateMaster) if (m_templateMaster)
{ {
return m_templateMaster->getOutputFileBase(); return m_templateMaster->getOutputFileBase();
} }
else if (group) else if (group)
{ {
return group->getOutputFileBase(); baseName=group->getOutputFileBase();
} }
else if (classDef) else if (classDef)
{ {
return classDef->getOutputFileBase(); baseName=classDef->getOutputFileBase();
} }
else if (nspace) else if (nspace)
{ {
return nspace->getOutputFileBase(); baseName=nspace->getOutputFileBase();
} }
else if (fileDef) else if (fileDef)
{ {
return fileDef->getOutputFileBase(); baseName=fileDef->getOutputFileBase();
} }
if (baseName.isEmpty())
{
warn(m_defFileName,m_defLine, warn(m_defFileName,m_defLine,
"Warning: Internal inconsistency: member %s does not belong to any" "Warning: Internal inconsistency: member %s does not belong to any"
" container!",name().data() " container!",name().data()
); );
return "dummy"; return "dummy";
}
else if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
if (getEnumScope()) // enum value, which is part of enum's documentation
{
baseName+="_"+getEnumScope()->anchor();
}
else
{
baseName+="_"+anchor();
}
}
return baseName;
} }
QCString MemberDef::getReference() const QCString MemberDef::getReference() const
...@@ -880,7 +899,6 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -880,7 +899,6 @@ void MemberDef::writeDeclaration(OutputList &ol,
// differs from the cname. // differs from the cname.
if (getOuterScope()) osname=getOuterScope()->name(); if (getOuterScope()) osname=getOuterScope()->name();
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP");
if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
...@@ -1235,7 +1253,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1235,7 +1253,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
QCString cname = container->name(); QCString cname = container->name();
QCString cfname = getOutputFileBase(); QCString cfname = getOutputFileBase();
if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"))
{ {
HtmlHelp *htmlHelp = HtmlHelp::getInstance(); HtmlHelp *htmlHelp = HtmlHelp::getInstance();
...@@ -1598,6 +1615,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1598,6 +1615,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.endParamList(); ol.endParamList();
} }
// For enum, we also write the documented enum values
if (isEnumerate()) if (isEnumerate())
{ {
bool first=TRUE; bool first=TRUE;
...@@ -1749,7 +1767,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1749,7 +1767,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// write the list of classes that overwrite this member // write the list of classes that overwrite this member
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.enableAll(); ol.enable(OutputGenerator::RTF);
QCString reimplInLine; QCString reimplInLine;
if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface)) if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface))
...@@ -1799,6 +1817,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1799,6 +1817,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.parseText(reimplInLine.right(reimplInLine.length()-index)); ol.parseText(reimplInLine.right(reimplInLine.length()-index));
} }
} }
// write the list of examples that use this member // write the list of examples that use this member
if (hasExamples()) if (hasExamples())
{ {
...@@ -1808,14 +1827,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1808,14 +1827,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//ol.endDescItem(); //ol.endDescItem();
ol.endSimpleSect(); ol.endSimpleSect();
} }
// write reference to the source // write reference to the source
writeSourceDef(ol,cname); writeSourceDef(ol,cname);
writeSourceRefs(ol,cname); writeSourceRefs(ol,cname);
writeSourceReffedBy(ol,cname); writeSourceReffedBy(ol,cname);
writeInlineCode(ol,cname); writeInlineCode(ol,cname);
ol.endIndent(); // write call graph
if ((m_hasCallGraph || Config_getBool("CALL_GRAPH")) if ((m_hasCallGraph || Config_getBool("CALL_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT") && isFunction() && Config_getBool("HAVE_DOT")
) )
...@@ -1833,6 +1852,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1833,6 +1852,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
} }
ol.endIndent();
// enable LaTeX again // enable LaTeX again
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex); //if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -2058,10 +2079,13 @@ void MemberDef::addListReference(Definition *) ...@@ -2058,10 +2079,13 @@ void MemberDef::addListReference(Definition *)
memLabel=theTranslator->trMember(TRUE,TRUE); memLabel=theTranslator->trMember(TRUE,TRUE);
} }
QCString memName = name(); QCString memName = name();
if (!Config_getBool("HIDE_SCOPE_NAMES"))
{
Definition *pd=getOuterScope(); Definition *pd=getOuterScope();
if (pd && pd!=Doxygen::globalScope) if ((!Config_getBool("HIDE_SCOPE_NAMES") && // there is a scope
pd && pd!=Doxygen::globalScope) // and we can show it
||
((pd=getClassDef()) && !isRelated()) // it's a class so we
// show the scope anyway
)
{ {
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{ {
...@@ -2072,7 +2096,6 @@ void MemberDef::addListReference(Definition *) ...@@ -2072,7 +2096,6 @@ void MemberDef::addListReference(Definition *)
memName.prepend(pd->name()+"::"); memName.prepend(pd->name()+"::");
} }
} }
}
if (xrefListItems()) if (xrefListItems())
{ {
addRefItem(xrefListItems(),memLabel, addRefItem(xrefListItems(),memLabel,
......
...@@ -71,7 +71,7 @@ class MemberDef : public Definition ...@@ -71,7 +71,7 @@ class MemberDef : public Definition
bool related,MemberType t,const ArgumentList *tal, bool related,MemberType t,const ArgumentList *tal,
const ArgumentList *al); const ArgumentList *al);
~MemberDef(); ~MemberDef();
DefType definitionType() { return TypeMember; } DefType definitionType() const { return TypeMember; }
// link id // link id
QCString getOutputFileBase() const; QCString getOutputFileBase() const;
......
...@@ -115,6 +115,12 @@ void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName, ...@@ -115,6 +115,12 @@ void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName,
memberList->writeDocumentation(ol,scopeName,container,0); memberList->writeDocumentation(ol,scopeName,container,0);
} }
void MemberGroup::writeDocumentationPage(OutputList &ol,const char *scopeName,
Definition *container)
{
memberList->writeDocumentationPage(ol,scopeName,container);
}
/*! Add this group as a subsection of the declaration section, instead /*! Add this group as a subsection of the declaration section, instead
* of rendering it in its own section * of rendering it in its own section
*/ */
......
...@@ -50,6 +50,8 @@ class MemberGroup ...@@ -50,6 +50,8 @@ class MemberGroup
void writeDocumentation(OutputList &ol,const char *scopeName, void writeDocumentation(OutputList &ol,const char *scopeName,
Definition *container); Definition *container);
void writeDocumentationPage(OutputList &ol,const char *scopeName,
Definition *container);
QCString documentation() { return doc; } QCString documentation() { return doc; }
bool allMembersInSameSection() { return inSameSection; } bool allMembersInSameSection() { return inSameSection; }
void addToDeclarationSection(); void addToDeclarationSection();
......
...@@ -387,6 +387,47 @@ void MemberList::writeDocumentation(OutputList &ol, ...@@ -387,6 +387,47 @@ void MemberList::writeDocumentation(OutputList &ol,
} }
} }
void MemberList::writeDocumentationPage(OutputList &ol,
const char *scopeName, Definition *container)
{
MemberListIterator mli(*this);
MemberDef *md;
for ( ; (md=mli.current()) ; ++mli)
{
QCString diskName=md->getOutputFileBase();
QCString title=md->qualifiedName();
startFile(ol,diskName,md->name(),title);
container->writeNavigationPath(ol);
ol.writeString("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n"
" <tr>\n"
" <td valign=\"top\">\n");
container->writeQuickMemberLinks(ol,md);
ol.writeString(" </td>\n");
ol.writeString(" <td valign=\"top\">\n");
md->writeDocumentation(this,ol,scopeName,container,m_inGroup);
ol.writeString(" </td>\n");
ol.writeString(" </tr>\n");
ol.writeString("</table>\n");
endFile(ol);
}
if (memberGroupList)
{
//printf("MemberList::writeDocumentation() -- member groups\n");
MemberGroupListIterator mgli(*memberGroupList);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
mg->writeDocumentationPage(ol,scopeName,container);
}
}
}
void MemberList::addMemberGroup(MemberGroup *mg) void MemberList::addMemberGroup(MemberGroup *mg)
{ {
if (memberGroupList==0) if (memberGroupList==0)
......
...@@ -54,6 +54,8 @@ class MemberList : public QList<MemberDef> ...@@ -54,6 +54,8 @@ class MemberList : public QList<MemberDef>
const char *title,const char *subtitle); const char *title,const char *subtitle);
void writeDocumentation(OutputList &ol,const char *scopeName, void writeDocumentation(OutputList &ol,const char *scopeName,
Definition *container,const char *title); Definition *container,const char *title);
void writeDocumentationPage(OutputList &ol,
const char *scopeName, Definition *container);
void addMemberGroup(MemberGroup *mg); void addMemberGroup(MemberGroup *mg);
void setInGroup(bool group) { m_inGroup=group; } void setInGroup(bool group) { m_inGroup=group; }
void addListReferences(Definition *def); void addListReferences(Definition *def);
......
...@@ -360,6 +360,39 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -360,6 +360,39 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
writeDetailedDocumentation(ol); writeDetailedDocumentation(ol);
} }
writeMemberDocumentation(ol);
// write Author section (Man only)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
}
ol.popGeneratorState();
endFile(ol);
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
allMemberList.sort();
writeMemberPages(ol);
}
}
void NamespaceDef::writeMemberDocumentation(OutputList &ol)
{
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
ol.disable(OutputGenerator::Html);
}
docDefineMembers.writeDocumentation(ol,name(),this, docDefineMembers.writeDocumentation(ol,name(),this,
theTranslator->trDefineDocumentation()); theTranslator->trDefineDocumentation());
...@@ -378,22 +411,61 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -378,22 +411,61 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
docVarMembers.writeDocumentation(ol,name(),this, docVarMembers.writeDocumentation(ol,name(),this,
theTranslator->trVariableDocumentation()); theTranslator->trVariableDocumentation());
// write Author section (Man only) if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
ol.enable(OutputGenerator::Html);
}
}
void NamespaceDef::writeMemberPages(OutputList &ol)
{
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Html);
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) docDefineMembers.writeDocumentationPage(ol,name(),this);
docProtoMembers.writeDocumentationPage(ol,name(),this);
docTypedefMembers.writeDocumentationPage(ol,name(),this);
docEnumMembers.writeDocumentationPage(ol,name(),this);
docFuncMembers.writeDocumentationPage(ol,name(),this);
docVarMembers.writeDocumentationPage(ol,name(),this);
ol.popGeneratorState();
}
void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
MemberListIterator mli(allMemberList);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{ {
writeDocAnchorsToTagFile(); if (md->getNamespaceDef()==this && md->isLinkable())
Doxygen::tagFile << " </compound>" << endl; {
ol.writeString(" <tr><td class=\"navtab\">");
if (md->isLinkableInProject())
{
if (md==currentMd) // selected item => highlight
{
ol.writeString("<a class=\"qindexHL\" ");
}
else
{
ol.writeString("<a class=\"qindex\" ");
}
ol.writeString("href=\"");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
ol.writeString(md->localName());
ol.writeString("</a>");
}
ol.writeString("</td></tr>\n");
}
} }
ol.popGeneratorState(); ol.writeString(" </table>\n");
endFile(ol); ol.writeString(" </div>\n");
} }
int NamespaceDef::countMembers() int NamespaceDef::countMembers()
......
...@@ -41,12 +41,15 @@ class NamespaceDef : public Definition ...@@ -41,12 +41,15 @@ class NamespaceDef : public Definition
const char *name,const char *ref=0, const char *name,const char *ref=0,
const char *refFile=0); const char *refFile=0);
~NamespaceDef(); ~NamespaceDef();
DefType definitionType() { return TypeNamespace; } DefType definitionType() const { return TypeNamespace; }
QCString getOutputFileBase() const; QCString getOutputFileBase() const;
void insertUsedFile(const char *fname); void insertUsedFile(const char *fname);
void writeDetailedDocumentation(OutputList &ol); void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeMemberDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
void insertClass(ClassDef *cd); void insertClass(ClassDef *cd);
void insertNamespace(NamespaceDef *nd); void insertNamespace(NamespaceDef *nd);
......
...@@ -372,11 +372,11 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -372,11 +372,11 @@ class OutputGenerator : public BaseOutputDocInterface
QFile *file; QFile *file;
QCString dir; QCString dir;
bool active; bool active;
QStack<bool> *genStack;
private: private:
OutputGenerator(const OutputGenerator &o); OutputGenerator(const OutputGenerator &o);
OutputGenerator &operator=(const OutputGenerator &o); OutputGenerator &operator=(const OutputGenerator &o);
QStack<bool> *genStack;
}; };
/*! \brief Interface used for generating documentation. /*! \brief Interface used for generating documentation.
......
...@@ -23,7 +23,7 @@ class PageDef : public Definition ...@@ -23,7 +23,7 @@ class PageDef : public Definition
public: public:
PageDef(const char *f,int l,const char *n,const char *d,const char *t); PageDef(const char *f,int l,const char *n,const char *d,const char *t);
~PageDef(); ~PageDef();
DefType definitionType() { return TypePage; } DefType definitionType() const { return TypePage; }
bool isLinkableInProject() const bool isLinkableInProject() const
{ {
return hasDocumentation() && !isReference(); return hasDocumentation() && !isReference();
......
...@@ -34,7 +34,8 @@ class RTFGenerator : public OutputGenerator ...@@ -34,7 +34,8 @@ class RTFGenerator : public OutputGenerator
//OutputGenerator *copy(); //OutputGenerator *copy();
//OutputGenerator *clone() { return new RTFGenerator(*this); } //OutputGenerator *clone() { return new RTFGenerator(*this); }
//void append(const OutputGenerator *o); //void append(const OutputGenerator *o);
void enable() { active=TRUE; } void enable()
{ if (genStack->top()) active=*genStack->top(); else active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==RTF) active=TRUE; } void enableIf(OutputType o) { if (o==RTF) active=TRUE; }
void disableIf(OutputType o) { if (o==RTF) active=FALSE; } void disableIf(OutputType o) { if (o==RTF) active=FALSE; }
......
...@@ -877,6 +877,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -877,6 +877,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
%x SectionLabel %x SectionLabel
%x SectionTitle %x SectionTitle
%x CopyArgString %x CopyArgString
%x CopyArgPHPString
%x CopyArgRound %x CopyArgRound
%x CopyArgSharp %x CopyArgSharp
%x CopyArgComment %x CopyArgComment
...@@ -2563,8 +2564,9 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -2563,8 +2564,9 @@ IDLATTR ("["[^\]]*"]"){BN}*
*/ */
<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/]* { current->program += yytext ; } <ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/]* { current->program += yytext ; }
<ReadBody,ReadNSBody,ReadBodyIntf>"//".* { current->program += yytext ; } <ReadBody,ReadNSBody,ReadBodyIntf>"//".* { current->program += yytext ; }
<ReadBody,ReadNSBody,ReadBodyIntf>"#".* { if (! insidePHP) <ReadBody,ReadNSBody,ReadBodyIntf>"#".* { if (!insidePHP)
REJECT; REJECT;
// append PHP comment.
current->program += yytext ; current->program += yytext ;
} }
<ReadBody,ReadNSBody,ReadBodyIntf>@\" { current->program += yytext ; <ReadBody,ReadNSBody,ReadBodyIntf>@\" { current->program += yytext ;
...@@ -3005,7 +3007,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3005,7 +3007,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
<ReadFuncArgType>[^ \/\r\t\n\)\(\"\'#]+ { *copyArgString+=yytext; <ReadFuncArgType>[^ \/\r\t\n\)\(\"\'#]+ { *copyArgString+=yytext;
fullArgString+=yytext; fullArgString+=yytext;
} }
<CopyArgString>[^\n\\\"\']+ { *copyArgString+=yytext; <CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *copyArgString+=yytext;
fullArgString+=yytext; fullArgString+=yytext;
} }
<CopyArgRound>[^\/\n\)\(\"\']+ { <CopyArgRound>[^\/\n\)\(\"\']+ {
...@@ -3080,17 +3082,19 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3080,17 +3082,19 @@ IDLATTR ("["[^\]]*"]"){BN}*
lastCContext = YY_START; lastCContext = YY_START;
BEGIN( SkipCxxComment ); BEGIN( SkipCxxComment );
} }
<ReadFuncArgType,ReadTempArgs>"'#" { if (! insidePHP) /*
<ReadFuncArgType,ReadTempArgs>"'#" { if (insidePHP)
REJECT; REJECT;
*copyArgString+=yytext; *copyArgString+=yytext;
fullArgString+=yytext; fullArgString+=yytext;
} }
<ReadFuncArgType,ReadTempArgs>"#" { <ReadFuncArgType,ReadTempArgs>"#" {
if (! insidePHP) if (!insidePHP)
REJECT; REJECT;
lastCContext = YY_START; lastCContext = YY_START;
BEGIN( SkipCxxComment ); BEGIN( SkipCxxComment );
} }
*/
/* `)' followed by a special comment */ /* `)' followed by a special comment */
<ReadFuncArgType>")"{BN}*("/*"[*!]|"//"[/!])"<" { <ReadFuncArgType>")"{BN}*("/*"[*!]|"//"[/!])"<" {
lineCount(); lineCount();
...@@ -3191,7 +3195,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3191,7 +3195,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
//printf("end of argSharpCount\n"); //printf("end of argSharpCount\n");
} }
} }
<CopyArgString>\\. { <CopyArgString,CopyArgPHPString>\\. {
*copyArgString+=yytext; *copyArgString+=yytext;
fullArgString+=yytext; fullArgString+=yytext;
} }
...@@ -3200,6 +3204,11 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3200,6 +3204,11 @@ IDLATTR ("["[^\]]*"]"){BN}*
fullArgString+=*yytext; fullArgString+=*yytext;
BEGIN( lastCopyArgStringContext ); BEGIN( lastCopyArgStringContext );
} }
<CopyArgPHPString>\' {
*copyArgString+=*yytext;
fullArgString+=*yytext;
BEGIN( lastCopyArgStringContext );
}
<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>{CHARLIT} { <ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>{CHARLIT} {
if (insidePHP) if (insidePHP)
{ {
...@@ -3211,12 +3220,24 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3211,12 +3220,24 @@ IDLATTR ("["[^\]]*"]"){BN}*
fullArgString+=yytext; fullArgString+=yytext;
} }
} }
<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgRound,CopyArgSharp>\n { <ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>\' {
if (insidePHP)
{
lastCopyArgStringContext=YY_START;
BEGIN(CopyArgPHPString);
}
else
{
*copyArgString+=yytext;
fullArgString+=yytext;
}
}
<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSharp>\n {
yyLineNr++; yyLineNr++;
*copyArgString+=*yytext; *copyArgString+=*yytext;
fullArgString+=*yytext; fullArgString+=*yytext;
} }
<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgRound,CopyArgSharp>. { <ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSharp>. {
*copyArgString+=*yytext; *copyArgString+=*yytext;
fullArgString+=*yytext; fullArgString+=*yytext;
} }
...@@ -3665,19 +3686,22 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3665,19 +3686,22 @@ IDLATTR ("["[^\]]*"]"){BN}*
BEGIN( FindMembers ); BEGIN( FindMembers );
} }
<SkipInits,SkipCurly,SkipCurlyCpp>"#" { <SkipInits,SkipCurly,SkipCurlyCpp>"#" {
if (! insidePHP) if (!insidePHP)
REJECT; REJECT;
//addToBody(yytext); //addToBody(yytext);
lastCContext = YY_START; lastCContext = YY_START;
BEGIN(SkipCxxComment); BEGIN(SkipCxxComment);
} }
<SkipInits,SkipCurly,SkipCurlyCpp>@\" { <SkipInits,SkipCurly,SkipCurlyCpp>@\" {
if (! insideCS) REJECT; if (!insideCS) REJECT;
// C# verbatim string // C# verbatim string
lastSkipVerbStringContext=YY_START; lastSkipVerbStringContext=YY_START;
pSkipVerbString=&current->initializer; pSkipVerbString=&current->initializer;
BEGIN(SkipVerbString); BEGIN(SkipVerbString);
} }
<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
if (insidePHP) REJECT;
}
<SkipInits,SkipCurly,SkipCurlyCpp>\' { <SkipInits,SkipCurly,SkipCurlyCpp>\' {
if (insidePHP) if (insidePHP)
{ {
...@@ -3685,9 +3709,6 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3685,9 +3709,6 @@ IDLATTR ("["[^\]]*"]"){BN}*
BEGIN(SkipPHPString); BEGIN(SkipPHPString);
} }
} }
<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
if (insidePHP) REJECT;
}
<SkipInits,SkipCurly,SkipCurlyCpp>. { } <SkipInits,SkipCurly,SkipCurlyCpp>. { }
<SkipString,SkipPHPString>\\. { } <SkipString,SkipPHPString>\\. { }
<SkipString>\" { <SkipString>\" {
...@@ -3757,6 +3778,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3757,6 +3778,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
} }
<CompoundName>{SCOPENAME}{BN}*";" { // forward declaration <CompoundName>{SCOPENAME}{BN}*";" { // forward declaration
unput(';'); unput(';');
current->reset();
if (isTypedef) // typedef of a class, put typedef keyword back if (isTypedef) // typedef of a class, put typedef keyword back
{ {
current->type.prepend("typedef"); current->type.prepend("typedef");
...@@ -6113,7 +6135,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -6113,7 +6135,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
} }
} }
<*>"#" { <*>"#" {
if (! insidePHP) if (!insidePHP)
REJECT; REJECT;
lastCContext = YY_START ; lastCContext = YY_START ;
BEGIN( SkipCxxComment ) ; BEGIN( SkipCxxComment ) ;
......
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
// 2004/02/27 - Text inside the trCallGraph() corrected. // 2004/02/27 - Text inside the trCallGraph() corrected.
// 2004/06/16 - The new method "since 1.3.8" implemented. // 2004/06/16 - The new method "since 1.3.8" implemented.
// 2004/09/14 - The new methods "since 1.3.9" implemented. // 2004/09/14 - The new methods "since 1.3.9" implemented.
// 2005/02/11 - The "never used" methods removed.
// Todo // Todo
// ---- // ----
...@@ -301,10 +302,6 @@ class TranslatorCzech : public Translator ...@@ -301,10 +302,6 @@ class TranslatorCzech : public Translator
virtual QCString trFileList() virtual QCString trFileList()
{ return decode("Seznam souborù"); } { return decode("Seznam souborù"); }
/*! This is put above each page as a link to the list of all verbatim headers */
virtual QCString trHeaderFiles()
{ return decode("Seznam hlavièkových souborù"); }
/*! This is put above each page as a link to all members of compounds. */ /*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers() virtual QCString trCompoundMembers()
{ {
...@@ -447,11 +444,6 @@ class TranslatorCzech : public Translator ...@@ -447,11 +444,6 @@ class TranslatorCzech : public Translator
return decode(result); return decode(result);
} }
/*! This is an introduction to the page with the list of all header files. */
virtual QCString trHeaderFilesDescription()
{ return decode("Zde naleznete hlavièkové soubory, které tvoøí "
"aplikaèní programátorské rozhraní (API):"); }
/*! This is an introduction to the page with the list of all examples */ /*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription() virtual QCString trExamplesDescription()
{ return decode("Zde naleznete seznam všech pøíkladù:"); } { return decode("Zde naleznete seznam všech pøíkladù:"); }
...@@ -464,12 +456,6 @@ class TranslatorCzech : public Translator ...@@ -464,12 +456,6 @@ class TranslatorCzech : public Translator
virtual QCString trModulesDescription() virtual QCString trModulesDescription()
{ return decode("Zde naleznete seznam všech modulù:"); } { return decode("Zde naleznete seznam všech modulù:"); }
/*! This sentences is used in the annotated class/file lists if no brief
* description is given.
*/
virtual QCString trNoDescriptionAvailable()
{ return decode("Popis není k dispozici"); }
// index titles (the project name is prepended for these) // index titles (the project name is prepended for these)
...@@ -619,12 +605,6 @@ class TranslatorCzech : public Translator ...@@ -619,12 +605,6 @@ class TranslatorCzech : public Translator
virtual QCString trEnumerationTypeDocumentation() virtual QCString trEnumerationTypeDocumentation()
{ return decode("Dokumentace výètových typù"); } { return decode("Dokumentace výètových typù"); }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
{ return decode("Dokumentace výètových hodnot"); }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions * of documentation blocks for functions
*/ */
...@@ -679,19 +659,10 @@ class TranslatorCzech : public Translator ...@@ -679,19 +659,10 @@ class TranslatorCzech : public Translator
virtual QCString trForInternalUseOnly() virtual QCString trForInternalUseOnly()
{ return decode("Pouze pro vnitøní použití."); } { return decode("Pouze pro vnitøní použití."); }
/*! this text is generated when the \\reimp command is used. */
virtual QCString trReimplementedForInternalReasons()
{ return decode("Reimplementováno z interních dùvodù; "
"aplikaèní rozhraní zachováno."); }
/*! this text is generated when the \\warning command is used. */ /*! this text is generated when the \\warning command is used. */
virtual QCString trWarning() virtual QCString trWarning()
{ return decode("Pozor"); } { return decode("Pozor"); }
/*! this text is generated when the \\bug command is used. */
virtual QCString trBugsAndLimitations()
{ return decode("Chyby a omezení"); }
/*! this text is generated when the \\version command is used. */ /*! this text is generated when the \\version command is used. */
virtual QCString trVersion() virtual QCString trVersion()
{ return decode("Verze"); } { return decode("Verze"); }
...@@ -979,10 +950,6 @@ class TranslatorCzech : public Translator ...@@ -979,10 +950,6 @@ class TranslatorCzech : public Translator
// new since 0.49-991003 // new since 0.49-991003
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return decode("Zdroje");
}
virtual QCString trDefinedAtLineInSourceFile() virtual QCString trDefinedAtLineInSourceFile()
{ {
return decode("Definice je uvedena na øádku @0 v souboru @1."); return decode("Definice je uvedena na øádku @0 v souboru @1.");
...@@ -1304,11 +1271,6 @@ class TranslatorCzech : public Translator ...@@ -1304,11 +1271,6 @@ class TranslatorCzech : public Translator
// new since 1.2.4 // new since 1.2.4
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/*! Used for Java interfaces in the summary section of Java packages */
virtual QCString trInterfaces()
{
return decode("Rozhraní");
}
/*! Used for Java classes in the summary section of Java packages */ /*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses() virtual QCString trClasses()
{ {
...@@ -1335,11 +1297,6 @@ class TranslatorCzech : public Translator ...@@ -1335,11 +1297,6 @@ class TranslatorCzech : public Translator
{ {
return decode("Balíky"); return decode("Balíky");
} }
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return decode("Dokumentace balíku");
}
/*! Text shown before a multi-line define */ /*! Text shown before a multi-line define */
virtual QCString trDefineValue() virtual QCString trDefineValue()
{ {
...@@ -1450,17 +1407,6 @@ class TranslatorCzech : public Translator ...@@ -1450,17 +1407,6 @@ class TranslatorCzech : public Translator
return decode(result); return decode(result);
} }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trField(bool first_capital, bool singular)
{
QCString result((first_capital ? "Položk" : "položk"));
result+=(singular ? "a" : "y");
return decode(result);
}
/*! ??? Jak to prelozit? Bylo by dobre, kdyby se ozval nekdo, /*! ??? Jak to prelozit? Bylo by dobre, kdyby se ozval nekdo,
* kdo to pouziva. * kdo to pouziva.
*/ */
......
...@@ -825,7 +825,19 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t, ...@@ -825,7 +825,19 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
MemberList *ml,const char *kind,const char *header=0, MemberList *ml,const char *kind,const char *header=0,
const char *documentation=0) const char *documentation=0)
{ {
if (ml->count()==0) return; // empty list MemberListIterator mli(*ml);
MemberDef *md;
int count=0;
for (mli.toFirst();(md=mli.current());++mli)
{
// namespace members are also inserted in the file scope, but
// to prevent this duplication in the XML output, we filter those here.
if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
{
count++;
}
}
if (count==0) return; // empty list
t << " <sectiondef kind=\"" << kind << "\">" << endl; t << " <sectiondef kind=\"" << kind << "\">" << endl;
if (header) if (header)
...@@ -838,12 +850,15 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t, ...@@ -838,12 +850,15 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation); writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
t << "</description>" << endl; t << "</description>" << endl;
} }
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli) for (mli.toFirst();(md=mli.current());++mli)
{
// namespace members are also inserted in the file scope, but
// to prevent this duplication in the XML output, we filter those here.
if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
{ {
generateXMLForMember(md,ti,t,d); generateXMLForMember(md,ti,t,d);
} }
}
t << " </sectiondef>" << endl; t << " </sectiondef>" << endl;
} }
......
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