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
(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.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
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.
\refitem cfg_rtf_stylesheet_file RTF_STYLESHEET_FILE
\refitem cfg_search_includes SEARCH_INCLUDES
\refitem cfg_searchengine SEARCHENGINE
\refitem cfg_separate_member_pages SEPARATE_MEMBER_PAGES
\refitem cfg_short_names SHORT_NAMES
\refitem cfg_show_dirs SHOW_DIRECTORIES
\refitem cfg_show_include_files SHOW_INCLUDE_FILES
......@@ -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
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
<dt>\c TAB_SIZE <dd>
\addindex TAB_SIZE
......
......@@ -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
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):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
......
(1.4.1-20050129)
(1.4.1-20050227)
Doxygen supports the following 30 languages (sorted alphabetically):
......@@ -20,7 +20,7 @@ still may be some details listed even for them:
TranslatorBrazilian -- Remove the obsolete methods (never used).
TranslatorChinese -- 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).
TranslatorEnglish -- Remove the obsolete methods (never used).
TranslatorFrench -- Remove the obsolete methods (never used).
......@@ -226,25 +226,6 @@ TranslatorCroatian (Translator)
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
----------------
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.4.1_20050210
Version: 1.4.1_20050227
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -1340,6 +1340,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeDetailedDescription(ol,pageType,exampleFlag);
}
///////////////////////////////////////////////////////////////////////////
//// Member declarations + brief descriptions
///////////////////////////////////////////////////////////////////////////
// write member groups
ol.startMemberSections();
......@@ -1428,7 +1433,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
// nested classes
m_innerClasses->writeDeclaration(ol,0,0,TRUE);
ol.endMemberSections();
// write detailed description
......@@ -1436,6 +1441,54 @@ void ClassDef::writeDocumentation(OutputList &ol)
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,
theTranslator->trMemberTypedefDocumentation());
......@@ -1461,36 +1514,77 @@ void ClassDef::writeDocumentation(OutputList &ol)
eventMembers.writeDocumentation(ol,name(),this,
theTranslator->trEventDocumentation());
ol.startTextBlock();
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
ol.enable(OutputGenerator::Html);
}
}
// write the list of used files (not for man pages)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
void ClassDef::writeMemberPages(OutputList &ol)
{
///////////////////////////////////////////////////////////////////////////
//// Member definitions on separate pages
///////////////////////////////////////////////////////////////////////////
showUsedFiles(ol);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
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.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();
Doxygen::tagFile << " </compound>" << endl;
MemberNameInfoIterator mnii(*mni);
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)
{
// write inner classes after the parent, so the tag files contain
......
......@@ -67,7 +67,7 @@ class ClassDef : public Definition
Category=Entry::CATEGORY_SEC,
Exception=Entry::EXCEPTION_SEC
};
DefType definitionType() { return TypeClass; }
DefType definitionType() const { return TypeClass; }
QCString getOutputFileBase() const;
QCString getInstanceOutputFileBase() const;
QCString getFileBase() const;
......@@ -104,9 +104,12 @@ class ClassDef : public Definition
void writeDocumentation(OutputList &ol);
void writeDocumentationForInnerClasses(OutputList &ol);
void writeMemberDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
void writeMemberList(OutputList &ol);
void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup);
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
* this compound was found.
......
......@@ -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,
bool typeOnly=FALSE)
{
......@@ -780,7 +859,14 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{
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
{
......@@ -825,8 +911,8 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{
if (md==0) // not found as a typedef
{
//printf("setCallContextForVar(%s)\n",clName);
md = setCallContextForVar(clName);
//printf("setCallContextForVar(%s) md=%p g_currentDefinition=%p\n",clName,md,g_currentDefinition);
if (md && g_currentDefinition)
{
//fprintf(stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
......@@ -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)
{
if (mcd)
......@@ -2404,8 +2411,11 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
}
}
<MemberCall2,FuncCall>{OPERATOR} { // operator
if (strcmp(yytext,"*") && strcmp(yytext,"&")) // typically a pointer or reference
{
g_parmType.resize(0);g_parmName.resize(0);
}
g_code->codify(yytext);
g_parmType.resize(0);g_parmName.resize(0);
}
<MemberCall,MemberCall2,FuncCall>")" {
g_theVarContext.addVariable(g_parmType,g_parmName);
......
This diff is collapsed.
......@@ -1479,12 +1479,19 @@ void Config::create()
"all members of a group must be documented explicitly.\n",
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(
"TAB_SIZE",
"The TAB_SIZE tag can be used to set the number of spaces in a tab. \n"
"Doxygen uses this value to replace tabs by spaces in code fragments. \n",
1,16,8
);
);
cl = addList(
"ALIASES",
"This tag can be used to specify a number of aliases that acts \n"
......
......@@ -785,7 +785,14 @@ void Definition::writePathFragment(OutputList &ol) const
}
if (isLinkable())
{
ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName);
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);
}
}
else
{
......
......@@ -51,7 +51,7 @@ class Definition
TypeNamespace, TypePackage, TypePage, TypeDir
};
/*! 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 */
Definition(
......@@ -195,6 +195,7 @@ class Definition
void writePathFragment(OutputList &ol) const;
void writeNavigationPath(OutputList &ol) const;
virtual void writeQuickMemberLinks(OutputList &,MemberDef *) const {}
protected:
void setLocalName(const QCString name) { m_localName=name; }
......
......@@ -49,7 +49,7 @@ class DirDef : public Definition
virtual ~DirDef();
// accessors
virtual DefType definitionType() { return TypeDir; }
virtual DefType definitionType() const { return TypeDir; }
virtual QCString getOutputFileBase() const;
virtual bool isLinkableInProject() const;
virtual bool isLinkable() const;
......
......@@ -3457,7 +3457,7 @@ int DocPara::handleXRefItem()
{
m_children.append(ref);
}
else
else
{
delete ref;
}
......
......@@ -557,6 +557,7 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
QString title() const { return m_title; }
DocNode *parent() const { return m_parent; }
QString relPath() const { return m_relPath; }
QString key() const { return m_key; }
void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); }
bool parse();
......
......@@ -369,6 +369,7 @@ static void buildFileList(Entry *root)
{
bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->name,ambig);
//printf("**************** root->name=%s fd=%p\n",root->name.data(),fd);
if (fd && !ambig)
{
if ((!root->doc.isEmpty() && !fd->documentation().isEmpty()) ||
......@@ -383,6 +384,7 @@ static void buildFileList(Entry *root)
}
else
{
//printf("Adding documentation!\n");
// using FALSE in setDocumentation is small hack to make sure a file
// is documented even if a \file command is used without further
// documentation
......@@ -627,30 +629,47 @@ ArgumentList *getTemplateArgumentsFromName(
static void addClassToContext(Entry *root)
{
QCString fullName=removeRedundantWhiteSpace(root->name);
if (fullName.isEmpty())
{
// this should not be called
warn(root->fileName,root->startLine,
"Warning: invalid class name found!"
);
return;
}
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());
// QCString fullName=removeRedundantWhiteSpace(root->name);
//
// if (fullName.isEmpty())
// {
// // this should not be called
// warn(root->fileName,root->startLine,
// "Warning: invalid class name found!"
// );
// return;
// }
// 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());
bool ambig;
ClassDef *cd;
//printf("findFileDef(%s)\n",root->fileName.data());
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
if ((cd=getClass(fullName)))
NamespaceDef *nd = 0;
FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// see if the using statement was found inside a namespace or inside
// the global file scope.
if (root->parent->section == Entry::NAMESPACE_SEC)
{
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)
{
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)
//{
// //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
......@@ -693,7 +712,7 @@ static void addClassToContext(Entry *root)
cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
}
cd->addSectionsToDefinition(root->anchors);
cd->setName(fullName); // change name to match docs
//cd->setName(fullName); // change name to match docs
}
cd->setFileDef(fd);
if (cd->hasDocumentation())
......@@ -719,7 +738,7 @@ static void addClassToContext(Entry *root)
// this happens if a template class declared with @class is found
// before the actual definition.
ArgumentList *tArgList =
getTemplateArgumentsFromName(fullName,root->tArgLists);
getTemplateArgumentsFromName(cd->name(),root->tArgLists);
cd->setTemplateArguments(tArgList);
}
}
......@@ -1703,7 +1722,7 @@ static MemberDef *addVariableToFile(
*/
static int findFunctionPtr(const QCString &type,int *pLength=0)
{
static const QRegExp re("([^)]*\\*");
static const QRegExp re("([^)]*)");
int i=-1,l;
if (!type.isEmpty() && // return type is non-empty
(i=re.match(type,0,&l))!=-1 && // contains a (*
......@@ -2424,27 +2443,52 @@ static void buildFunctionList(Entry *root)
md->addSectionsToDefinition(root->anchors);
md->setMemberSpecifiers(root->memSpec);
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;
if (!root->type.isEmpty())
{
if (root->argList)
{
def=root->type+" "+name;
def=root->type+" "+scope+name;
}
else
{
def=root->type+" "+name+root->args;
def=root->type+" "+scope+name+root->args;
}
}
else
{
if (root->argList)
{
def=name.copy();
def=scope+name.copy();
}
else
{
def=name+root->args;
def=scope+name+root->args;
}
}
Debug::print(Debug::Functions,0,
......@@ -2465,17 +2509,6 @@ static void buildFunctionList(Entry *root)
// 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);
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{
......
......@@ -501,6 +501,38 @@ void FileDef::writeDocumentation(OutputList &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,
theTranslator->trDefineDocumentation());
......@@ -518,22 +550,62 @@ void FileDef::writeDocumentation(OutputList &ol)
docVarMembers.writeDocumentation(ol,name(),this,
theTranslator->trVariableDocumentation());
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
ol.enable(OutputGenerator::Html);
}
}
void FileDef::writeMemberPages(OutputList &ol)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
// 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();
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();
}
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
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();
Doxygen::tagFile << " </compound>" << endl;
if (md->getFileDef()==this && md->getNamespaceDef()==0 && 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");
}
/*! Write a source listing of this file to the output */
......
......@@ -69,7 +69,7 @@ class FileDef : public Definition
FileDef(const char *p,const char *n,const char *ref=0,const char *dn=0);
~FileDef();
DefType definitionType() { return TypeFile; }
DefType definitionType() const { return TypeFile; }
/*! Returns the unique file name (this may include part of the path). */
QCString name() const
......@@ -126,6 +126,10 @@ class FileDef : public Definition
void writeDetailedDocumentation(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 parseSource();
friend void generatedFileNames();
......
......@@ -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,
theTranslator->trDefineDocumentation());
......@@ -705,16 +731,65 @@ void GroupDef::writeDocumentation(OutputList &ol)
docVarMembers.writeDocumentation(ol,name(),this,
theTranslator->trVariableDocumentation());
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
if (Config_getBool("SEPARATE_MEMBER_PAGES"))
{
writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
ol.enable(OutputGenerator::Html);
}
}
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();
}
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 ------------------------------------------------------
void addClassToGroups(Entry *root,ClassDef *cd)
......
......@@ -45,7 +45,7 @@ class GroupDef : public Definition
public:
GroupDef(const char *fileName,int line,const char *name,const char *title,const char *refFileName=0);
~GroupDef();
DefType definitionType() { return TypeGroup; }
DefType definitionType() const { return TypeGroup; }
QCString getOutputFileBase() const;
const char *groupTitle() const { return title; }
void setGroupTitle( const char *newtitle );
......@@ -63,6 +63,9 @@ class GroupDef : public Definition
bool containsGroup(const GroupDef *def); // true if def is already a subgroup
void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol);
void writeMemberDocumentation(OutputList &ol);
void writeMemberPages(OutputList &ol);
void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
int countMembers() const;
bool isLinkableInProject() const
{
......
......@@ -78,6 +78,17 @@ static const char *defaultStyleSheet =
" padding: 2px;\n"
" line-height: 140%;\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"
" text-decoration: none;\n"
" font-weight: bold;\n"
......@@ -495,34 +506,6 @@ void HtmlGenerator::startFile(const char *name,const char *,
<< 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,
const QCString relPath)
......
......@@ -36,7 +36,8 @@ class HtmlGenerator : public OutputGenerator
static void writeHeaderFile(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 enableIf(OutputType o) { if (o==Html) active=TRUE; }
void disableIf(OutputType o) { if (o==Html) active=FALSE; }
......
This diff is collapsed.
......@@ -97,9 +97,9 @@ enum ClassMemberHighlight
CMHL_Typedefs,
CMHL_Enums,
CMHL_EnumValues,
CMHL_Related,
CMHL_Properties,
CMHL_Events,
CMHL_Related,
CMHL_Total = CMHL_Events+1
};
......
......@@ -34,7 +34,8 @@ class LatexGenerator : public OutputGenerator
//OutputGenerator *copy();
//OutputGenerator *clone() { return new LatexGenerator(*this); }
//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 enableIf(OutputType o) { if (o==Latex) active=TRUE; }
void disableIf(OutputType o) { if (o==Latex) active=FALSE; }
......
......@@ -31,7 +31,8 @@ class ManGenerator : public OutputGenerator
//OutputGenerator *copy() { return new ManGenerator; }
//OutputGenerator *clone() { return new ManGenerator(*this); }
//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 enableIf(OutputType o) { if (o==Man) active=TRUE; }
void disableIf(OutputType o) { if (o==Man) active=FALSE; }
......
......@@ -232,11 +232,13 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
first=FALSE;
}
ol.pushGeneratorState();
bool htmlOn = ol.isEnabled(OutputGenerator::Html);
ol.disable(OutputGenerator::Html);
//if (!first) ol.writeString("&nbsp;");
if (!md->isObjCMethod()) ol.docify(")"); // end argument list
ol.enableAll();
ol.disableAllBut(OutputGenerator::Html);
if (!htmlOn) ol.disable(OutputGenerator::Html);
if (!md->isDefine())
{
if (first) ol.startParameterName(defArgList->count()<2);
......@@ -506,31 +508,48 @@ bool MemberDef::hasExamples()
QCString MemberDef::getOutputFileBase() const
{
QCString baseName;
if (m_templateMaster)
{
return m_templateMaster->getOutputFileBase();
}
else if (group)
{
return group->getOutputFileBase();
baseName=group->getOutputFileBase();
}
else if (classDef)
{
return classDef->getOutputFileBase();
baseName=classDef->getOutputFileBase();
}
else if (nspace)
{
return nspace->getOutputFileBase();
baseName=nspace->getOutputFileBase();
}
else if (fileDef)
{
return fileDef->getOutputFileBase();
baseName=fileDef->getOutputFileBase();
}
warn(m_defFileName,m_defLine,
if (baseName.isEmpty())
{
warn(m_defFileName,m_defLine,
"Warning: Internal inconsistency: member %s does not belong to any"
" 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
......@@ -880,7 +899,6 @@ void MemberDef::writeDeclaration(OutputList &ol,
// differs from the cname.
if (getOuterScope()) osname=getOuterScope()->name();
HtmlHelp *htmlHelp=0;
bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP");
if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
......@@ -1235,7 +1253,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
QCString cname = container->name();
QCString cfname = getOutputFileBase();
if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"))
{
HtmlHelp *htmlHelp = HtmlHelp::getInstance();
......@@ -1598,6 +1615,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.endParamList();
}
// For enum, we also write the documented enum values
if (isEnumerate())
{
bool first=TRUE;
......@@ -1749,7 +1767,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// write the list of classes that overwrite this member
ol.disable(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
ol.enable(OutputGenerator::RTF);
QCString reimplInLine;
if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface))
......@@ -1799,6 +1817,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.parseText(reimplInLine.right(reimplInLine.length()-index));
}
}
// write the list of examples that use this member
if (hasExamples())
{
......@@ -1808,14 +1827,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//ol.endDescItem();
ol.endSimpleSect();
}
// write reference to the source
writeSourceDef(ol,cname);
writeSourceRefs(ol,cname);
writeSourceReffedBy(ol,cname);
writeInlineCode(ol,cname);
ol.endIndent();
// write call graph
if ((m_hasCallGraph || Config_getBool("CALL_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT")
)
......@@ -1833,6 +1852,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
}
ol.endIndent();
// enable LaTeX again
//if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
......@@ -2058,19 +2079,21 @@ void MemberDef::addListReference(Definition *)
memLabel=theTranslator->trMember(TRUE,TRUE);
}
QCString memName = name();
if (!Config_getBool("HIDE_SCOPE_NAMES"))
Definition *pd=getOuterScope();
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
)
{
Definition *pd=getOuterScope();
if (pd && pd!=Doxygen::globalScope)
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
memName.prepend(pd->name()+".");
}
else
{
memName.prepend(pd->name()+"::");
}
memName.prepend(pd->name()+".");
}
else
{
memName.prepend(pd->name()+"::");
}
}
if (xrefListItems())
......
......@@ -71,7 +71,7 @@ class MemberDef : public Definition
bool related,MemberType t,const ArgumentList *tal,
const ArgumentList *al);
~MemberDef();
DefType definitionType() { return TypeMember; }
DefType definitionType() const { return TypeMember; }
// link id
QCString getOutputFileBase() const;
......
......@@ -115,6 +115,12 @@ void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName,
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
* of rendering it in its own section
*/
......
......@@ -50,6 +50,8 @@ class MemberGroup
void writeDocumentation(OutputList &ol,const char *scopeName,
Definition *container);
void writeDocumentationPage(OutputList &ol,const char *scopeName,
Definition *container);
QCString documentation() { return doc; }
bool allMembersInSameSection() { return inSameSection; }
void addToDeclarationSection();
......
......@@ -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)
{
if (memberGroupList==0)
......
......@@ -54,6 +54,8 @@ class MemberList : public QList<MemberDef>
const char *title,const char *subtitle);
void writeDocumentation(OutputList &ol,const char *scopeName,
Definition *container,const char *title);
void writeDocumentationPage(OutputList &ol,
const char *scopeName, Definition *container);
void addMemberGroup(MemberGroup *mg);
void setInGroup(bool group) { m_inGroup=group; }
void addListReferences(Definition *def);
......
......@@ -360,6 +360,39 @@ void NamespaceDef::writeDocumentation(OutputList &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,
theTranslator->trDefineDocumentation());
......@@ -378,22 +411,61 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
docVarMembers.writeDocumentation(ol,name(),this,
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.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.disableAllBut(OutputGenerator::Html);
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();
Doxygen::tagFile << " </compound>" << endl;
if (md->getNamespaceDef()==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.popGeneratorState();
endFile(ol);
ol.writeString(" </table>\n");
ol.writeString(" </div>\n");
}
int NamespaceDef::countMembers()
......
......@@ -41,12 +41,15 @@ class NamespaceDef : public Definition
const char *name,const char *ref=0,
const char *refFile=0);
~NamespaceDef();
DefType definitionType() { return TypeNamespace; }
DefType definitionType() const { return TypeNamespace; }
QCString getOutputFileBase() const;
void insertUsedFile(const char *fname);
void writeDetailedDocumentation(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 insertNamespace(NamespaceDef *nd);
......
......@@ -372,11 +372,11 @@ class OutputGenerator : public BaseOutputDocInterface
QFile *file;
QCString dir;
bool active;
QStack<bool> *genStack;
private:
OutputGenerator(const OutputGenerator &o);
OutputGenerator &operator=(const OutputGenerator &o);
QStack<bool> *genStack;
};
/*! \brief Interface used for generating documentation.
......
......@@ -23,7 +23,7 @@ class PageDef : public Definition
public:
PageDef(const char *f,int l,const char *n,const char *d,const char *t);
~PageDef();
DefType definitionType() { return TypePage; }
DefType definitionType() const { return TypePage; }
bool isLinkableInProject() const
{
return hasDocumentation() && !isReference();
......
......@@ -34,7 +34,8 @@ class RTFGenerator : public OutputGenerator
//OutputGenerator *copy();
//OutputGenerator *clone() { return new RTFGenerator(*this); }
//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 enableIf(OutputType o) { if (o==RTF) active=TRUE; }
void disableIf(OutputType o) { if (o==RTF) active=FALSE; }
......
......@@ -877,6 +877,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
%x SectionLabel
%x SectionTitle
%x CopyArgString
%x CopyArgPHPString
%x CopyArgRound
%x CopyArgSharp
%x CopyArgComment
......@@ -2563,8 +2564,9 @@ IDLATTR ("["[^\]]*"]"){BN}*
*/
<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/]* { current->program += yytext ; }
<ReadBody,ReadNSBody,ReadBodyIntf>"//".* { current->program += yytext ; }
<ReadBody,ReadNSBody,ReadBodyIntf>"#".* { if (! insidePHP)
<ReadBody,ReadNSBody,ReadBodyIntf>"#".* { if (!insidePHP)
REJECT;
// append PHP comment.
current->program += yytext ;
}
<ReadBody,ReadNSBody,ReadBodyIntf>@\" { current->program += yytext ;
......@@ -3005,7 +3007,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
<ReadFuncArgType>[^ \/\r\t\n\)\(\"\'#]+ { *copyArgString+=yytext;
fullArgString+=yytext;
}
<CopyArgString>[^\n\\\"\']+ { *copyArgString+=yytext;
<CopyArgString,CopyArgPHPString>[^\n\\\"\']+ { *copyArgString+=yytext;
fullArgString+=yytext;
}
<CopyArgRound>[^\/\n\)\(\"\']+ {
......@@ -3080,17 +3082,19 @@ IDLATTR ("["[^\]]*"]"){BN}*
lastCContext = YY_START;
BEGIN( SkipCxxComment );
}
<ReadFuncArgType,ReadTempArgs>"'#" { if (! insidePHP)
/*
<ReadFuncArgType,ReadTempArgs>"'#" { if (insidePHP)
REJECT;
*copyArgString+=yytext;
fullArgString+=yytext;
}
<ReadFuncArgType,ReadTempArgs>"#" {
if (! insidePHP)
if (!insidePHP)
REJECT;
lastCContext = YY_START;
BEGIN( SkipCxxComment );
}
*/
/* `)' followed by a special comment */
<ReadFuncArgType>")"{BN}*("/*"[*!]|"//"[/!])"<" {
lineCount();
......@@ -3191,7 +3195,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
//printf("end of argSharpCount\n");
}
}
<CopyArgString>\\. {
<CopyArgString,CopyArgPHPString>\\. {
*copyArgString+=yytext;
fullArgString+=yytext;
}
......@@ -3200,6 +3204,11 @@ IDLATTR ("["[^\]]*"]"){BN}*
fullArgString+=*yytext;
BEGIN( lastCopyArgStringContext );
}
<CopyArgPHPString>\' {
*copyArgString+=*yytext;
fullArgString+=*yytext;
BEGIN( lastCopyArgStringContext );
}
<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>{CHARLIT} {
if (insidePHP)
{
......@@ -3211,12 +3220,24 @@ IDLATTR ("["[^\]]*"]"){BN}*
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++;
*copyArgString+=*yytext;
fullArgString+=*yytext;
}
<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgRound,CopyArgSharp>. {
<ReadFuncArgType,ReadTempArgs,CopyArgString,CopyArgPHPString,CopyArgRound,CopyArgSharp>. {
*copyArgString+=*yytext;
fullArgString+=*yytext;
}
......@@ -3665,19 +3686,22 @@ IDLATTR ("["[^\]]*"]"){BN}*
BEGIN( FindMembers );
}
<SkipInits,SkipCurly,SkipCurlyCpp>"#" {
if (! insidePHP)
if (!insidePHP)
REJECT;
//addToBody(yytext);
lastCContext = YY_START;
BEGIN(SkipCxxComment);
}
<SkipInits,SkipCurly,SkipCurlyCpp>@\" {
if (! insideCS) REJECT;
if (!insideCS) REJECT;
// C# verbatim string
lastSkipVerbStringContext=YY_START;
pSkipVerbString=&current->initializer;
BEGIN(SkipVerbString);
}
<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
if (insidePHP) REJECT;
}
<SkipInits,SkipCurly,SkipCurlyCpp>\' {
if (insidePHP)
{
......@@ -3685,9 +3709,6 @@ IDLATTR ("["[^\]]*"]"){BN}*
BEGIN(SkipPHPString);
}
}
<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
if (insidePHP) REJECT;
}
<SkipInits,SkipCurly,SkipCurlyCpp>. { }
<SkipString,SkipPHPString>\\. { }
<SkipString>\" {
......@@ -3757,6 +3778,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
}
<CompoundName>{SCOPENAME}{BN}*";" { // forward declaration
unput(';');
current->reset();
if (isTypedef) // typedef of a class, put typedef keyword back
{
current->type.prepend("typedef");
......@@ -6113,7 +6135,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
}
}
<*>"#" {
if (! insidePHP)
if (!insidePHP)
REJECT;
lastCContext = YY_START ;
BEGIN( SkipCxxComment ) ;
......
......@@ -131,6 +131,7 @@
// 2004/02/27 - Text inside the trCallGraph() corrected.
// 2004/06/16 - The new method "since 1.3.8" implemented.
// 2004/09/14 - The new methods "since 1.3.9" implemented.
// 2005/02/11 - The "never used" methods removed.
// Todo
// ----
......@@ -301,10 +302,6 @@ class TranslatorCzech : public Translator
virtual QCString trFileList()
{ 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. */
virtual QCString trCompoundMembers()
{
......@@ -447,11 +444,6 @@ class TranslatorCzech : public Translator
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 */
virtual QCString trExamplesDescription()
{ return decode("Zde naleznete seznam všech pøíkladù:"); }
......@@ -464,12 +456,6 @@ class TranslatorCzech : public Translator
virtual QCString trModulesDescription()
{ 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)
......@@ -619,12 +605,6 @@ class TranslatorCzech : public Translator
virtual QCString trEnumerationTypeDocumentation()
{ 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
* of documentation blocks for functions
*/
......@@ -679,19 +659,10 @@ class TranslatorCzech : public Translator
virtual QCString trForInternalUseOnly()
{ 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. */
virtual QCString trWarning()
{ 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. */
virtual QCString trVersion()
{ return decode("Verze"); }
......@@ -979,10 +950,6 @@ class TranslatorCzech : public Translator
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return decode("Zdroje");
}
virtual QCString trDefinedAtLineInSourceFile()
{
return decode("Definice je uvedena na øádku @0 v souboru @1.");
......@@ -1304,11 +1271,6 @@ class TranslatorCzech : public Translator
// 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 */
virtual QCString trClasses()
{
......@@ -1335,11 +1297,6 @@ class TranslatorCzech : public Translator
{
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 */
virtual QCString trDefineValue()
{
......@@ -1450,17 +1407,6 @@ class TranslatorCzech : public Translator
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,
* kdo to pouziva.
*/
......
......@@ -825,7 +825,19 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
MemberList *ml,const char *kind,const char *header=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;
if (header)
......@@ -838,11 +850,14 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
t << "</description>" << endl;
}
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generateXMLForMember(md,ti,t,d);
// 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);
}
}
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