Commit 977ad9d3 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.16-20020630

parent 54bcd31f
DOXYGEN Version 1.2.16-20020623 DOXYGEN Version 1.2.16-20020630
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (23 June 2002) Dimitri van Heesch (30 June 2002)
DOXYGEN Version 1.2.16_20020623 DOXYGEN Version 1.2.16_20020630
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (23 June 2002) Dimitri van Heesch (dimitri@stack.nl) (30 June 2002)
1.2.16-20020623 1.2.16-20020630
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.16_20020623 Version: 1.2.16_20020630
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -2462,7 +2462,7 @@ QCString ClassDef::className() const ...@@ -2462,7 +2462,7 @@ QCString ClassDef::className() const
void ClassDef::addListReferences() void ClassDef::addListReferences()
{ {
addRefItem(todoId(),testId(),bugId(), addRefItem(specialListItems(),
theTranslator->trClass(TRUE,TRUE), theTranslator->trClass(TRUE,TRUE),
getOutputFileBase(),name() getOutputFileBase(),name()
); );
......
...@@ -1020,6 +1020,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1020,6 +1020,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
%x SkipSharp %x SkipSharp
%x ReadInclude %x ReadInclude
%x TemplDecl %x TemplDecl
%x CallEnd
%% %%
...@@ -1565,19 +1566,17 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1565,19 +1566,17 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext); g_code->codify(yytext);
if (--g_bracketCount<=0) if (--g_bracketCount<=0)
{ {
if (!g_insideBody) BEGIN( CallEnd );
{
g_theVarContext.popScope();
}
g_name.resize(0);g_args.resize(0);
g_parmType.resize(0);g_parmName.resize(0);
BEGIN( Body );
} }
} }
<CallEnd>[ \t\n]* { codifyLines(yytext); }
/*
<MemberCall2,FuncCall>")"[ \t\n]*[;:] { <MemberCall2,FuncCall>")"[ \t\n]*[;:] {
*/
<CallEnd>[;:] {
codifyLines(yytext); codifyLines(yytext);
g_bracketCount=0; g_bracketCount=0;
if (yytext[yyleng-1]==';') g_searchingForBody=FALSE; if (*yytext==';') g_searchingForBody=FALSE;
if (!g_inClass && !g_type.isEmpty()) if (!g_inClass && !g_type.isEmpty())
{ {
g_theVarContext.addVariable(g_type,g_name); g_theVarContext.addVariable(g_type,g_name);
...@@ -1585,7 +1584,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1585,7 +1584,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
g_theCallContext.popScope(); g_theCallContext.popScope();
g_theCallContext.setClass(0); g_theCallContext.setClass(0);
if (yytext[yyleng-1]==';' || g_insideBody) if (*yytext==';' || g_insideBody)
{ {
if (!g_insideBody) if (!g_insideBody)
{ {
...@@ -1600,7 +1599,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1600,7 +1599,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
BEGIN( SkipInits ); BEGIN( SkipInits );
} }
} }
/*
<MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" { <MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" {
*/
<CallEnd>({BN}"const"|"volatile")*{BN}*"{" {
if (g_insideBody) if (g_insideBody)
{ {
g_theVarContext.pushScope(); g_theVarContext.pushScope();
...@@ -1617,18 +1619,17 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1617,18 +1619,17 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
{ {
g_scopeStack.push(INNERBLOCK); g_scopeStack.push(INNERBLOCK);
} }
g_code->codify(")");
yytext[yyleng-1]='\0'; yytext[yyleng-1]='\0';
QCString cv(yytext+1); QCString cv(yytext);
if (!cv.stripWhiteSpace().isEmpty()) if (!cv.stripWhiteSpace().isEmpty())
{ {
startFontClass("keyword"); startFontClass("keyword");
codifyLines(yytext+1); codifyLines(yytext);
endFontClass(); endFontClass();
} }
else // just whitespace else // just whitespace
{ {
codifyLines(yytext+1); codifyLines(yytext);
} }
g_code->codify("{"); g_code->codify("{");
if (g_searchingForBody) if (g_searchingForBody)
...@@ -1641,6 +1642,16 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1641,6 +1642,16 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_type.resize(0); g_name.resize(0); g_type.resize(0); g_name.resize(0);
BEGIN( Body ); BEGIN( Body );
} }
<CallEnd>. {
unput(*yytext);
if (!g_insideBody)
{
g_theVarContext.popScope();
}
g_name.resize(0);g_args.resize(0);
g_parmType.resize(0);g_parmName.resize(0);
BEGIN( Body );
}
<SkipInits>";" { <SkipInits>";" {
g_code->codify(yytext); g_code->codify(yytext);
g_type.resize(0); g_name.resize(0); g_type.resize(0); g_name.resize(0);
......
...@@ -52,6 +52,7 @@ Definition::Definition(const char *df,int dl, ...@@ -52,6 +52,7 @@ Definition::Definition(const char *df,int dl,
m_bugId=0; m_bugId=0;
m_outerScope=Doxygen::globalScope; m_outerScope=Doxygen::globalScope;
m_partOfGroups=0; m_partOfGroups=0;
m_specialListItems=0;
} }
Definition::~Definition() Definition::~Definition()
...@@ -60,6 +61,7 @@ Definition::~Definition() ...@@ -60,6 +61,7 @@ Definition::~Definition()
delete m_sourceRefByDict; delete m_sourceRefByDict;
delete m_sourceRefsDict; delete m_sourceRefsDict;
delete m_partOfGroups; delete m_partOfGroups;
delete m_specialListItems;
} }
void Definition::addSectionsToDefinition(QList<QCString> *anchorList) void Definition::addSectionsToDefinition(QList<QCString> *anchorList)
...@@ -561,4 +563,44 @@ void Definition::makePartOfGroup(GroupDef *gd) ...@@ -561,4 +563,44 @@ void Definition::makePartOfGroup(GroupDef *gd)
m_partOfGroups->append(gd); m_partOfGroups->append(gd);
} }
void Definition::setRefItems(const QList<ListItemInfo> *sli)
{
if (sli)
{
// deep copy the list
if (m_specialListItems==0)
{
m_specialListItems=new QList<ListItemInfo>;
m_specialListItems->setAutoDelete(TRUE);
}
QListIterator<ListItemInfo> slii(*sli);
ListItemInfo *lii;
for (slii.toFirst();(lii=slii.current());++slii)
{
m_specialListItems->append(new ListItemInfo(*lii));
}
}
}
int Definition::getSpecialListId(const char *listName) const
{
if (m_specialListItems)
{
QListIterator<ListItemInfo> slii(*m_specialListItems);
ListItemInfo *lii;
for (slii.toFirst();(lii=slii.current());++slii)
{
if (strcmp(lii->type,listName)==0)
{
return lii->itemId;
}
}
}
return -1;
}
const QList<ListItemInfo> *Definition::specialListItems() const
{
return m_specialListItems;
}
...@@ -30,6 +30,7 @@ class MemberSDict; ...@@ -30,6 +30,7 @@ class MemberSDict;
class MemberDef; class MemberDef;
class GroupDef; class GroupDef;
class GroupList; class GroupList;
class ListItemInfo;
/*! The common base class of all entity definitions found in the sources. */ /*! The common base class of all entity definitions found in the sources. */
class Definition class Definition
...@@ -103,15 +104,17 @@ class Definition ...@@ -103,15 +104,17 @@ class Definition
void addSourceReferencedBy(MemberDef *d); void addSourceReferencedBy(MemberDef *d);
void addSourceReferences(MemberDef *d); void addSourceReferences(MemberDef *d);
void setRefItems(int todoId,int testId,int bugId) //{
{ // if (todoId!=0) m_todoId=todoId;
if (todoId!=0) m_todoId=todoId; // if (testId!=0) m_testId=testId;
if (testId!=0) m_testId=testId; // if (bugId!=0) m_bugId=bugId;
if (bugId!=0) m_bugId=bugId; //}
} //int todoId() const { return m_todoId; }
int todoId() const { return m_todoId; } //int testId() const { return m_testId; }
int testId() const { return m_testId; } //int bugId() const { return m_bugId; }
int bugId() const { return m_bugId; } void setRefItems(const QList<ListItemInfo> *sli);
int getSpecialListId(const char *listName) const;
const QList<ListItemInfo> *specialListItems() const;
/*! returns the file in which this definition was found */ /*! returns the file in which this definition was found */
QCString getDefFileName() const { return m_defFileName; } QCString getDefFileName() const { return m_defFileName; }
...@@ -165,7 +168,7 @@ class Definition ...@@ -165,7 +168,7 @@ class Definition
QCString m_docFile; QCString m_docFile;
int m_briefLine; int m_briefLine;
QCString m_briefFile; QCString m_briefFile;
QList<ListItemInfo> *m_specialListItems;
}; };
class DefinitionList : public QList<Definition> class DefinitionList : public QList<Definition>
......
...@@ -1071,6 +1071,40 @@ bool findDocsForMemberOrCompound(const char *commandName, ...@@ -1071,6 +1071,40 @@ bool findDocsForMemberOrCompound(const char *commandName,
return FALSE; return FALSE;
} }
/* ----------------------------------------------------------------- */
static void writeSpecialItem(const char *commandString)
{
QCString cmd = commandString; // format "\test 20" or "\todo 4"
int sepPos=cmd.find(' ');
QCString listName = cmd.mid(1,cmd.length()-sepPos-1); // i.e. "test" or "todo"
RefList *refList = Doxygen::specialLists->find(cmd.mid(1,sepPos-1));
ASSERT(refList!=0);
if (Config_getBool(refList->optionName()))
{
QCString numStr=cmd.right(cmd.length()-sepPos-1); // i.e. "20" or "4"
bool ok; int num = numStr.toUInt(&ok);
RefItem *item = refList->getRefItem(num);
ASSERT(item!=0);
if (insideItemList)
{
forceEndItemList();
}
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("P");
outDoc->startSimpleSect(refList->sectionType(),
refList->listName(),
item->listAnchor,
refList->sectionTitle()+": "
);
outDoc->writeDescItem();
internalParseDocument(item->text);
outDoc->endSimpleSect();
currentListIndent.pop();
}
}
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
#undef YY_INPUT #undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
...@@ -1655,71 +1689,10 @@ LINKMASK [a-z_A-Z0-9:#.,~&*/\[\]<>()\-\+]+({B}*("const"|"volatile"))? ...@@ -1655,71 +1689,10 @@ LINKMASK [a-z_A-Z0-9:#.,~&*/\[\]<>()\-\+]+({B}*("const"|"volatile"))?
outDoc->writeDescItem(); outDoc->writeDescItem();
} }
} }
<DocScan>"\\todo "[0-9]+ { // this tag is generated in an earlier pass <DocScan>"\\todo "[0-9]+ | /* generated labels */
if (Config_getBool("GENERATE_TODOLIST")) <DocScan>"\\test "[0-9]+ |
{ <DocScan>"\\bug "[0-9]+ {
QCString numStr=yytext; writeSpecialItem(yytext);
numStr=numStr.right(numStr.length()-6);
bool ok; int num = numStr.toUInt(&ok);
RefItem *item = todoList.getRefItem(num);
ASSERT(item!=0);
if (insideItemList)
{
forceEndItemList();
}
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("P");
outDoc->startSimpleSect(BaseOutputDocInterface::Todo,"todo",item->listAnchor,theTranslator->trTodo()+": ");
outDoc->writeDescItem();
internalParseDocument(item->text);
outDoc->endSimpleSect();
currentListIndent.pop();
}
}
<DocScan>"\\test "[0-9]+ { // this tag is generated in an earlier pass
if (Config_getBool("GENERATE_TESTLIST"))
{
QCString numStr=yytext;
numStr=numStr.right(numStr.length()-6);
bool ok; int num = numStr.toUInt(&ok);
RefItem *item = testList.getRefItem(num);
ASSERT(item!=0);
if (insideItemList)
{
forceEndItemList();
}
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("P");
outDoc->startSimpleSect(BaseOutputDocInterface::Test,"test",item->listAnchor,theTranslator->trTest()+": ");
outDoc->writeDescItem();
internalParseDocument(item->text);
outDoc->endSimpleSect();
currentListIndent.pop();
}
}
<DocScan>"\\bug "[0-9]+ { // this tag is generated in an earlier pass
if (Config_getBool("GENERATE_BUGLIST"))
{
QCString numStr=yytext;
numStr=numStr.right(numStr.length()-5);
bool ok; int num = numStr.toUInt(&ok);
RefItem *item = bugList.getRefItem(num);
ASSERT(item!=0);
if (insideItemList)
{
forceEndItemList();
}
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("P");
outDoc->startSimpleSect(BaseOutputDocInterface::Bug,"bug",item->listAnchor,theTranslator->trBug()+": ");
outDoc->writeDescItem();
internalParseDocument(item->text);
outDoc->endSimpleSect();
currentListIndent.pop();
}
} }
<DocScan>{CMD}"deprecated"{BSEP} { <DocScan>{CMD}"deprecated"{BSEP} {
if (insideItemList) if (insideItemList)
......
This diff is collapsed.
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "formula.h" #include "formula.h"
#include "section.h" #include "section.h"
#include "membergroup.h" #include "membergroup.h"
#include "reflist.h"
//#include "packagedef.h" //#include "packagedef.h"
class PageSList; class PageSList;
...@@ -81,7 +82,6 @@ class Doxygen ...@@ -81,7 +82,6 @@ class Doxygen
static QTextStream tagFile; static QTextStream tagFile;
static SectionDict sectionDict; static SectionDict sectionDict;
static StringDict namespaceAliasDict; static StringDict namespaceAliasDict;
//static GroupList groupList;
static GroupSDict groupSDict; static GroupSDict groupSDict;
static NamespaceSDict namespaceSDict; static NamespaceSDict namespaceSDict;
static FormulaList formulaList; static FormulaList formulaList;
...@@ -92,8 +92,8 @@ class Doxygen ...@@ -92,8 +92,8 @@ class Doxygen
static QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading static QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading
static QIntDict<QCString> memberDocDict; // dictionary of the member groups heading static QIntDict<QCString> memberDocDict; // dictionary of the member groups heading
static QDict<void> expandAsDefinedDict; static QDict<void> expandAsDefinedDict;
//static PackageSDict packageDict;
static NamespaceDef *globalScope; static NamespaceDef *globalScope;
static QDict<RefList> *specialLists; // array of special lists: todo, test, bug ...
}; };
void initDoxygen(); void initDoxygen();
......
...@@ -41,6 +41,7 @@ Entry::Entry() ...@@ -41,6 +41,7 @@ Entry::Entry()
//mtArgList = 0; //mtArgList = 0;
mGrpId = -1; mGrpId = -1;
tagInfo = 0; tagInfo = 0;
sli = 0;
groupDocType = GROUPDOC_NORMAL; groupDocType = GROUPDOC_NORMAL;
reset(); reset();
} }
...@@ -80,9 +81,9 @@ Entry::Entry(const Entry &e) ...@@ -80,9 +81,9 @@ Entry::Entry(const Entry &e)
memSpec = e.memSpec; memSpec = e.memSpec;
initializer = e.initializer; initializer = e.initializer;
initLines = e.initLines; initLines = e.initLines;
todoId = e.todoId; //todoId = e.todoId;
testId = e.testId; //testId = e.testId;
bugId = e.bugId; //bugId = e.bugId;
tagInfo = e.tagInfo; tagInfo = e.tagInfo;
sublist = new QList<Entry>; sublist = new QList<Entry>;
sublist->setAutoDelete(TRUE); sublist->setAutoDelete(TRUE);
...@@ -158,7 +159,21 @@ Entry::Entry(const Entry &e) ...@@ -158,7 +159,21 @@ Entry::Entry(const Entry &e)
// //printf("appending argument %s %s\n",a->type.data(),a->name.data()); // //printf("appending argument %s %s\n",a->type.data(),a->name.data());
// } // }
//} //}
if (e.sli)
{
sli = new QList<ListItemInfo>;
sli->setAutoDelete(TRUE);
QListIterator<ListItemInfo> slii(*e.sli);
ListItemInfo *ili;
for (slii.toFirst();(ili=slii.current());++slii)
{
sli->append(new ListItemInfo(*ili));
}
}
else
{
sli=0;
}
} }
Entry::~Entry() Entry::~Entry()
...@@ -173,6 +188,7 @@ Entry::~Entry() ...@@ -173,6 +188,7 @@ Entry::~Entry()
delete tArgLists; delete tArgLists;
//delete mtArgList; //delete mtArgList;
delete tagInfo; delete tagInfo;
delete sli;
num--; num--;
} }
...@@ -224,9 +240,9 @@ void Entry::reset() ...@@ -224,9 +240,9 @@ void Entry::reset()
bodyLine = -1; bodyLine = -1;
endBodyLine = -1; endBodyLine = -1;
mGrpId = -1; mGrpId = -1;
todoId = 0; //todoId = 0;
testId = 0; //testId = 0;
bugId = 0; //bugId = 0;
section = EMPTY_SEC; section = EMPTY_SEC;
mtype = Method; mtype = Method;
virt = Normal; virt = Normal;
...@@ -244,6 +260,7 @@ void Entry::reset() ...@@ -244,6 +260,7 @@ void Entry::reset()
argList->clear(); argList->clear();
if (tagInfo) { delete tagInfo; tagInfo=0; } if (tagInfo) { delete tagInfo; tagInfo=0; }
if (tArgLists) { delete tArgLists; tArgLists=0; } if (tArgLists) { delete tArgLists; tArgLists=0; }
if (sli) { delete sli; sli=0; }
//if (mtArgList) { delete mtArgList; mtArgList=0; } //if (mtArgList) { delete mtArgList; mtArgList=0; }
} }
...@@ -351,3 +368,17 @@ bool ArgumentList::hasDocumentation() const ...@@ -351,3 +368,17 @@ bool ArgumentList::hasDocumentation() const
} }
return hasDocs; return hasDocs;
} }
void Entry::addSpecialListItem(const char *listName,int itemId)
{
if (sli==0)
{
sli = new QList<ListItemInfo>;
sli->setAutoDelete(TRUE);
}
ListItemInfo *ili=new ListItemInfo;
ili->type = listName;
ili->itemId = itemId;
sli->append(ili);
}
...@@ -25,6 +25,12 @@ enum Protection { Public, Protected, Private } ; ...@@ -25,6 +25,12 @@ enum Protection { Public, Protected, Private } ;
enum Specifier { Normal, Virtual, Pure } ; enum Specifier { Normal, Virtual, Pure } ;
enum MethodTypes { Method, Signal, Slot, DCOP, Property }; enum MethodTypes { Method, Signal, Slot, DCOP, Property };
struct ListItemInfo
{
const char *type;
int itemId;
};
/*! \brief This class stores information about an inheritance relation /*! \brief This class stores information about an inheritance relation
*/ */
struct BaseInfo struct BaseInfo
...@@ -229,6 +235,7 @@ class Entry ...@@ -229,6 +235,7 @@ class Entry
Entry(const Entry &); Entry(const Entry &);
~Entry(); ~Entry();
int getSize(); int getSize();
void addSpecialListItem(const char *listName,int index);
/*! Adds entry \e as a child to this entry */ /*! Adds entry \e as a child to this entry */
void addSubEntry (Entry* e) ; void addSubEntry (Entry* e) ;
...@@ -276,9 +283,10 @@ class Entry ...@@ -276,9 +283,10 @@ class Entry
QList<QCString> *anchors; //!< list of anchors defined in this entry QList<QCString> *anchors; //!< list of anchors defined in this entry
QCString fileName; //!< file this entry was extracted from QCString fileName; //!< file this entry was extracted from
int startLine; //!< start line of entry in the source int startLine; //!< start line of entry in the source
int todoId; //!< id of the todo list item of this entry //int todoId; //!< id of the todo list item of this entry
int testId; //!< id of the test list item of this entry //int testId; //!< id of the test list item of this entry
int bugId; //!< id of the bug list item of this entry //int bugId; //!< id of the bug list item of this entry
QList<ListItemInfo> *sli; //!< special lists (test/todo/bug/..) this entry is in
TagInfo *tagInfo; //!< tag file info TagInfo *tagInfo; //!< tag file info
static int num; //!< counts the total number of entries static int num; //!< counts the total number of entries
enum enum
......
...@@ -660,7 +660,7 @@ bool FileDef::generateSourceFile() const ...@@ -660,7 +660,7 @@ bool FileDef::generateSourceFile() const
void FileDef::addListReferences() void FileDef::addListReferences()
{ {
addRefItem(todoId(),testId(),bugId(), addRefItem(specialListItems(),
theTranslator->trFile(TRUE,TRUE), theTranslator->trFile(TRUE,TRUE),
getOutputFileBase(),name() getOutputFileBase(),name()
); );
......
...@@ -754,7 +754,7 @@ QCString GroupDef::getOutputFileBase() const ...@@ -754,7 +754,7 @@ QCString GroupDef::getOutputFileBase() const
void GroupDef::addListReferences() void GroupDef::addListReferences()
{ {
addRefItem(todoId(),testId(),bugId(), addRefItem(specialListItems(),
theTranslator->trGroup(TRUE,TRUE), theTranslator->trGroup(TRUE,TRUE),
getOutputFileBase(),name() getOutputFileBase(),name()
); );
......
...@@ -1703,7 +1703,7 @@ void MemberDef::addListReference(Definition *d) ...@@ -1703,7 +1703,7 @@ void MemberDef::addListReference(Definition *d)
} }
} }
//printf("*** addListReference %s todo=%d test=%d bug=%d\n",name().data(),todoId(),testId(),bugId()); //printf("*** addListReference %s todo=%d test=%d bug=%d\n",name().data(),todoId(),testId(),bugId());
addRefItem(todoId(),testId(),bugId(),memLabel, addRefItem(specialListItems(),memLabel,
d->getOutputFileBase()+":"+anchor(),memName,argsString()); d->getOutputFileBase()+":"+anchor(),memName,argsString());
} }
......
...@@ -364,7 +364,7 @@ Definition *NamespaceDef::findInnerCompound(const char *n) ...@@ -364,7 +364,7 @@ Definition *NamespaceDef::findInnerCompound(const char *n)
void NamespaceDef::addListReferences() void NamespaceDef::addListReferences()
{ {
addRefItem(todoId(),testId(),bugId(), addRefItem(specialListItems(),
theTranslator->trNamespace(TRUE,TRUE), theTranslator->trNamespace(TRUE,TRUE),
getOutputFileBase(),name() getOutputFileBase(),name()
); );
......
...@@ -224,8 +224,6 @@ class BaseOutputDocInterface ...@@ -224,8 +224,6 @@ class BaseOutputDocInterface
virtual void writeRing(char) = 0; virtual void writeRing(char) = 0;
virtual void writeSharpS() = 0; virtual void writeSharpS() = 0;
virtual void writeCCedil(char) = 0; virtual void writeCCedil(char) = 0;
virtual void startDescList(SectionTypes t) = 0;
virtual void endDescList() = 0;
virtual void startSimpleSect(SectionTypes t,const char *file, virtual void startSimpleSect(SectionTypes t,const char *file,
const char *anchor,const char *title) = 0; const char *anchor,const char *title) = 0;
virtual void endSimpleSect() = 0; virtual void endSimpleSect() = 0;
......
...@@ -327,10 +327,6 @@ class OutputList : public OutputDocInterface ...@@ -327,10 +327,6 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberDescription); } { forall(&OutputGenerator::startMemberDescription); }
void endMemberDescription() void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); } { forall(&OutputGenerator::endMemberDescription); }
void startDescList(SectionTypes t)
{ forall(&OutputGenerator::startDescList,t); }
void endDescList()
{ forall(&OutputGenerator::endDescList); }
void startSimpleSect(SectionTypes t,const char *file,const char *anchor, void startSimpleSect(SectionTypes t,const char *file,const char *anchor,
const char *title) const char *title)
{ forall(&OutputGenerator::startSimpleSect,t,file,anchor,title); } { forall(&OutputGenerator::startSimpleSect,t,file,anchor,title); }
......
...@@ -25,7 +25,7 @@ class PageInfo ...@@ -25,7 +25,7 @@ class PageInfo
public: public:
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) : PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
defFileName(f), defLine(l), name(n), defFileName(f), defLine(l), name(n),
doc(d), title(t), todoId(0), testId(0),sectionDict(0), m_inGroup(0) {} doc(d), title(t), sectionDict(0),specialListItems(0),m_inGroup(0) {}
// where the page definition was found // where the page definition was found
QCString defFileName; QCString defFileName;
...@@ -87,16 +87,13 @@ class PageInfo ...@@ -87,16 +87,13 @@ class PageInfo
} }
} }
// ids
int todoId;
int testId;
int bugId;
void makePartOfGroup(GroupDef *gd) { m_inGroup = gd; } void makePartOfGroup(GroupDef *gd) { m_inGroup = gd; }
GroupDef *getGroupDef() const { return m_inGroup; } GroupDef *getGroupDef() const { return m_inGroup; }
// is this page part of a group // is this page part of a group
SectionDict *sectionDict; SectionDict *sectionDict;
QList<ListItemInfo> *specialListItems;
private: private:
GroupDef *m_inGroup; GroupDef *m_inGroup;
......
...@@ -1106,7 +1106,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1106,7 +1106,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(CopyLine); BEGIN(CopyLine);
} }
} }
<CopyLine>"extern"{BN}*"\"C\""*{BN}*"{" { <CopyLine>"extern"{BN}{0,80}"\"C\""*{BN}{0,80}"{" {
QCString text=yytext; QCString text=yytext;
g_yyLineNr+=text.contains('\n'); g_yyLineNr+=text.contains('\n');
outputArray(yytext,yyleng); outputArray(yytext,yyleng);
...@@ -1148,7 +1148,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1148,7 +1148,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputChar(*yytext); outputChar(*yytext);
BEGIN( CopyLine ); BEGIN( CopyLine );
} }
<CopyLine>{ID}/{BN}*"(" { <CopyLine>{ID}/{BN}{0,80}"(" {
Define *def=0; Define *def=0;
//def=g_fileDefineDict->find(yytext); //def=g_fileDefineDict->find(yytext);
//printf("Search for define %s found=%d g_includeStack.isEmpty()=%d " //printf("Search for define %s found=%d g_includeStack.isEmpty()=%d "
......
...@@ -18,19 +18,33 @@ ...@@ -18,19 +18,33 @@
#include "reflist.h" #include "reflist.h"
#if 0
/*! The one and only todo list */ /*! The one and only todo list */
RefList todoList; RefList todoList;
/*! The test criteria list */ /*! The test criteria list */
RefList testList; RefList testList;
/*! The bug list */ /*! The bug list */
RefList bugList; RefList bugList;
#endif
/*! Create a todo list */ /*! Create a list of items that are cross referenced with documentation blocks
RefList::RefList() * @param listName String representing the name of the list.
* @param optionName String representation of the option enabling the list.
* @param pageTitle String representing the title of the list page.
* @param secTitle String representing the title of the section.
* @param type Type of the section.
*/
RefList::RefList(const char *listName,const char *optionName,const char *pageTitle,
const char *secTitle,BaseOutputDocInterface::SectionTypes type)
{ {
m_dict = 0; m_dict = 0;
m_dictIterator = 0; m_dictIterator = 0;
m_id = 0; m_id = 0;
m_listName = listName;
m_optionName = optionName;
m_pageTitle = pageTitle;
m_secTitle = secTitle;
m_type = type;
} }
/*! Destroy the todo list. Currently not called! */ /*! Destroy the todo list. Currently not called! */
...@@ -84,3 +98,29 @@ RefItem *RefList::getNextRefItem() ...@@ -84,3 +98,29 @@ RefItem *RefList::getNextRefItem()
return m_dictIterator ? m_dictIterator->operator++() : 0; return m_dictIterator ? m_dictIterator->operator++() : 0;
} }
/*! Returns the name of the list as set in the constructor. */
QCString RefList::listName() const
{
return m_listName;
}
QCString RefList::optionName() const
{
return m_optionName;
}
QCString RefList::pageTitle() const
{
return m_pageTitle;
}
QCString RefList::sectionTitle() const
{
return m_secTitle;
}
BaseOutputDocInterface::SectionTypes RefList::sectionType() const
{
return m_type;
}
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "qtbc.h" #include "qtbc.h"
#include <qintdict.h> #include <qintdict.h>
#include "outputgen.h"
/*! This struct represents an item in the list of references. */ /*! This struct represents an item in the list of references. */
struct RefItem struct RefItem
...@@ -39,18 +40,31 @@ class RefList ...@@ -39,18 +40,31 @@ class RefList
RefItem *getRefItem(int todoItemId); RefItem *getRefItem(int todoItemId);
RefItem *getFirstRefItem(); RefItem *getFirstRefItem();
RefItem *getNextRefItem(); RefItem *getNextRefItem();
QCString listName() const;
QCString optionName() const;
QCString pageTitle() const;
QCString sectionTitle() const;
BaseOutputDocInterface::SectionTypes sectionType() const;
RefList(); RefList(const char *listName,const char *optionName,
const char *pageTitle,const char *secTitle,
BaseOutputDocInterface::SectionTypes type
);
~RefList(); ~RefList();
private: private:
int m_id; int m_id;
QCString m_listName;
QCString m_optionName;
QCString m_pageTitle;
QCString m_secTitle;
QIntDict<RefItem> *m_dict; QIntDict<RefItem> *m_dict;
QIntDictIterator<RefItem> *m_dictIterator; QIntDictIterator<RefItem> *m_dictIterator;
BaseOutputDocInterface::SectionTypes m_type;
}; };
extern RefList todoList; //extern RefList todoList;
extern RefList testList; //extern RefList testList;
extern RefList bugList; //extern RefList bugList;
#endif #endif
...@@ -42,13 +42,13 @@ ...@@ -42,13 +42,13 @@
const int indentLevels = 10; const int indentLevels = 10;
struct ListItemInfo struct RTFListItemInfo
{ {
bool isEnum; bool isEnum;
int number; int number;
}; };
static ListItemInfo listItemInfo[indentLevels]; static RTFListItemInfo listItemInfo[indentLevels];
static QCString title; static QCString title;
static QCString subject; static QCString subject;
static QCString comments; static QCString comments;
......
This diff is collapsed.
...@@ -3375,7 +3375,8 @@ found: ...@@ -3375,7 +3375,8 @@ found:
void addRelatedPage(const char *name,const QCString &ptitle, void addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,QList<QCString> *anchors, const QCString &doc,QList<QCString> *anchors,
const char *fileName,int startLine, const char *fileName,int startLine,
int todoId,int testId,int bugId,GroupDef *gd, const QList<ListItemInfo> *sli,
GroupDef *gd,
TagInfo *tagInfo TagInfo *tagInfo
) )
{ {
...@@ -3395,9 +3396,22 @@ void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -3395,9 +3396,22 @@ void addRelatedPage(const char *name,const QCString &ptitle,
QCString title=ptitle.stripWhiteSpace(); QCString title=ptitle.stripWhiteSpace();
pi=new PageInfo(fileName,startLine,baseName,doc,title); pi=new PageInfo(fileName,startLine,baseName,doc,title);
pi->todoId=todoId;
pi->testId=testId; if (sli)
pi->bugId=bugId; {
if (pi->specialListItems==0)
{
pi->specialListItems=new QList<ListItemInfo>;
pi->specialListItems->setAutoDelete(TRUE);
}
QListIterator<ListItemInfo> slii(*sli);
ListItemInfo *lii;
for (slii.toFirst();(lii=slii.current());++slii)
{
pi->specialListItems->append(new ListItemInfo(*lii));
}
}
if (tagInfo) if (tagInfo)
{ {
pi->reference = tagInfo->tagName; pi->reference = tagInfo->tagName;
...@@ -3447,23 +3461,27 @@ void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -3447,23 +3461,27 @@ void addRelatedPage(const char *name,const QCString &ptitle,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void addRefItem(int todoId,int testId,int bugId,const char *prefix, void addRefItem(const QList<ListItemInfo> *sli,
const char *prefix,
const char *name,const char *title,const char *args) const char *name,const char *title,const char *args)
{ {
if (sli)
{
QListIterator<ListItemInfo> slii(*sli);
ListItemInfo *lii;
for (slii.toFirst();(lii=slii.current());++slii)
{
RefList *refList = Doxygen::specialLists->find(lii->type);
ASSERT(refList!=0);
//printf("addRefItem(%s) todoId=%d testId=%d bugId=%d\n",name,todoId,testId,bugId); //printf("addRefItem(%s) todoId=%d testId=%d bugId=%d\n",name,todoId,testId,bugId);
//////////////////////////////////////////////////////////// if (Config_getBool(refList->optionName()))
// add item to the todo list
////////////////////////////////////////////////////////////
if (todoId>0 && Config_getBool("GENERATE_TODOLIST"))
{ {
RefItem *item = todoList.getRefItem(todoId); RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0); ASSERT(item!=0);
if (item->written) return; if (item->written) return;
QCString doc; QCString doc(1000);
doc += "<dl><dt>\\anchor "; doc += "<dl><dt>\\anchor ";
doc += item->listAnchor; doc += item->listAnchor;
doc += "\n"; doc += "\n";
...@@ -3478,69 +3496,10 @@ void addRefItem(int todoId,int testId,int bugId,const char *prefix, ...@@ -3478,69 +3496,10 @@ void addRefItem(int todoId,int testId,int bugId,const char *prefix,
doc += item->text; doc += item->text;
doc += "</dd></dl>\n"; doc += "</dd></dl>\n";
//printf("Todo page: %s\n",doc.data()); //printf("Todo page: %s\n",doc.data());
addRelatedPage("todo",theTranslator->trTodoList(),doc,0,"generated",1,0,0,0); addRelatedPage(refList->listName(),refList->pageTitle(),doc,0,"generated",1,0,0,0);
item->written=TRUE; item->written=TRUE;
} }
////////////////////////////////////////////////////////////
// add item to the test list
////////////////////////////////////////////////////////////
if (testId>0 && Config_getBool("GENERATE_TESTLIST"))
{
RefItem *item = testList.getRefItem(testId);
ASSERT(item!=0);
if (item->written) return;
QCString doc;
doc += "<dl><dt>\\anchor ";
doc += item->listAnchor;
doc += "\n";
doc += prefix;
doc += " \\_internalref ";
doc += name;
doc += " \"";
doc += title;
doc += "\"";
if (args) doc += args;
doc += "</dt>\n<dd>";
doc += item->text;
doc += "</dd></dl>\n";
//printf("Test page: %s\n",doc.data());
addRelatedPage("test",theTranslator->trTestList(),doc,0,"generated",1,0,0,0);
item->written=TRUE;
} }
////////////////////////////////////////////////////////////
// add item to the bug list
////////////////////////////////////////////////////////////
if (bugId>0 && Config_getBool("GENERATE_BUGLIST"))
{
RefItem *item = bugList.getRefItem(bugId);
ASSERT(item!=0);
if (item->written) return;
QCString doc;
doc += "<dl><dt>\\anchor ";
doc += item->listAnchor;
doc += "\n";
doc += prefix;
doc += " \\_internalref ";
doc += name;
doc += " \"";
doc += title;
doc += "\"";
if (args) doc += args;
doc += "</dt>\n<dd>";
doc += item->text;
doc += "</dd></dl>\n";
//printf("Bug page: %s\n",doc.data());
addRelatedPage("bug",theTranslator->trBugList(),doc,0,"generated",1,0,0,0);
item->written=TRUE;
} }
} }
......
...@@ -43,6 +43,7 @@ class MemberGroupSDict; ...@@ -43,6 +43,7 @@ class MemberGroupSDict;
class Definition; class Definition;
struct TagInfo; struct TagInfo;
class MemberNameInfoSDict; class MemberNameInfoSDict;
class ListItemInfo;
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -169,12 +170,13 @@ QCString resolveTypeDef(Definition *d,const QCString &name, ...@@ -169,12 +170,13 @@ QCString resolveTypeDef(Definition *d,const QCString &name,
QCString mergeScopes(const QCString &leftScope,const QCString &rightScope); QCString mergeScopes(const QCString &leftScope,const QCString &rightScope);
int getScopeFragment(const QCString &s,int p,int *l); int getScopeFragment(const QCString &s,int p,int *l);
int filterCRLF(char *buf,int len); int filterCRLF(char *buf,int len);
void addRefItem(int todoId,int testId,int bugId,const char *prefix, void addRefItem(const QList<ListItemInfo> *sli,const char *prefix,
const char *name,const char *title,const char *args=0); const char *name,const char *title,const char *args=0);
void addRelatedPage(const char *name,const QCString &ptitle, void addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,QList<QCString> *anchors, const QCString &doc,QList<QCString> *anchors,
const char *fileName,int startLine, const char *fileName,int startLine,
int todoId,int testId,int bugId,GroupDef *gd=0, const QList<ListItemInfo> *sli,
GroupDef *gd=0,
TagInfo *tagInfo=0 TagInfo *tagInfo=0
); );
QCString escapeCharsInString(const char *name,bool allowDots); QCString escapeCharsInString(const char *name,bool allowDots);
......
...@@ -429,7 +429,6 @@ class XMLGenerator : public OutputDocInterface ...@@ -429,7 +429,6 @@ class XMLGenerator : public OutputDocInterface
XML_DB(("(startSimpleSect)\n")); XML_DB(("(startSimpleSect)\n"));
m_t << "<simplesect kind=\"" << sectionTypeToString(st) << "\">"; m_t << "<simplesect kind=\"" << sectionTypeToString(st) << "\">";
startNestedPar(); startNestedPar();
m_inParStack.top() = TRUE;
} }
void endSimpleSect() void endSimpleSect()
{ {
......
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