Commit 47b04448 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.4.1-20050227

parent 2ed43d4c
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();
......
This diff is collapsed.
...@@ -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; }
......
This diff is collapsed.
...@@ -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