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

Release-1.1.4-20000611

parent 4bdaaa8d
......@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (04 June 2000)
Dimitri van Heesch (11 June 2000)
......@@ -49,6 +49,10 @@ install: doxywizard_install
cd $(INSTALL)/doc/doxygen/examples ; $(MAKE)
cd $(INSTALL)/doc/doxygen/doc ; $(MAKE)
rm -rf $(INSTALL)/doc/doxygen/doc
cd $(INSTALL)/doc/doxygen/latex ; $(MAKE)
cp $(INSTALL)/doc/doxygen/latex/doxygen_manual.pdf $(INSTALL)/doc/doxygen
cp $(INSTALL)/doc/doxygen/latex/doxygen_manual.ps $(INSTALL)/doc/doxygen
rm -rf $(INSTALL)/doc/doxygen/latex
docs: FORCE
cd examples ; $(MAKE)
......
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (04 June 2000)
Dimitri van Heesch (11 June 2000)
......@@ -905,6 +905,14 @@ void init()
"classes or files whose names only differ in case and if your file system \n"
"supports case sensitive file names. \n"
);
ConfigBool::add( "hideScopeNames",
"HIDE_SCOPE_NAMES",
"FALSE",
"hide the name of the scope.",
"If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen \n"
"will show members with their full class and namespace scopes in the \n"
"documentation. If set to YES the scope will be hidden. \n"
);
ConfigBool::add( "verbatimHeaderFlag",
"VERBATIM_HEADERS",
"TRUE",
......
......@@ -49,4 +49,4 @@ OBJECTS_DIR = obj
MOC_DIR = moc
# extra C++ compiler options
TMAKE_CXXFLAGS = -DDOXYWIZARD
TMAKE_CXXFLAGS += -DDOXYWIZARD
......@@ -349,7 +349,7 @@ fi
touch .tmakeconfig
if test "$f_shared" = NO; then
if test "$f_platform" = "osf1-cxx"; then
if test "$f_platform" = "osf1-cxx" -o "$f_platform" = "irix-n32"; then
cat >> .tmakeconfig <<EOF
TMAKE_LFLAGS = -non_shared
EOF
......
......@@ -89,6 +89,7 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_generate_tagfile GENERATE_TAGFILE
<li> \refitem cfg_graphical_hierarchy GRAPHICAL_HIERARCHY
<li> \refitem cfg_have_dot HAVE_DOT
<li> \refitem cfg_hide_scope_names HIDE_SCOPE_NAMES
<li> \refitem cfg_hide_undoc_classes HIDE_UNDOC_CLASSES
<li> \refitem cfg_hide_undoc_members HIDE_UNDOC_MEMBERS
<li> \refitem cfg_html_align_members HTML_ALIGN_MEMBERS
......@@ -308,6 +309,13 @@ followed by the descriptions of the tags grouped by category.
classes or files whose names only differ in case and if your file system
supports case sensitive file names.
\anchor cfg_hide_scope_names
<dt>\c HIDE_SCOPE_NAMES <dd>
\addindex HIDE_SCOPE_NAMES
If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
will show members with their full class and namespace scopes in the
documentation. If set to YES the scope will be hidden.
\anchor cfg_verbatim_headers
<dt>\c VERBATIM_HEADERS <dd>
\addindex VERBATIM_HEADERS
......
......@@ -39,7 +39,7 @@ You should use the \\mainpage command inside a comment block like this:
In order for global functions, variables, enums, typedefs, and defines
to be documented you should document the file in which these commands are
located using a (non-empty) comment block containing a \file (or @file)
located using a comment block containing a \file (or @file)
command.
Alternatively, you can put all members in a group (or module)
......
......@@ -46,8 +46,8 @@ Here is a list of the languages and their current maintainers:
Jens Breitenstein
</TD>
<TD>
<a href="mailto:Jens.Breitenstein@NOSPAM.tlc.de">
Jens.Breitenstein@NOSPAM.tlc.de</a>
<a href="mailto:j@NOSPAM.js-b.de">
j@NOSPAM.js-b.de</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -199,7 +199,7 @@ Here is a list of the languages and their current maintainers:
\hline
{\bf Language} & {\bf Maintainer} & {Contact address} \\
\hline
German & Jens Breitenstein & {\tt Jens.Breitenstein@tlc.de} \\
German & Jens Breitenstein & {\tt j@jb-s.de} \\
\hline
French & Christophe Bordeux & {\tt bordeux@lig.di.epfl.ch} \\
\hline
......
......@@ -114,6 +114,18 @@ ClassDef::~ClassDef()
delete memberGroupDict;
}
QCString ClassDef::displayName() const
{
if (Config::hideScopeNames)
{
return stripScope(name());
}
else
{
return name();
}
}
// inserts a base class in the inheritance list
void ClassDef::insertBaseClass(ClassDef *cd,Protection p,
Specifier s,const char *t)
......@@ -926,7 +938,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endDescList();
}
ol.newParagraph();
writeSourceRef(ol,name());
writeSourceDef(ol,name());
ol.endTextBlock();
}
......@@ -1029,7 +1041,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.docify(stripFromPath(path));
}
if (fd->isLinkable())
if (fd->generateSource() || (!fd->isReference() && Config::sourceBrowseFlag))
{
ol.writeObjectLink(0,fd->sourceName(),0,fd->name());
}
else if (fd->isLinkable())
{
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,
fd->name());
......
......@@ -27,7 +27,7 @@
#include "memberlist.h"
#include "definition.h"
typedef QDict<MemberDef> MemberDict;
class MemberDict;
class ClassList;
class OutputList;
class FileDef;
......@@ -58,6 +58,7 @@ class ClassDef : public Definition
const char *ref=0,const char *fName=0);
~ClassDef();
QCString getOutputFileBase() const { return fileName; }
QCString displayName() const;
CompoundType compoundType() const { return compType; }
void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0);
BaseClassList *baseClasses() { return inherits; }
......
......@@ -36,6 +36,9 @@
#define YY_NEVER_INTERACTIVE 1
/*! local class definition, used for classes that are defined
* inside code fragments.
*/
class CodeClassDef
{
public:
......@@ -51,6 +54,9 @@ class CodeClassDef
QStrList bases;
};
/*! local member definition, used for variables that are defined
* inside code fragments.
*/
class CodeVarDef
{
public:
......@@ -105,12 +111,18 @@ static QCString g_exampleName;
static QCString g_exampleFile;
static int g_anchorCount;
static FileDef * g_sourceFileDef;
static Definition * g_currentDefinition;
static MemberDef * g_currentMemberDef;
static bool g_includeCodeFragment;
static const char * g_currentFontClass;
static bool g_searchingForBody;
static bool g_insideBody;
static int g_bodyCurlyCount;
// start a new line of code, inserting a line number if g_sourceFileDef
// is TRUE. If a definition starts at the current line, then the line
// number is linked to the documentation of that definition.
/*! start a new line of code, inserting a line number if g_sourceFileDef
* is TRUE. If a definition starts at the current line, then the line
* number is linked to the documentation of that definition.
*/
static void startCodeLine(OutputList &ol)
{
if (g_currentFontClass)
......@@ -122,10 +134,17 @@ static void startCodeLine(OutputList &ol)
QCString lineNumber,lineAnchor;
lineNumber.sprintf("%05d",g_yyLineNr);
lineAnchor.sprintf("l%05d",g_yyLineNr);
Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr);
QCString anchor = g_sourceFileDef->getSourceAnchor(g_yyLineNr);
if (!g_includeCodeFragment && d && d->isLinkableInProject())
{
g_currentDefinition = d;
g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr);
QCString anchor;
g_insideBody = FALSE;
g_searchingForBody = TRUE;
g_bodyCurlyCount = 0;
if (g_currentMemberDef) anchor=g_currentMemberDef->anchor();
ol.startCodeAnchor(lineAnchor);
ol.writeCodeLink(d->getReference(),d->getOutputFileBase(),
anchor,lineNumber);
......@@ -145,8 +164,9 @@ static void startCodeLine(OutputList &ol)
}
}
// write a code fragment `text' that may span multiple lines, inserting
// line numbers for each line.
/*! write a code fragment `text' that may span multiple lines, inserting
* line numbers for each line.
*/
static void codifyLines(char *text)
{
char *p=text,*sp=p;
......@@ -175,9 +195,10 @@ static void codifyLines(char *text)
}
}
// writes a link to a fragment `text' that may span multiple lines, inserting
// line numbers for each line. If `text' contains newlines, the link will be
// split into multiple links with the same destination, one for each line.
/*! writes a link to a fragment \a text that may span multiple lines, inserting
* line numbers for each line. If \a text contains newlines, the link will be
* split into multiple links with the same destination, one for each line.
*/
static void writeMultiLineCodeLink(OutputList &ol,
const char *ref,const char *file,
const char *anchor,const char *text)
......@@ -358,6 +379,11 @@ static bool getLink(const char *className,
if (d && d->isLinkable())
{
if (g_currentDefinition && g_currentMemberDef &&
md!=g_currentMemberDef && g_insideBody)
{
md->addSourceReference(g_currentMemberDef);
}
//printf("d->getOutputBase()=`%s' name=`%s'\n",d->getOutputFileBase().data(),md->name().data());
writeMultiLineCodeLink(result,d->getReference(),d->getOutputFileBase(),
md->anchor(),text ? text : memberName);
......@@ -374,8 +400,21 @@ static ClassDef *stripClassName(const char *s)
int p=0,i,l;
while ((i=re.match(tmp,p,&l))!=-1)
{
ClassDef *cd=getResolvedClass(tmp.mid(i,l));
if (cd) return cd;
ClassDef *cd=0;
QCString clName = tmp.mid(i,l);
//printf("g_classScope=`%s' clName=`%s'\n",g_classScope.data(),clName.data());
if (!g_classScope.isEmpty())
{
cd=getResolvedClass(g_classScope+"::"+clName);
}
if (cd==0)
{
cd=getResolvedClass(clName);
}
if (cd)
{
return cd;
}
p=i+l;
}
return 0;
......@@ -385,7 +424,7 @@ static void generateMemberLink(OutputList &ol,const char *varName,
char *memName)
{
//printf("generateMemberLink(object=%s,mem=%s) classScope=%s\n",
// varName,memName,classScope.data());
// varName,memName,g_classScope.data());
CodeVarDef *cvd=g_codeParmList.last();
while (cvd && cvd->name!=varName) cvd=g_codeParmList.prev();
if (!cvd)
......@@ -453,20 +492,36 @@ static void generateMemberLink(OutputList &ol,const char *varName,
ClassDef *mcd=stripClassName(vmd->typeString());
if (mcd && mcd->isLinkable())
{
//printf("Found class `%s'\n",mcd->name().data());
MemberName *mmn=memberNameDict[memName];
if (mmn)
{
MemberNameIterator mmni(*mmn);
MemberDef *mmd;
MemberDef *mmd,*xmd=0;
ClassDef *xcd=0;
const int maxInheritanceDepth = 100000;
int mdist=maxInheritanceDepth;
for (;(mmd=mmni.current());++mmni)
{
if (mmd->memberClass()==mcd)
int m=minClassDistance(mcd,mmd->memberClass());
if (m<mdist && mmd->memberClass()->isLinkable())
{
writeMultiLineCodeLink(ol,mcd->getReference(),
mcd->getOutputFileBase(),mmd->anchor(),memName);
return;
mdist=m;
xcd=mmd->memberClass();
xmd=mmd;
}
}
if (mdist!=maxInheritanceDepth)
{
if (g_currentDefinition && g_currentMemberDef &&
xmd!=g_currentMemberDef && g_insideBody)
{
xmd->addSourceReference(g_currentMemberDef);
}
writeMultiLineCodeLink(ol,xcd->getReference(),
xcd->getOutputFileBase(),xmd->anchor(),memName);
return;
}
}
}
}
......@@ -657,8 +712,14 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
}
<Body>"{" {
if (g_searchingForBody)
{
g_searchingForBody=FALSE;
g_insideBody=TRUE;
}
g_code->codify(yytext);
g_curlyCount++;
if (g_insideBody) g_bodyCurlyCount++;
g_type.resize(0);
g_name.resize(0);
}
......@@ -670,9 +731,14 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_classScope.resize(0);
g_codeParmList.clear();
}
if (--g_bodyCurlyCount<=0)
{
g_insideBody=FALSE;
}
}
<ClassName>";" {
g_code->codify(yytext);
g_searchingForBody=FALSE;
BEGIN( Body );
}
<ClassName>[*&]+ {
......@@ -692,6 +758,12 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
g_curlyCount++;
g_inClass=TRUE;
if (g_searchingForBody)
{
g_searchingForBody=FALSE;
g_insideBody=TRUE;
}
if (g_insideBody) g_bodyCurlyCount++;
if (!g_ccd.name.isEmpty())
{
g_classScope=g_ccd.name.copy();
......@@ -921,6 +993,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
<MemberCall2,FuncCall>")"[ \t\n]*";" {
codifyLines(yytext);
g_bracketCount=0;
g_searchingForBody=FALSE;
if (!g_inClass && !g_type.isEmpty())
addVariable();
g_name.resize(0);g_type.resize(0);
......@@ -937,6 +1010,12 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
codifyLines(yytext+1);
endFontClass();
g_code->codify("{");
if (g_searchingForBody)
{
g_searchingForBody=FALSE;
g_insideBody=TRUE;
}
if (g_insideBody) g_bodyCurlyCount++;
g_curlyCount++;
g_type.resize(0); g_name.resize(0);
BEGIN( Body );
......@@ -954,6 +1033,12 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
<SkipInits>"{" {
g_code->codify(yytext);
g_curlyCount++;
if (g_searchingForBody)
{
g_searchingForBody=FALSE;
g_insideBody=TRUE;
}
if (g_insideBody) g_bodyCurlyCount++;
BEGIN( Body );
}
<SkipInits>{ID} {
......@@ -1228,12 +1313,18 @@ void parseCode(OutputList &ol,const char *className,const QCString &s,
else
g_yyLineNr = 1;
g_curlyCount = 0;
g_bodyCurlyCount = 0;
g_bracketCount = 0;
g_sharpCount = 0;
g_classScope = className;
g_exampleBlock = exBlock;
g_exampleName = exName;
g_sourceFileDef = fd;
g_currentDefinition = 0;
g_currentMemberDef = 0;
g_searchingForBody = FALSE;
g_insideBody = FALSE;
g_bracketCount = 0;
g_exampleFile = convertSlashes(g_exampleName,TRUE)+"-example";
g_includeCodeFragment = inlineFragment;
startCodeLine(*g_code);
......
......@@ -51,6 +51,7 @@ struct Config
static bool inlineSourceFlag; // inline the definition bodies in the docs?
static bool stripCommentsFlag; // strip special comments from code fragments?
static bool caseSensitiveNames; // determines if output can be mixed case.
static bool hideScopeNames; // hide the name of the scope.
static bool verbatimHeaderFlag; // enable/disable generation of verb headers.
static bool showIncFileFlag; // show include file in file documentation?
static bool autoBriefFlag; // javadoc comments behaves as Qt comments.
......
......@@ -86,6 +86,7 @@ bool Config::sourceBrowseFlag = FALSE;
bool Config::inlineSourceFlag = FALSE;
bool Config::stripCommentsFlag = TRUE;
bool Config::caseSensitiveNames = FALSE;
bool Config::hideScopeNames = FALSE;
bool Config::verbatimHeaderFlag = TRUE;
bool Config::showIncFileFlag = TRUE;
bool Config::autoBriefFlag = TRUE;
......@@ -227,6 +228,7 @@ static int yyread(char *buf,int max_size)
<Start>"INLINE_SOURCES"[ \t]*"=" { BEGIN(GetBool); b=&Config::inlineSourceFlag; }
<Start>"STRIP_CODE_COMMENTS"[ \t]*"=" { BEGIN(GetBool); b=&Config::stripCommentsFlag; }
<Start>"CASE_SENSE_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&Config::caseSensitiveNames; }
<Start>"HIDE_SCOPE_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&Config::hideScopeNames; }
<Start>"VERBATIM_HEADERS"[ \t]*"=" { BEGIN(GetBool); b=&Config::verbatimHeaderFlag; }
<Start>"SHOW_INCLUDE_FILES"[ \t]*"=" { BEGIN(GetBool); b=&Config::showIncFileFlag; }
<Start>"JAVADOC_AUTOBRIEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::autoBriefFlag; }
......@@ -413,6 +415,7 @@ void dumpConfig()
printf("inlineSourceFlag=`%d'\n",Config::inlineSourceFlag);
printf("stripCommentsFlag=`%d'\n",Config::stripCommentsFlag);
printf("caseSensitiveNames=`%d'\n",Config::caseSensitiveNames);
printf("hideScopeNames=`%d'\n",Config::hideScopeNames);
printf("verbatimHeaderFlag=`%d'\n",Config::verbatimHeaderFlag);
printf("showIncFileFlag=`%d'\n",Config::showIncFileFlag);
printf("autoBriefFlag=`%d'\n",Config::autoBriefFlag);
......@@ -615,6 +618,7 @@ void Config::init()
Config::inlineSourceFlag = FALSE;
Config::stripCommentsFlag = TRUE;
Config::caseSensitiveNames = FALSE;
Config::hideScopeNames = FALSE;
Config::verbatimHeaderFlag = TRUE;
Config::showIncFileFlag = TRUE;
Config::autoBriefFlag = TRUE;
......@@ -977,6 +981,17 @@ void writeTemplateConfig(QFile *f,bool sl)
writeBoolValue(t,Config::caseSensitiveNames);
t << "\n";
if (!sl)
{
t << "\n";
t << "# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen \n";
t << "# will show members with their full class and namespace scopes in the \n";
t << "# documentation. If set to YES the scope will be hidden. \n";
t << "\n";
}
t << "HIDE_SCOPE_NAMES = ";
writeBoolValue(t,Config::hideScopeNames);
t << "\n";
if (!sl)
{
t << "\n";
t << "# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n";
......
......@@ -24,6 +24,7 @@
#include "message.h"
#include "outputlist.h"
#include "scanner.h"
#include <qregexp.h>
Definition::Definition(const char *df,int dl,
const char *name,const char *b,const char *d)
......@@ -36,11 +37,15 @@ Definition::Definition(const char *df,int dl,
sectionList=0,
startBodyLine=endBodyLine=-1,
bodyDef=0;
sourceRefList=0;
sourceRefDict=0;
}
Definition::~Definition()
{
delete sectionList;
delete sourceRefList;
delete sourceRefDict;
}
QCString Definition::nameToFile(const char *name)
......@@ -174,7 +179,7 @@ static bool readCodeFragment(const char *fileName,
}
/*! Write a reference to the source code defining this definition */
void Definition::writeSourceRef(OutputList &ol,const char *scopeName)
void Definition::writeSourceDef(OutputList &ol,const char *scopeName)
{
ol.pushGeneratorState();
//printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
......@@ -288,11 +293,89 @@ void Definition::writeSourceRef(OutputList &ol,const char *scopeName)
ol.popGeneratorState();
}
/*! Write a reference to the source code fragments in which this
* definition is used.
*/
void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
{
ol.pushGeneratorState();
if (Config::sourceBrowseFlag && sourceRefList)
{
ol.newParagraph();
parseText(ol,theTranslator->trReferencedBy());
ol.docify(" ");
QCString defLine=theTranslator->trWriteList(sourceRefList->count());
QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen;
// now replace all markers in inheritLine with links to the classes
while ((newIndex=marker.match(defLine,index,&matchLen))!=-1)
{
bool ok;
parseText(ol,defLine.mid(index,newIndex-index));
uint entryIndex = defLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
MemberDef *md=sourceRefList->at(entryIndex);
if (ok && md)
{
QCString scope=md->getScopeString();
QCString name=md->name();
if (!scope.isEmpty() && scope!=scopeName)
{
name.prepend(scope+"::");
}
if (md->getStartBodyLine()!=-1 && md->getBodyDef())
{
QCString lineStr,anchorStr;
anchorStr.sprintf("l%05d",md->getStartBodyLine());
ol.writeObjectLink(0,md->getBodyDef()->sourceName(),
anchorStr,name);
}
else
{
ol.docify(name);
}
ol.docify("()");
}
index=newIndex+matchLen;
}
parseText(ol,defLine.right(defLine.length()-index));
ol.writeString(".");
}
ol.popGeneratorState();
}
bool Definition::hasDocumentation()
{
return !doc.isEmpty() || // has detailed docs
!brief.isEmpty() || // has brief description
/*(Config::sourceBrowseFlag && startBodyLine!=-1 && bodyDef) || // has a source reference */
return !doc.isEmpty() || // has detailed docs
!brief.isEmpty() || // has brief description
Config::extractAllFlag; // extract everything
}
void Definition::addSourceReference(MemberDef *md)
{
if (md)
{
QCString name=md->name();
QCString scope=md->getScopeString();
if (!scope.isEmpty())
{
name.prepend(scope+"::");
}
if (sourceRefList==0)
{
sourceRefDict = new MemberDict(53);
sourceRefList = new MemberList;
}
if (sourceRefDict->find(name)==0)
{
sourceRefDict->insert(name,md);
sourceRefList->inSort(md);
}
}
}
......@@ -24,6 +24,9 @@
class FileDef;
class OutputList;
class SectionList;
class MemberList;
class MemberDict;
class MemberDef;
/*! The common base class of all entity definitions found in the sources. */
class Definition
......@@ -83,6 +86,7 @@ class Definition
*/
void addSectionsToDefinition(QList<QCString> *anchorList);
// source references
void setBodySegment(int bls,int ble)
{
startBodyLine=bls;
......@@ -92,7 +96,9 @@ class Definition
int getStartBodyLine() const { return startBodyLine; }
int getEndBodyLine() const { return endBodyLine; }
FileDef *getBodyDef() { return bodyDef; }
void writeSourceRef(OutputList &ol,const char *scopeName);
void writeSourceDef(OutputList &ol,const char *scopeName);
void writeSourceRefs(OutputList &ol,const char *scopeName);
void addSourceReference(MemberDef *d);
/*! returns the file in which this definition was found */
QCString getDefFileName() const { return defFileName; }
......@@ -114,7 +120,31 @@ class Definition
QCString doc; // detailed description
QCString ref; // reference to external documentation
SectionList *sectionList; // list of all sections
MemberList *sourceRefList; // list of entities that refer to this
// entity in their definition
MemberDict *sourceRefDict;
};
class DefinitionList : public QList<Definition>
{
public:
~DefinitionList() {}
int compareItems(GCI item1,GCI item2)
{
return stricmp(((Definition *)item1)->name(),
((Definition *)item2)->name()
);
}
};
class DefinitionListIterator : public QListIterator<Definition>
{
public:
DefinitionListIterator(const DefinitionList &l) :
QListIterator<Definition>(l) {}
~DefinitionListIterator() {}
};
#endif
......@@ -196,14 +196,17 @@ DiagramItem::~DiagramItem()
QCString DiagramItem::label() const
{
QCString result;
if (!templSpec.isEmpty())
{
return insertTemplateSpecifierInScope(classDef->name(),templSpec);
result=insertTemplateSpecifierInScope(classDef->name(),templSpec);
}
else
{
return classDef->name();
result=classDef->name();
}
if (Config::hideScopeNames) result=stripScope(result);
return result;
}
QCString DiagramItem::fileName() const
......
......@@ -654,7 +654,7 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper)
else
{
bn = new DotNode(m_curNodeNumber++,
bClass->name(),
bClass->displayName(),
bClass->isLinkable() ?
(bClass->getReference()+"$"+bClass->getOutputFileBase()).data() :
0
......@@ -701,7 +701,7 @@ DotGfxHierarchyTable::DotGfxHierarchyTable()
{
//printf("Inserting root class %s\n",cd->name().data());
DotNode *n = new DotNode(m_curNodeNumber++,
cd->name(),
cd->displayName(),
cd->isLinkable() ?
(cd->getReference()+"$"+cd->getOutputFileBase()).data() :
0
......@@ -805,8 +805,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
}
else // new class
{
QCString displayName=className.copy();
if (Config::hideScopeNames) displayName=stripScope(displayName);
bn = new DotNode(m_curNodeNumber++,
className,
displayName,
cd->isLinkable() ?
(cd->getReference()+"$"+cd->getOutputFileBase()).data() : 0,
distance
......@@ -877,7 +879,7 @@ DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
m_maxDistance = 0;
m_recDepth = maxRecursionDepth;
m_startNode = new DotNode(m_curNodeNumber++,
cd->name(),
cd->displayName(),
cd->isLinkable() ?
(cd->getReference()+"$"+cd->getOutputFileBase()).data() : 0,
0, // distance
......
......@@ -285,7 +285,7 @@ static void buildFileList(Entry *root)
const char *fn = root->fileName.data();
QCString text;
text.sprintf("Warning: the name `%s' supplied as "
"the second argument in the \\file statement.",
"the second argument in the \\file statement ",
root->name.data()
);
if (ambig) // name is ambigious
......@@ -331,7 +331,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
{ // explicit request
QCString text;
text.sprintf("Warning: the name `%s' supplied as "
"the second argument in the \\class statement.",
"the second argument in the \\class statement ",
root->includeFile.data()
);
if (ambig) // name is ambigious
......@@ -911,7 +911,7 @@ static MemberDef *addVariableToClass(
QCString def;
if (!root->type.isEmpty())
{
if (mtype==MemberDef::Friend)
if (mtype==MemberDef::Friend || Config::hideScopeNames)
{
def=root->type+" "+name+root->args;
}
......@@ -922,7 +922,14 @@ static MemberDef *addVariableToClass(
}
else
{
def=scope+"::"+name+root->args;
if (Config::hideScopeNames)
{
def=name+root->args;
}
else
{
def=scope+"::"+name+root->args;
}
}
if (def.left(7)=="static ") def=def.right(def.length()-7);
......@@ -1067,7 +1074,9 @@ static MemberDef *addVariableToFile(
QCString def;
// determine the definition of the global variable
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@' &&
!Config::hideScopeNames
)
// variable is inside a namespace, so put the scope before the name
{
if (!root->type.isEmpty())
......@@ -1386,7 +1395,7 @@ static void buildMemberList(Entry *root)
//md->setScopeTemplateArguments(root->tArgList);
md->addSectionsToDefinition(root->anchors);
QCString def;
if (!root->relates.isEmpty() || isFriend)
if (!root->relates.isEmpty() || isFriend || Config::hideScopeNames)
{
if (!root->type.isEmpty())
{
......@@ -2478,17 +2487,16 @@ static void substituteTemplateArgNames(ArgumentList *src,
}
//----------------------------------------------------------------------
// This function tries to find a member (in a documented class/file/namespace)
// that corresponds to the function declaration given in `funcDecl'.
//
// The related field may be used to specify a related class name.
// It is only used if the class name cannot be extracted from the function
// declaration.
//
// The boolean overloaded is used to specify whether or not a standard
// overload documentation line should be generated.
/*! This function tries to find a member (in a documented class/file/namespace)
* that corresponds to the function declaration given in \a funcDecl.
*
* The \a related field may be used to specify a related class name.
* It is only used if the class name cannot be extracted from the function
* declaration.
*
* The boolean \a overloaded is used to specify whether or not a standard
* overload documentation line should be generated.
*/
static void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
bool isFunc)
{
......@@ -2733,7 +2741,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
// rebuild the function declaration (needed to get the scope right).
if (!scopeName.isEmpty() && !isRelated && !isFriend)
if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config::hideScopeNames)
{
if (!funcType.isEmpty())
{
......@@ -3408,6 +3416,7 @@ static void findEnums(Entry *root)
//printf("add %s to new memberName. Now %d members\n",
// name.data(),mn->count());
}
addMemberToGroups(root,md);
EntryListIterator eli(*root->sublist);
Entry *e;
......@@ -3732,7 +3741,7 @@ static void buildCompleteMemberLists()
//----------------------------------------------------------------------------
static void generateFileDocs()
static void generateFileSources()
{
if (documentedHtmlFiles==0) return;
writeFileIndex(*outputList);
......@@ -3745,21 +3754,41 @@ static void generateFileDocs()
FileDef *fd=fn->first();
while (fd)
{
bool doc = fd->isLinkableInProject();
bool src = fd->generateSource() ||
(!fd->isReference() && Config::sourceBrowseFlag);
if (doc || src)
bool src = !fd->isReference() &&
(fd->generateSource() || Config::sourceBrowseFlag);
if (src)
{
msg("Generating docs for file %s...\n",fd->name().data());
msg("Generating code for file %s...\n",fd->name().data());
fd->writeSource(*outputList);
}
fd=fn->next();
}
fn=inputNameList.next();
}
}
}
//----------------------------------------------------------------------------
static void generateFileDocs()
{
if (documentedHtmlFiles==0) return;
writeFileIndex(*outputList);
if (inputNameList.count()>0)
{
FileName *fn=inputNameList.first();
while (fn)
{
FileDef *fd=fn->first();
while (fd)
{
bool doc = fd->isLinkableInProject();
if (doc)
{
msg("Generating docs for file %s...\n",fd->name().data());
fd->writeDocumentation(*outputList);
}
if (src && !fd->isReference())
{
fd->writeSource(*outputList);
}
fd=fn->next();
}
......@@ -3770,30 +3799,6 @@ static void generateFileDocs()
//----------------------------------------------------------------------------
//void generateSources()
//{
// if (Config::sourceBrowseFlag)
// {
// writeSourceIndex(*outputList);
//
// if (inputNameList.count()>0)
// {
// FileName *fn=inputNameList.first();
// while (fn)
// {
// FileDef *fd=fn->first();
// while (fd && !fd->isReference())
// {
// msg("Generating source listing for file %s...\n",fd->name().data());
// fd->writeSource(*outputList);
// fd=fn->next();
// }
// fn=inputNameList.next();
// }
// }
// }
//}
static void addSourceReferences()
{
ClassListIterator cli(classList);
......@@ -3822,7 +3827,7 @@ static void addSourceReferences()
Definition *d=cd;
if (d==0) d=md->getNamespace();
if (d==0) d=md->getFileDef();
fd->addSourceRef(md->getStartBodyLine(),d,md->anchor());
fd->addSourceRef(md->getStartBodyLine(),d,md);
}
}
}
......@@ -3835,16 +3840,18 @@ static void addSourceReferences()
{
NamespaceDef *nd=md->getNamespace();
FileDef *fd=md->getBodyDef();
GroupDef *gd=md->groupDef();
if (md->getStartBodyLine()!=-1 && md->isLinkableInProject() &&
(nd && nd->isLinkableInProject()) ||
(fd && fd->isLinkableInProject())
((nd && nd->isLinkableInProject()) ||
(fd && fd->isLinkableInProject()) ||
(gd && gd->isLinkableInProject())
)
)
{
//printf("Found member `%s' in file `%s' at line `%d'\n",
// md->name().data(),fd->name().data(),md->getStartBodyLine());
Definition *d=md->getFileDef();
if (d==0) d=md->getNamespace();
fd->addSourceRef(md->getStartBodyLine(),d,md->anchor());
Definition *d=gd ? gd : (nd ? nd : fd);
fd->addSourceRef(md->getStartBodyLine(),d,md);
}
}
}
......@@ -4725,9 +4732,10 @@ static void copyStyleSheet()
if (!Config::htmlStyleSheet.isEmpty())
{
QFile cssf(Config::htmlStyleSheet);
QFileInfo cssfi(Config::htmlStyleSheet);
if (cssf.open(IO_ReadOnly))
{
QCString destFileName = Config::htmlOutputDir+"/"+Config::htmlStyleSheet;
QCString destFileName = Config::htmlOutputDir+"/"+cssfi.fileName();
QFile df(destFileName);
if (df.open(IO_WriteOnly))
{
......@@ -5446,6 +5454,9 @@ int main(int argc,char **argv)
msg("Generating example documentation...\n");
generateExampleDocs();
msg("Generating file sources...\n");
generateFileSources();
msg("Generating file documentation...\n");
generateFileDocs();
......
......@@ -84,7 +84,6 @@ class BufStr : public QCString
};
typedef QList<QCString> StringList;
typedef QDict<MemberDef> MemberDict;
typedef QDict<FileDef> FileDict;
typedef QDict<QCString> StringDict;
typedef QDict<PageInfo> PageDict;
......
......@@ -49,7 +49,7 @@ FileDef::FileDef(const char *p,const char *nm,const char *ref)
namespaceList = new NamespaceList;
namespaceDict = new NamespaceDict(7);
srcDefDict = 0;
srcAnchorDict = 0;
srcMemberDict = 0;
usingDirList = 0;
usingDeclList = 0;
isSource = FALSE;
......@@ -72,7 +72,7 @@ FileDef::~FileDef()
delete namespaceList;
delete namespaceDict;
delete srcDefDict;
delete srcAnchorDict;
delete srcMemberDict;
delete usingDirList;
delete usingDeclList;
delete memberGroupList;
......@@ -529,18 +529,14 @@ void FileDef::insertNamespace(NamespaceDef *nd)
}
}
void FileDef::addSourceRef(int line,Definition *d,const char *anchor)
void FileDef::addSourceRef(int line,Definition *d,MemberDef *md)
{
if (d)
{
if (srcDefDict==0) srcDefDict = new QIntDict<Definition>(257);
if (srcAnchorDict==0)
{
srcAnchorDict = new QIntDict<QCString>(257);
srcAnchorDict->setAutoDelete(TRUE);
}
if (srcDefDict==0) srcDefDict = new QIntDict<Definition>(257);
if (srcMemberDict==0) srcMemberDict = new QIntDict<MemberDef>(257);
srcDefDict->insert(line,d);
srcAnchorDict->insert(line,new QCString(anchor));
if (md) srcMemberDict->insert(line,md);
//printf("Adding member %s with anchor %s at line %d to file %s\n",
// d->name().data(),anchor,line,name().data());
}
......@@ -556,13 +552,12 @@ Definition *FileDef::getSourceDefinition(int lineNr)
return result;
}
QCString FileDef::getSourceAnchor(int lineNr)
MemberDef *FileDef::getSourceMember(int lineNr)
{
QCString result;
if (srcAnchorDict)
MemberDef *result=0;
if (srcMemberDict)
{
QCString *pstr = srcAnchorDict->find(lineNr);
if (pstr) result=*pstr;
result = srcMemberDict->find(lineNr);
}
return result;
}
......
......@@ -87,9 +87,9 @@ class FileDef : public Definition
/*! Returns the name as it is used in the documentation */
QCString docName() const { return docname; }
void addSourceRef(int line,Definition *d,const char *anchor);
void addSourceRef(int line,Definition *d,MemberDef *md);
Definition *getSourceDefinition(int lineNr);
QCString getSourceAnchor(int lineNr);
MemberDef *getSourceMember(int lineNr);
/* Sets the name of the include file to \a n. */
//void setIncludeName(const char *n_) { incName=n_; }
......@@ -157,7 +157,7 @@ class FileDef : public Definition
QCString docname;
//QCString incName;
QIntDict<Definition> *srcDefDict;
QIntDict<QCString> *srcAnchorDict;
QIntDict<MemberDef> *srcMemberDict;
bool isSource;
/* user defined member groups */
......
......@@ -89,7 +89,8 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external)
}
else
{
t << Config::htmlStyleSheet;
QFileInfo cssfi(Config::htmlStyleSheet);
t << cssfi.fileName();
}
t << "\" rel=\"stylesheet\" type=\"text/css\">\n"
"</head><body bgcolor=\"#ffffff\">\n";
......@@ -220,7 +221,8 @@ void HtmlGenerator::writeStyleInfo(int part)
}
else // write user defined style sheet
{
startPlainFile(Config::htmlStyleSheet);
QFileInfo cssfi(Config::htmlStyleSheet);
startPlainFile(cssfi.fileName());
t << fileToString(Config::htmlStyleSheet);
endPlainFile();
}
......
......@@ -364,9 +364,12 @@ void HtmlHelp::addContentsItem(const char *name,const char *ref,
{
int i; for (i=0;i<dc;i++) cts << " ";
cts << "<LI><OBJECT type=\"text/sitemap\">";
cts << "<param name=\"Local\" value=\"" << ref << ".html";
if (anchor) cts << "#" << anchor;
cts << "\">";
if (ref)
{
cts << "<param name=\"Local\" value=\"" << ref << ".html";
if (anchor) cts << "#" << anchor;
cts << "\">";
}
cts << "<param name=\"Name\" value=\"" << name << "\">"
"</OBJECT>\n";
}
......
......@@ -115,7 +115,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
//printf("Passed...\n");
if (cd->isLinkable())
{
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->name());
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName());
if (cd->isReference())
{
ol.startTypewriter();
......@@ -125,13 +125,16 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(cd->name(),cd->getOutputFileBase());
//cd->writeMembersToContents();
}
}
else
{
ol.writeIndexItem(0,0,cd->name());
//if (hasHtmlHelp) htmlHelp->addContentsItem(cd->name(),"nodoc");
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(cd->name(),0);
}
}
if (!cd->visited && !hideSuper && cd->superClasses()->count()>0)
{
......@@ -184,7 +187,7 @@ void writeClassHierarchy(OutputList &ol)
}
if (cd->isLinkable())
{
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->name());
ol.writeIndexItem(cd->getReference(),cd->getOutputFileBase(),cd->displayName());
if (cd->isReference())
{
ol.startTypewriter();
......@@ -199,8 +202,12 @@ void writeClassHierarchy(OutputList &ol)
}
else
{
ol.writeIndexItem(0,0,cd->name());
ol.writeIndexItem(0,0,cd->displayName());
//if (hasHtmlHelp) htmlHelp->addContentsItem(cd->name(),"nodoc");
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(cd->name(),0);
}
}
if (!cd->visited && cd->superClasses()->count()>0)
{
......@@ -654,7 +661,7 @@ void writeAnnotatedClassList(OutputList &ol)
case ClassDef::Union: type="union"; break;
default: type="interface"; break;
}
ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->name());
ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName());
ol.docify(" (");
if (!cd->briefDescription().isEmpty())
{
......@@ -792,7 +799,14 @@ void writeAlphabeticalClassList(OutputList &ol)
{
QCString cname;
QCString namesp;
extractNamespaceName(cd->name(),cname,namesp);
if (Config::hideScopeNames)
{
cname=cd->displayName();
}
else
{
extractNamespaceName(cd->name(),cname,namesp);
}
ol.writeObjectLink(cd->getReference(),
cd->getOutputFileBase(),0,cname);
......@@ -927,7 +941,7 @@ void writeMemberList(OutputList &ol)
if (//cd && (md->isFriend() || md->protection()!=Private || Config::extractPrivateFlag) &&
//!md->isReference() && md->hasDocumentation() &&
md->isLinkableInProject() &&
prevName!=cd->name() &&
prevName!=cd->displayName() &&
cd->isLinkableInProject()
)
{
......@@ -936,9 +950,9 @@ void writeMemberList(OutputList &ol)
else
ol.docify(", ");
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),md->anchor(),
cd->name());
cd->displayName());
count++;
prevName=cd->name();
prevName=cd->displayName();
}
md=mn->prev();
}
......@@ -1384,7 +1398,7 @@ void writePageIndex(OutputList &ol)
startTitle(ol,0);
QCString title = theTranslator->trRelatedPages();
if (!Config::projectName.isEmpty()) title.prepend(Config::projectName+" ");
ol.docify(title);
parseText(ol,title);
endTitle(ol,0,0);
ol.startTextBlock();
HtmlHelp *htmlHelp = 0;
......@@ -1568,7 +1582,7 @@ void writeIndex(OutputList &ol)
parseDoc(ol,defFileName,defLine,0,0,Config::projectNumber);
ol.endProjectNumber();
}
if (Config::noIndexFlag) writeQuickLinks(ol,FALSE);
if (Config::noIndexFlag && mainPage==0) writeQuickLinks(ol,FALSE);
if (mainPage)
{
......
......@@ -958,7 +958,7 @@ void LatexGenerator::writeSection(const char *lab,const char *title,bool sub)
}
}
void LatexGenerator::writeSectionRef(const char *fileName,const char *lab,
void LatexGenerator::writeSectionRef(const char *,const char *lab,
const char *text)
{
if (text && Config::pdfHyperFlag)
......@@ -1010,6 +1010,7 @@ void LatexGenerator::docify(const char *str)
{
static bool isJapanese = theTranslator->latexBabelPackage()=="a4j";
static bool isRussian = theTranslator->latexBabelPackage()=="russian";
static bool isGerman = theTranslator->latexBabelPackage()=="german";
if (str)
{
const unsigned char *p=(const unsigned char *)str;
......@@ -1058,6 +1059,12 @@ void LatexGenerator::docify(const char *str)
else
{ t << "$\\backslash$"; }
break;
case '"': if (isGerman) // " has a special meaning if German
// - Thomas Vesper
{ t << "\\char`\\\""; }
else
{ t << (char)c; }
break;
default:
if (isJapanese)
......@@ -1127,7 +1134,7 @@ void LatexGenerator::docify(const char *str)
case 219: t << "\\^{U}"; break;
case 220: t << "\\\"{U}"; break;
case 221: t << "\\'{Y}"; break;
case 223: t << "\"s "; break; // assumes german package
case 223: t << "\\ss "; break;
case 224: t << "\\`{a}"; break;
case 225: t << "\\'{a}"; break;
case 226: t << "\\^{a}"; break;
......
......@@ -251,6 +251,7 @@ MemberDef::MemberDef(const char *df,int dl,
enumDeclList=0;
scopeTAL=0;
membTAL=0;
initLines=0;
type=substituteClassNames(t);
args=substituteClassNames(a);
if (type.isEmpty()) decl=name()+args; else decl=type+" "+name()+args;
......@@ -911,36 +912,39 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//if (cd && (!isRelated() || templateArguments()!=0) &&
// ((al=scopeDefTemplateArguments()) || (al=cd->templateArguments()))
// )
if (scopeAl && !related) // class template prefix
if (!Config::hideScopeNames)
{
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,scopeAl);
ol.endMemberDocPrefixItem();
}
if (scopeAl && membAl) ol.docify(" ");
if (scopeAl && !related) // class template prefix
{
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,scopeAl);
ol.endMemberDocPrefixItem();
}
if (scopeAl && membAl) ol.docify(" ");
if (membAl) // function template prefix
{
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,membAl);
ol.endMemberDocPrefixItem();
}
if (cd)
{
QCString cName=cd->name();
//printf("cName=%s\n",cName.data());
int il=cName.find('<');
int ir=cName.findRev('>');
if (il!=-1 && ir!=-1 && ir>il)
if (membAl) // function template prefix
{
def=addTemplateNames(def,
cName.left(il), /* class without template spec */
cName.mid(il,ir-il+1) /* templ spec */
);
ol.startMemberDocPrefixItem();
writeTemplatePrefix(ol,membAl);
ol.endMemberDocPrefixItem();
}
else if (scopeAl)
if (cd)
{
def=addTemplateNames(def,cName,tempArgListToString(scopeAl));
QCString cName=cd->name();
//printf("cName=%s\n",cName.data());
int il=cName.find('<');
int ir=cName.findRev('>');
if (il!=-1 && ir!=-1 && ir>il)
{
def=addTemplateNames(def,
cName.left(il), /* class without template spec */
cName.mid(il,ir-il+1) /* templ spec */
);
}
else if (scopeAl)
{
def=addTemplateNames(def,cName,tempArgListToString(scopeAl));
}
}
}
ol.startMemberDocName();
......@@ -1296,7 +1300,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.endDescList();
}
// write reference to the source
writeSourceRef(ol,cname);
writeSourceDef(ol,cname);
writeSourceRefs(ol,cname);
ol.endIndent();
// enable LaTeX again
//if (Config::extractAllFlag && !hasDocs) ol.enable(OutputGenerator::Latex);
......@@ -1379,3 +1385,11 @@ bool MemberDef::visibleMemberGroup(bool hideNoHeader)
return memberGroup!=0 &&
(!hideNoHeader || memberGroup->header()!="[NOHEADER]");
}
QCString MemberDef::getScopeString() const
{
QCString result;
if (memberClass()) result=memberClass()->name();
else if (getNamespace()) result=getNamespace()->name();
return result;
}
......@@ -36,6 +36,12 @@ class ExampleDict;
class OutputList;
class GroupDef;
struct SourceReference
{
FileDef *fd;
QCString anchor;
};
class MemberDef : public Definition
{
public:
......@@ -84,7 +90,7 @@ class MemberDef : public Definition
const char *anchor() const { return anc; }
const QCString &initializer() const { return init; }
int initializerLines() const { return initLines; }
ClassDef *memberClass() { return classDef; }
ClassDef *memberClass() const { return classDef; }
Protection protection() const { return prot; }
Specifier virtualness() const { return virt; }
MemberType memberType() const { return mtype; }
......@@ -104,7 +110,7 @@ class MemberDef : public Definition
void setAnchor(const char *a) { anc=a; }
void setProtection(Protection p) { prot=p; }
void setMemberSpecifiers(int s) { memSpec=s; }
int getMemberSpecifiers() { return memSpec; }
int getMemberSpecifiers() const { return memSpec; }
void mergeMemberSpecifiers(int s) { memSpec|=s; }
void setInitializer(const char *i) { init=i;
init=init.stripWhiteSpace();
......@@ -123,8 +129,8 @@ class MemberDef : public Definition
// relation to other members
void setReimplements(MemberDef *md) { redefines=md; }
void insertReimplementedBy(MemberDef *md);
MemberDef *reimplements() { return redefines; }
MemberList *reimplementedBy() { return redefinedBy; }
MemberDef *reimplements() const { return redefines; }
MemberList *reimplementedBy() const { return redefinedBy; }
// enumeration specific members
void insertEnumField(MemberDef *md);
......@@ -134,11 +140,11 @@ class MemberDef : public Definition
void setEnumUsed() { eUsed=TRUE; }
bool enumUsed() const { return eUsed; }
OutputList *enumDecl() const { return enumDeclList; }
MemberList *enumFieldList() { return enumFields; }
MemberList *enumFieldList() const { return enumFields; }
void setDocumentedEnumValues(bool value) { docEnumValues=value; }
bool hasDocumentedEnumValues() const { return docEnumValues; }
void setAnonymousEnumType(MemberDef *md) { annEnumType = md; }
MemberDef *getAnonymousEnumType() { return annEnumType; }
MemberDef *getAnonymousEnumType() const { return annEnumType; }
// example related members
bool addExample(const char *anchor,const char *name,const char *file);
......@@ -175,7 +181,7 @@ class MemberDef : public Definition
//QCString getScopeTemplateNameString();
// namespace related members
NamespaceDef *getNamespace() { return nspace; }
NamespaceDef *getNamespace() const { return nspace; }
void setNamespace(NamespaceDef *nd) { nspace=nd; }
// member group related members
......@@ -186,12 +192,14 @@ class MemberDef : public Definition
void setFromAnnonymousScope(bool b) { annScope=b; }
void setFromAnnonymousMember(MemberDef *m) { annMemb=m; }
bool fromAnnonymousScope() { return annScope; }
bool annonymousDeclShown() { return annUsed; }
bool fromAnnonymousScope() const { return annScope; }
bool annonymousDeclShown() const { return annUsed; }
void setIndentDepth( int i) { indDepth=i; }
int indentDepth() { return indDepth; }
bool visibleMemberGroup(bool hideNoHeader);
QCString getScopeString() const;
private:
ClassDef *classDef; // member of or related to
......@@ -246,6 +254,7 @@ class MemberDef : public Definition
GroupDef *group; // group in which this member is in
// disable copying of member defs
MemberDef(const MemberDef &);
MemberDef &operator=(const MemberDef &);
......
......@@ -71,4 +71,11 @@ class MemberListIterator : public QListIterator<MemberDef>
MemberListIterator(const QList<MemberDef> &list);
};
class MemberDict : public QDict<MemberDef>
{
public:
MemberDict(int size) : QDict<MemberDef>(size) {}
~MemberDict() {}
};
#endif
......@@ -1524,6 +1524,11 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
}
}
<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"param"/{BN} {
QCString t=yytext;
if (t.contains('\n')>1 && insideItemList)
{
forceEndItemList();
}
endArgumentList();
if (!inParamBlock)
{
......@@ -1544,6 +1549,11 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
BEGIN(DocParam);
}
<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"retval"/{BN} {
QCString t=yytext;
if (t.contains('\n')>1 && insideItemList)
{
forceEndItemList();
}
endArgumentList();
if (!inRetValBlock)
{
......@@ -1564,6 +1574,11 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
BEGIN(DocParam);
}
<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}("exception"|"throw")s?/{BN} {
QCString t=yytext;
if (t.contains('\n')>1 && insideItemList)
{
forceEndItemList();
}
endArgumentList();
if (!inExceptionBlock)
{
......@@ -3238,7 +3253,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
}
<Curly>. { current->program += yytext ; }
<FindMembers>"("({BN}*{ID}{BN}*"::"{BN}*)*("*"{BN}*)+ {
<FindMembers>"("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+ {
current->bodyLine = yyLineNr;
lineCount();
addType(current);
......@@ -3800,6 +3815,13 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
lineCount();
BEGIN( ClassVar );
}
<ClassVar>{SCOPENAME}{BN}*/"(" {
addType(current);
current->name = yytext;
current->name = current->name.stripWhiteSpace();
lineCount();
BEGIN( FindMembers );
}
<ClassVar>{ID} {
if (insideIDL && strcmp(yytext,"switch")==0)
{
......@@ -4303,7 +4325,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
yyLineNr++;
}
<GroupDocArg1>{ID}(".html"?) {
<GroupDocArg1>{ID}(".html"?) { // the .html stuff is for Qt compatibility
current->name = yytext;
if (current->name.right(5)==".html")
current->name=current->name.left(current->name.length()-5);
......@@ -4331,6 +4353,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
newDocState();
}
<GroupDocArg2>"\n" {
yyLineNr++;
newDocState();
}
<ClassDocArg2>{FILE} {
......@@ -4640,7 +4663,8 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
);
}
<GroupName>\n {
yyLineNr++; BEGIN( lastGroupContext );
yyLineNr++;
BEGIN( lastGroupContext );
}
<ClassDoc,Doc>{B}*{CMD}("brief"|"short") {
lastBriefContext=YY_START;
......
......@@ -876,6 +876,16 @@ class Translator
{
return "Todo List";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.4
//////////////////////////////////////////////////////////////////////////
virtual QCString trReferencedBy()
{
return "Referenced by";
}
};
#endif
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
......@@ -2317,3 +2317,14 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
// scope.data(),templ.data(),result.data());
return result;
}
QCString stripScope(const char *name)
{
QCString result = name;
int i=result.findRev("::");
if (i!=-1)
{
result=result.right(result.length()-i-2);
}
return result;
}
......@@ -96,5 +96,6 @@ QCString convertNameToFile(const char *name);
void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName);
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
QCString stripScope(const char *name);
#endif
......@@ -11,7 +11,7 @@ TMAKE_CC = cc
TMAKE_CFLAGS = -n32 -mips3 LANG:bool=ON -woff 1209,1233,1314,1355,1375,1506
TMAKE_CFLAGS_WARN_ON = -fullwarn
TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000
TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB =
TMAKE_CFLAGS_YACC = -woff 1110,1174,3262
......
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