Commit 46570cfd authored by dimitri's avatar dimitri

Release-1.2.16-20020630

parent c454a540
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)
......
...@@ -110,6 +110,9 @@ PageInfo *Doxygen::mainPage = 0; ...@@ -110,6 +110,9 @@ PageInfo *Doxygen::mainPage = 0;
QTextStream Doxygen::tagFile; QTextStream Doxygen::tagFile;
NamespaceDef *Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globalScope>"); NamespaceDef *Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globalScope>");
QDict<RefList> *Doxygen::specialLists = new QDict<RefList>; // dictionary of cross-referenced item lists
static StringList inputFiles; static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections static StringDict excludeNameDict(1009); // sections
static QDict<void> compoundKeywordDict(7); // keywords recognised as compounds static QDict<void> compoundKeywordDict(7); // keywords recognised as compounds
...@@ -198,8 +201,9 @@ static void addRelatedPage(Entry *root) ...@@ -198,8 +201,9 @@ static void addRelatedPage(Entry *root)
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict[g->groupname])) break; if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict[g->groupname])) break;
} }
addRelatedPage(root->name,root->args,root->doc,root->anchors, addRelatedPage(root->name,root->args,root->doc,root->anchors,
root->fileName,root->startLine,root->todoId, root->fileName,root->startLine,
root->testId,root->bugId,gd,root->tagInfo root->sli,
gd,root->tagInfo
); );
} }
...@@ -236,7 +240,7 @@ static void buildGroupList(Entry *root) ...@@ -236,7 +240,7 @@ static void buildGroupList(Entry *root)
gd->documentation() + "\n\n" + root->doc, gd->documentation() + "\n\n" + root->doc,
root->docFile, root->docLine ); root->docFile, root->docLine );
gd->addSectionsToDefinition(root->anchors); gd->addSectionsToDefinition(root->anchors);
gd->setRefItems(root->todoId,root->testId,root->bugId); gd->setRefItems(root->sli);
addGroupToGroups(root,gd); addGroupToGroups(root,gd);
} }
} }
...@@ -251,7 +255,7 @@ static void buildGroupList(Entry *root) ...@@ -251,7 +255,7 @@ static void buildGroupList(Entry *root)
gd->setDocumentation(root->doc,root->docFile,root->docLine); gd->setDocumentation(root->doc,root->docFile,root->docLine);
gd->addSectionsToDefinition(root->anchors); gd->addSectionsToDefinition(root->anchors);
Doxygen::groupSDict.append(root->name,gd); Doxygen::groupSDict.append(root->name,gd);
gd->setRefItems(root->todoId,root->testId,root->bugId); gd->setRefItems(root->sli);
} }
} }
EntryListIterator eli(*root->sublist); EntryListIterator eli(*root->sublist);
...@@ -312,7 +316,7 @@ static void buildFileList(Entry *root) ...@@ -312,7 +316,7 @@ static void buildFileList(Entry *root)
fd->setDocumentation(root->doc,root->docFile,root->docLine,FALSE); fd->setDocumentation(root->doc,root->docFile,root->docLine,FALSE);
fd->setBriefDescription(root->brief,root->briefFile,root->briefLine); fd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
fd->addSectionsToDefinition(root->anchors); fd->addSectionsToDefinition(root->anchors);
fd->setRefItems(root->todoId,root->testId,root->bugId); fd->setRefItems(root->sli);
QListIterator<Grouping> gli(*root->groups); QListIterator<Grouping> gli(*root->groups);
Grouping *g; Grouping *g;
for (;(g=gli.current());++gli) for (;(g=gli.current());++gli)
...@@ -628,7 +632,7 @@ static void addClassToContext(Entry *root) ...@@ -628,7 +632,7 @@ static void addClassToContext(Entry *root)
fd->insertClass(cd); fd->insertClass(cd);
} }
addClassToGroups(root,cd); addClassToGroups(root,cd);
cd->setRefItems(root->todoId,root->testId,root->bugId); cd->setRefItems(root->sli);
if (!root->subGrouping) cd->setSubGrouping(FALSE); if (!root->subGrouping) cd->setSubGrouping(FALSE);
if (cd->templateArguments()==0) if (cd->templateArguments()==0)
...@@ -696,7 +700,7 @@ static void addClassToContext(Entry *root) ...@@ -696,7 +700,7 @@ static void addClassToContext(Entry *root)
if (!root->subGrouping) cd->setSubGrouping(FALSE); if (!root->subGrouping) cd->setSubGrouping(FALSE);
addClassToGroups(root,cd); addClassToGroups(root,cd);
cd->setRefItems(root->todoId,root->testId,root->bugId); cd->setRefItems(root->sli);
// see if the class is found inside a namespace // see if the class is found inside a namespace
bool found=addNamespace(root,cd); bool found=addNamespace(root,cd);
...@@ -855,7 +859,7 @@ static void buildNamespaceList(Entry *root) ...@@ -855,7 +859,7 @@ static void buildNamespaceList(Entry *root)
// insert the namespace in the file definition // insert the namespace in the file definition
if (fd) fd->insertNamespace(nd); if (fd) fd->insertNamespace(nd);
addNamespaceToGroups(root,nd); addNamespaceToGroups(root,nd);
nd->setRefItems(root->todoId,root->testId,root->bugId); nd->setRefItems(root->sli);
} }
else // fresh namespace else // fresh namespace
{ {
...@@ -871,7 +875,7 @@ static void buildNamespaceList(Entry *root) ...@@ -871,7 +875,7 @@ static void buildNamespaceList(Entry *root)
//printf("Adding namespace to group\n"); //printf("Adding namespace to group\n");
addNamespaceToGroups(root,nd); addNamespaceToGroups(root,nd);
nd->setRefItems(root->todoId,root->testId,root->bugId); nd->setRefItems(root->sli);
bool ambig; bool ambig;
// file definition containing the namespace nd // file definition containing the namespace nd
...@@ -1013,7 +1017,7 @@ static void findUsingDirectives(Entry *root) ...@@ -1013,7 +1017,7 @@ static void findUsingDirectives(Entry *root)
nd->insertUsedFile(root->fileName); nd->insertUsedFile(root->fileName);
// add class to the list // add class to the list
Doxygen::namespaceSDict.inSort(root->name,nd); Doxygen::namespaceSDict.inSort(root->name,nd);
nd->setRefItems(root->todoId,root->testId,root->bugId); nd->setRefItems(root->sli);
} }
} }
} }
...@@ -1234,7 +1238,7 @@ static MemberDef *addVariableToClass( ...@@ -1234,7 +1238,7 @@ static MemberDef *addVariableToClass(
// add the member to the class // add the member to the class
} }
cd->insertMember(md); cd->insertMember(md);
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
//TODO: insert FileDef instead of filename strings. //TODO: insert FileDef instead of filename strings.
cd->insertUsedFile(root->fileName); cd->insertUsedFile(root->fileName);
...@@ -1332,7 +1336,7 @@ static MemberDef *addVariableToFile( ...@@ -1332,7 +1336,7 @@ static MemberDef *addVariableToFile(
// variable already in the scope // variable already in the scope
{ {
addMemberDocs(root,md,def,0,FALSE); addMemberDocs(root,md,def,0,FALSE);
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
return md; return md;
} }
...@@ -1383,7 +1387,7 @@ static MemberDef *addVariableToFile( ...@@ -1383,7 +1387,7 @@ static MemberDef *addVariableToFile(
// md->setMemberGroup(memberGroupDict[root->mGrpId]); // md->setMemberGroup(memberGroupDict[root->mGrpId]);
//} //}
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{ {
nd->insertMember(md); nd->insertMember(md);
...@@ -1777,7 +1781,7 @@ void addMethodToClass(Entry *root,ClassDef *cd, ...@@ -1777,7 +1781,7 @@ void addMethodToClass(Entry *root,ClassDef *cd,
addMemberToGroups(root,md); addMemberToGroups(root,md);
root->section = Entry::EMPTY_SEC; root->section = Entry::EMPTY_SEC;
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
} }
...@@ -2048,7 +2052,7 @@ static void buildFunctionList(Entry *root) ...@@ -2048,7 +2052,7 @@ static void buildFunctionList(Entry *root)
} }
} }
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{ {
// add member to namespace // add member to namespace
...@@ -2304,11 +2308,8 @@ static void transferFunctionDocumentation() ...@@ -2304,11 +2308,8 @@ static void transferFunctionDocumentation()
// mdec->setGroupDef(mdef->getGroupDef(),mdef->getGroupPri(),mdef->docFile(),mdef->docLine(),mdef->hasDocumentation()); // mdec->setGroupDef(mdef->getGroupDef(),mdef->getGroupPri(),mdef->docFile(),mdef->docLine(),mdef->hasDocumentation());
//} //}
mdec->setRefItems(mdef->specialListItems());
int todoId = QMAX(mdec->todoId(),mdef->todoId()); mdef->setRefItems(mdec->specialListItems());
int testId = QMAX(mdec->testId(),mdef->testId());
int bugId = QMAX(mdec->bugId() ,mdef->bugId() );
mdec->setRefItems(todoId,testId,bugId);
} }
} }
} }
...@@ -3381,7 +3382,7 @@ static void addListReferences() ...@@ -3381,7 +3382,7 @@ static void addListReferences()
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
addRefItem(pi->todoId,pi->testId,pi->bugId, addRefItem(pi->specialListItems,
theTranslator->trPage(TRUE,TRUE), theTranslator->trPage(TRUE,TRUE),
pi->name,pi->title); pi->name,pi->title);
} }
...@@ -3497,7 +3498,7 @@ static void addMemberDocs(Entry *root, ...@@ -3497,7 +3498,7 @@ static void addMemberDocs(Entry *root,
md->setBodyDef(fd); md->setBodyDef(fd);
} }
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
} }
//md->setDefFile(root->fileName); //md->setDefFile(root->fileName);
...@@ -4355,7 +4356,7 @@ static void findMember(Entry *root, ...@@ -4355,7 +4356,7 @@ static void findMember(Entry *root,
mn->append(md); mn->append(md);
cd->insertMember(md); cd->insertMember(md);
cd->insertUsedFile(root->fileName); cd->insertUsedFile(root->fileName);
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
} }
} }
else // unrelated function with the same name as a member else // unrelated function with the same name as a member
...@@ -4502,7 +4503,7 @@ static void findMember(Entry *root, ...@@ -4502,7 +4503,7 @@ static void findMember(Entry *root,
mn->append(md); mn->append(md);
cd->insertMember(md); cd->insertMember(md);
cd->insertUsedFile(root->fileName); cd->insertUsedFile(root->fileName);
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
addMemberToGroups(root,md); addMemberToGroups(root,md);
//printf("Adding member=%s\n",md->name().data()); //printf("Adding member=%s\n",md->name().data());
if (newMemberName) if (newMemberName)
...@@ -4744,7 +4745,7 @@ static void findEnums(Entry *root) ...@@ -4744,7 +4745,7 @@ static void findEnums(Entry *root)
//{ //{
// md->setMemberGroup(memberGroupDict[root->mGrpId]); // md->setMemberGroup(memberGroupDict[root->mGrpId]);
//} //}
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{ {
if (Config_getBool("HIDE_SCOPE_NAMES")) if (Config_getBool("HIDE_SCOPE_NAMES"))
...@@ -5517,7 +5518,7 @@ static void findDefineDocumentation(Entry *root) ...@@ -5517,7 +5518,7 @@ static void findDefineDocumentation(Entry *root)
md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setMaxInitLines(root->initLines); md->setMaxInitLines(root->initLines);
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId); if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId);
addMemberToGroups(root,md); addMemberToGroups(root,md);
} }
...@@ -5553,7 +5554,7 @@ static void findDefineDocumentation(Entry *root) ...@@ -5553,7 +5554,7 @@ static void findDefineDocumentation(Entry *root)
bool ambig; bool ambig;
md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setRefItems(root->todoId,root->testId,root->bugId); md->setRefItems(root->sli);
if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId); if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId);
addMemberToGroups(root,md); addMemberToGroups(root,md);
} }
...@@ -5599,7 +5600,7 @@ static void buildPageList(Entry *root) ...@@ -5599,7 +5600,7 @@ static void buildPageList(Entry *root)
{ {
QCString title=root->args.stripWhiteSpace(); QCString title=root->args.stripWhiteSpace();
if (title.isEmpty()) title=theTranslator->trMainPage(); if (title.isEmpty()) title=theTranslator->trMainPage();
addRefItem(root->todoId,root->testId,root->bugId,"page", addRefItem(root->sli,"page",
Config_getBool("GENERATE_TREEVIEW")?"main":"index", Config_getBool("GENERATE_TREEVIEW")?"main":"index",
title title
); );
...@@ -5759,15 +5760,16 @@ static void resolveUserReferences() ...@@ -5759,15 +5760,16 @@ static void resolveUserReferences()
// name (not from the todo/test/bug list, but from the file in which they // name (not from the todo/test/bug list, but from the file in which they
// are defined). We correct this here by looking at the generated section // are defined). We correct this here by looking at the generated section
// labels! // labels!
if (si->label.left(5)=="_todo" || si->label.left(5)=="_test") QDictIterator<RefList> rli(*Doxygen::specialLists);
RefList *rl;
for (rli.toFirst();(rl=rli.current());++rli)
{ {
si->fileName=si->label.mid(1,4); // extract "todo" or "test" QCString label="_"+rl->listName(); // "_todo", "_test", ...
si->generated=TRUE; if (si->label==label)
} {
else if (si->label.left(4)=="_bug") si->generated=TRUE;
{ break;
si->fileName="bug"; }
si->generated=TRUE;
} }
} }
} }
...@@ -6677,6 +6679,7 @@ void initDoxygen() ...@@ -6677,6 +6679,7 @@ void initDoxygen()
#endif #endif
initPreprocessor(); initPreprocessor();
} }
void readConfiguration(int argc, char **argv) void readConfiguration(int argc, char **argv)
...@@ -6955,6 +6958,33 @@ void readConfiguration(int argc, char **argv) ...@@ -6955,6 +6958,33 @@ void readConfiguration(int argc, char **argv)
/* Set the global html file extension. */ /* Set the global html file extension. */
htmlFileExtension = Config_getString("HTML_FILE_EXTENSION"); htmlFileExtension = Config_getString("HTML_FILE_EXTENSION");
htmlFileExtensionLength = htmlFileExtension.length(); htmlFileExtensionLength = htmlFileExtension.length();
/* init the special lists */
Doxygen::specialLists->setAutoDelete(TRUE);
Doxygen::specialLists->insert("todo",
new RefList("todo",
"GENERATE_TODOLIST",
theTranslator->trTodoList(),
theTranslator->trTodo(),
BaseOutputDocInterface::Todo
)
);
Doxygen::specialLists->insert("test",
new RefList("test",
"GENERATE_TESTLIST",
theTranslator->trTestList(),
theTranslator->trTest(),
BaseOutputDocInterface::Test
)
);
Doxygen::specialLists->insert("bug",
new RefList("bug",
"GENERATE_BUGLIST",
theTranslator->trBugList(),
theTranslator->trBug(),
BaseOutputDocInterface::Bug
)
);
} }
void parseInput() void parseInput()
......
...@@ -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;
......
...@@ -86,12 +86,12 @@ static int roundCount = 0 ; ...@@ -86,12 +86,12 @@ static int roundCount = 0 ;
static int curlyCount = 0 ; static int curlyCount = 0 ;
static int squareCount = 0 ; static int squareCount = 0 ;
static int padCount = 0 ; static int padCount = 0 ;
static int todoStartContext = 0; static int slStartContext = 0;
static QCString todoString; static QCString slString;
static int testStartContext = 0; //static int testStartContext = 0;
static QCString testString; //static QCString testString;
static int bugStartContext = 0; //static int bugStartContext = 0;
static QCString bugString; //static QCString bugString;
static Entry* current_root = 0 ; static Entry* current_root = 0 ;
static Entry* global_root = 0 ; static Entry* global_root = 0 ;
static Entry* current = 0 ; static Entry* current = 0 ;
...@@ -200,6 +200,7 @@ static void initEntry() ...@@ -200,6 +200,7 @@ static void initEntry()
} }
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/// remove any automatic grouping and add new one (if given) /// remove any automatic grouping and add new one (if given)
...@@ -232,8 +233,11 @@ static int newMemberGroupId() ...@@ -232,8 +233,11 @@ static int newMemberGroupId()
return curGroupId++; return curGroupId++;
} }
// forward declarations
static void startGroup(); static void startGroup();
static void startGroupInDoc();
static void endGroup(); static void endGroup();
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void lineCount() static void lineCount()
...@@ -426,6 +430,45 @@ static void prependScope() ...@@ -426,6 +430,45 @@ static void prependScope()
} }
} }
//-----------------------------------------------------------------------------
static void addSpecialItem(const char *listName)
{
ListItemInfo *lii=0;
RefList *refList = Doxygen::specialLists->find(listName);
ASSERT(refList!=0);
if (current->sli)
{
QListIterator<ListItemInfo> slii(*current->sli);
for (slii.toFirst();(lii=slii.current());++slii)
{
if (strcmp(lii->type,listName)==0) break;
}
}
if (lii) // already found item of same type before
{
RefItem *item = refList->getRefItem(lii->itemId);
item->text += " <p>";
item->text += current->brief;
}
else // new item
{
int itemId = refList->addRefItem();
char anchorLabel[12];
sprintf(anchorLabel,"_%s%06d",listName,itemId);
RefItem *item = refList->getRefItem(itemId);
item->text = current->brief.copy();
item->listAnchor = anchorLabel;
current->addSpecialListItem(listName,itemId);
QCString cmdString;
cmdString.sprintf("\\%s %d\n",listName,itemId);
current->doc += cmdString;
sectionType=SectionInfo::Anchor;
sectionLabel=anchorLabel;
addSection();
}
current->brief = slString.copy(); // restore orginial brief desc.
}
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
#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);
...@@ -444,10 +487,11 @@ static int yyread(char *buf,int max_size) ...@@ -444,10 +487,11 @@ static int yyread(char *buf,int max_size)
%} %}
/* start command character */
CMD ("\\"|"@") CMD ("\\"|"@")
SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"ingroup"|"latexonly"|"htmlonly"|"{"|"verbatim"|"dotfile"|"defgroup"|"addtogroup"|"weakgroup") SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"ingroup"|"latexonly"|"htmlonly"|"{"|"verbatim"|"dotfile"|"defgroup"|"addtogroup"|"weakgroup")
BN [ \t\n\r] BN [ \t\n\r]
BL [ \t\r]*"\n" BL [ \t\r]*"\n"
B [ \t] B [ \t]
BS ^(({B}*"//")?)(({B}*"*"+)?){B}* BS ^(({B}*"//")?)(({B}*"*"+)?){B}*
FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+] FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+]
...@@ -1450,7 +1494,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1450,7 +1494,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
} }
<FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}"|"/*"([!*]?){B}*{CMD}"}"{B}*"*/" { <FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}"|"/*"([!*]?){B}*{CMD}"}"{B}*"*/" {
if (memberGroupId==NOGROUP && autoGroupStack.isEmpty())
{
warn(yyFileName,yyLineNr,
"Warning: end of group without matching begin.");
}
endGroup(); endGroup();
memberGroupHeader.resize(0);
} }
<FindMembers>"=" { <FindMembers>"=" {
current->bodyLine = yyLineNr; current->bodyLine = yyLineNr;
...@@ -1957,7 +2007,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1957,7 +2007,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
<ReadBody>. { current->program += yytext ; } <ReadBody>. { current->program += yytext ; }
<FindMembers>("("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+)+ { <FindMembers>"("/({BN}*{ID}{BN}*"::")*{ID}{BN}*")"{BN}*"(" | /* typedef void (A::func_t)(args...) */
<FindMembers>("("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) */
current->bodyLine = yyLineNr; current->bodyLine = yyLineNr;
lineCount(); lineCount();
addType(current); addType(current);
...@@ -3145,6 +3196,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3145,6 +3196,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
yyLineNr++; yyLineNr++;
startGroupInDoc();
BEGIN( lastDocContext ); BEGIN( lastDocContext );
} }
<Doc,JavaDoc>{CMD}"name"{B}+ { <Doc,JavaDoc>{CMD}"name"{B}+ {
...@@ -3169,23 +3221,23 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3169,23 +3221,23 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->brief+=yytext; current->brief+=yytext;
} }
<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"todo"/[^a-z_A-Z0-9] { <AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"todo"/[^a-z_A-Z0-9] {
todoStartContext = YY_START; slStartContext = YY_START;
lastBriefContext = TodoParam; // this is where we will continue at the end of the argument lastBriefContext = TodoParam; // this is where we will continue at the end of the argument
todoString = current->brief.copy(); // these will be swapped later on. slString = current->brief.copy(); // these will be swapped later on.
current->brief.resize(0); current->brief.resize(0);
BEGIN(ClassDocBrief); BEGIN(ClassDocBrief);
} }
<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"test"/[^a-z_A-Z0-9] { <AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"test"/[^a-z_A-Z0-9] {
testStartContext = YY_START; slStartContext = YY_START;
lastBriefContext = TestParam; // this is where we will continue at the end of the argument lastBriefContext = TestParam; // this is where we will continue at the end of the argument
testString = current->brief.copy(); // these will be swapped later on. slString = current->brief.copy(); // these will be swapped later on.
current->brief.resize(0); current->brief.resize(0);
BEGIN(ClassDocBrief); BEGIN(ClassDocBrief);
} }
<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"bug"/[^a-z_A-Z0-9] { <AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"bug"/[^a-z_A-Z0-9] {
bugStartContext = YY_START; slStartContext = YY_START;
lastBriefContext = BugParam; // this is where we will continue at the end of the argument lastBriefContext = BugParam; // this is where we will continue at the end of the argument
bugString = current->brief.copy(); // these will be swapped later on. slString = current->brief.copy(); // these will be swapped later on.
current->brief.resize(0); current->brief.resize(0);
BEGIN(ClassDocBrief); BEGIN(ClassDocBrief);
} }
...@@ -3193,91 +3245,25 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3193,91 +3245,25 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<TodoParam>"//" | <TodoParam>"//" |
<TodoParam>"/*" | <TodoParam>"/*" |
<TodoParam>. { <TodoParam>. {
if (current->todoId!=0) addSpecialItem("todo");
{ int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
RefItem *item = todoList.getRefItem(current->todoId); BEGIN(slStartContext);
item->text += " <p>";
item->text += current->brief;
}
else
{
int todoItemId = todoList.addRefItem();
char anchorLabel[12];
sprintf(anchorLabel,"_todo%06d",todoItemId);
RefItem *item = todoList.getRefItem(todoItemId);
item->text = current->brief.copy();
item->listAnchor = anchorLabel;
current->todoId = todoItemId;
QCString todoCmdString;
todoCmdString.sprintf("\\todo %d\n",todoItemId);
current->doc += todoCmdString;
sectionType=SectionInfo::Anchor;
sectionLabel=anchorLabel;
addSection();
}
unput(*yytext);
current->brief = todoString.copy(); // restore orginial brief desc.
BEGIN(todoStartContext);
} }
<TestParam>\n | <TestParam>\n |
<TestParam>"//" | <TestParam>"//" |
<TestParam>"/*" | <TestParam>"/*" |
<TestParam>. { <TestParam>. {
if (current->testId!=0) addSpecialItem("test");
{ int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
RefItem *item = testList.getRefItem(current->testId); BEGIN(slStartContext);
item->text += " <p>";
item->text += current->brief;
}
else
{
int testItemId = testList.addRefItem();
char anchorLabel[12];
sprintf(anchorLabel,"_test%06d",testItemId);
RefItem *item = testList.getRefItem(testItemId);
item->text = current->brief.copy();
item->listAnchor = anchorLabel;
current->testId = testItemId;
QCString testCmdString;
testCmdString.sprintf("\\test %d\n",testItemId);
current->doc += testCmdString;
sectionType=SectionInfo::Anchor;
sectionLabel=anchorLabel;
addSection();
}
unput(*yytext);
current->brief = testString.copy(); // restore orginial brief desc.
BEGIN(testStartContext);
} }
<BugParam>\n | <BugParam>\n |
<BugParam>"//" | <BugParam>"//" |
<BugParam>"/*" | <BugParam>"/*" |
<BugParam>. { <BugParam>. {
if (current->bugId!=0) addSpecialItem("bug");
{ int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
RefItem *item = bugList.getRefItem(current->bugId); BEGIN(slStartContext);
item->text += " <p>";
item->text += current->brief;
}
else
{
int bugItemId = bugList.addRefItem();
char anchorLabel[12];
sprintf(anchorLabel,"_bug%06d",bugItemId);
RefItem *item = bugList.getRefItem(bugItemId);
item->text = current->brief.copy();
item->listAnchor = anchorLabel;
current->bugId = bugItemId;
QCString bugCmdString;
bugCmdString.sprintf("\\bug %d\n",bugItemId);
current->doc += bugCmdString;
sectionType=SectionInfo::Anchor;
sectionLabel=anchorLabel;
addSection();
}
unput(*yytext);
current->brief = bugString.copy(); // restore orginial brief desc.
BEGIN(bugStartContext);
} }
<ExampleDocArg1>{FILE} { <ExampleDocArg1>{FILE} {
current->name = stripQuotes(yytext); current->name = stripQuotes(yytext);
...@@ -3453,11 +3439,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3453,11 +3439,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<GroupHeader>"*/" { <GroupHeader>"*/" {
unput('/');unput('*'); unput('/');unput('*');
//printf("Found memberGroup=`%s'\n",memberGroupHeader.data()); //printf("Found memberGroup=`%s'\n",memberGroupHeader.data());
startGroupInDoc();
newDocState(); newDocState();
} }
<GroupHeader>\n { <GroupHeader>\n {
yyLineNr++; yyLineNr++;
//printf("Found memberGroup=`%s'\n",memberGroupHeader.data()); //printf("Found memberGroup=`%s'\n",memberGroupHeader.data());
startGroupInDoc();
newDocState(); newDocState();
} }
<StoreGroupDocs>"$" { <StoreGroupDocs>"$" {
...@@ -3619,27 +3607,19 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3619,27 +3607,19 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( GroupName ); BEGIN( GroupName );
} }
<ClassDoc,Doc,JavaDoc>{CMD}"{" { <ClassDoc,Doc,JavaDoc>{CMD}"{" {
if (current->section==Entry::GROUPDOC_SEC ) if (memberGroupId==NOGROUP && current->section==Entry::GROUPDOC_SEC)
{
autoGroupStack.push(new Grouping(current->name,
current->groupingPri()
));
}
else if (current->section == Entry::MEMBERGRP_SEC)
{ {
memberGroupId = newMemberGroupId(); startGroupInDoc();
memberGroupRelates = current->relates.copy();
memberGroupInside = current->inside.copy();
current->mGrpId = memberGroupId;
lastMemberGroupLine = yyLineNr;
}
else
{
warn(yyFileName,yyLineNr,"Warning: @{ may only be used in a group block!\n");
} }
} }
<ClassDoc,Doc,JavaDoc>{CMD}"}" { <ClassDoc,Doc,JavaDoc>{CMD}"}" {
if (memberGroupId==NOGROUP && autoGroupStack.isEmpty())
{
warn(yyFileName,yyLineNr,
"Warning: end of group without matching begin.");
}
endGroup(); endGroup();
memberGroupHeader.resize(0);
} }
<ExampleDoc,PageDoc,ClassDoc>. { current->doc += yytext; } <ExampleDoc,PageDoc,ClassDoc>. { current->doc += yytext; }
<Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>^{B}*"//" <Doc,JavaDoc,LineDoc,ExampleDoc,PageDoc,ClassDoc>^{B}*"//"
...@@ -3841,17 +3821,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3841,17 +3821,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
yyLineNr++; yyLineNr++;
} }
<SkipSection>"//"|"*/" <SkipSection>"//"|"*/"
<ClassDoc,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"elseif"/[^a-z_A-Z0-9] { <ClassDoc,LineDoc,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"elseif"/[^a-z_A-Z0-9] {
// previous section enabled => skip now // previous section enabled => skip now
depthIf=1; depthIf=1;
BEGIN(SkipSection); BEGIN(SkipSection);
} }
<ClassDoc,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"else"/[^a-z_A-Z0-9] { <ClassDoc,LineDoc,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"else"/[^a-z_A-Z0-9] {
// section was enabled => skip now // section was enabled => skip now
depthIf=1; depthIf=1;
BEGIN(SkipSection); BEGIN(SkipSection);
} }
<ClassDoc,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"endif"/[^a-z_A-Z0-9] { <ClassDoc,LineDoc,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"endif"/[^a-z_A-Z0-9] {
// section enabled => absorb endif // section enabled => absorb endif
} }
...@@ -3914,8 +3894,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3914,8 +3894,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<ClassDocBrief>"\n" { <ClassDocBrief>"\n" {
// allow \todo in brief description // allow \todo in brief description
if (lastBriefContext==TodoParam && if (lastBriefContext==TodoParam &&
(todoStartContext==LineDoc || (slStartContext==LineDoc ||
todoStartContext==AfterDocLine slStartContext==AfterDocLine
) )
) )
{ {
...@@ -3924,8 +3904,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3924,8 +3904,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
else if else if
(lastBriefContext==TestParam && (lastBriefContext==TestParam &&
(testStartContext==LineDoc || (slStartContext==LineDoc ||
testStartContext==AfterDocLine slStartContext==AfterDocLine
) )
) )
{ {
...@@ -3934,8 +3914,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3934,8 +3914,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
else if else if
(lastBriefContext==BugParam && (lastBriefContext==BugParam &&
(bugStartContext==LineDoc || (slStartContext==LineDoc ||
bugStartContext==AfterDocLine slStartContext==AfterDocLine
) )
) )
{ {
...@@ -4307,12 +4287,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4307,12 +4287,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
static void startGroup() static void startGroup()
{ {
if (memberGroupId!=NOGROUP) if (!lastDefGroup.groupname.isEmpty())
{
warn(yyFileName,yyLineNr,"Warning: ignoring nested member group. "
"Previous command was found at line %d.",lastMemberGroupLine);
}
else if (!lastDefGroup.groupname.isEmpty())
{ {
setCurrentGroup( &lastDefGroup.groupname, lastDefGroup.pri ); setCurrentGroup( &lastDefGroup.groupname, lastDefGroup.pri );
autoGroupStack.push(new Grouping(lastDefGroup)); autoGroupStack.push(new Grouping(lastDefGroup));
...@@ -4320,12 +4295,21 @@ static void startGroup() ...@@ -4320,12 +4295,21 @@ static void startGroup()
} }
else else
{ {
if (memberGroupId!=NOGROUP)
{
//warn(yyFileName,yyLineNr,"Warning: ignoring nested member group. "
// "Previous command was found at line %d.",lastMemberGroupLine);
endGroup();
}
if (memberGroupHeader.isEmpty()) if (memberGroupHeader.isEmpty())
{ {
// warn( yyFileName, yyLineNr, "Warning: member group does not have a header" ); // warn( yyFileName, yyLineNr, "Warning: member group does not have a header" );
memberGroupHeader="[NOHEADER]"; memberGroupHeader="[NOHEADER]";
} }
memberGroupId = newMemberGroupId(); memberGroupId = newMemberGroupId();
Doxygen::memberHeaderDict.insert(memberGroupId,
new QCString(memberGroupHeader.stripWhiteSpace())
);
memberGroupRelates = current->relates.copy(); memberGroupRelates = current->relates.copy();
memberGroupInside = current->inside.copy(); memberGroupInside = current->inside.copy();
current->mGrpId = memberGroupId; current->mGrpId = memberGroupId;
...@@ -4333,18 +4317,39 @@ static void startGroup() ...@@ -4333,18 +4317,39 @@ static void startGroup()
} }
} }
static void endGroup() static void startGroupInDoc()
{ {
if (memberGroupId==NOGROUP && autoGroupStack.isEmpty()) if (current->section==Entry::GROUPDOC_SEC ) /* scope for a non-member group: @defgroup */
{ {
warn(yyFileName,yyLineNr, autoGroupStack.push(new Grouping(current->name,
"Warning: end of group without matching begin."); current->groupingPri()
));
} }
else if (memberGroupId!=NOGROUP) // end of member group else if (current->section == Entry::MEMBERGRP_SEC) /* scope for a member group: @name */
{ {
if (memberGroupId!=NOGROUP)
{
endGroup();
}
memberGroupId = newMemberGroupId();
Doxygen::memberHeaderDict.insert(memberGroupId, Doxygen::memberHeaderDict.insert(memberGroupId,
new QCString(memberGroupHeader.stripWhiteSpace()) new QCString(memberGroupHeader.stripWhiteSpace())
); );
memberGroupRelates = current->relates.copy();
memberGroupInside = current->inside.copy();
current->mGrpId = memberGroupId;
lastMemberGroupLine = yyLineNr;
}
else
{
warn(yyFileName,yyLineNr,"Warning: @{ may only be used in a group block!\n");
}
}
static void endGroup()
{
if (memberGroupId!=NOGROUP) // end of member group
{
Doxygen::memberDocDict.insert(memberGroupId, Doxygen::memberDocDict.insert(memberGroupId,
new QCString(memberGroupDocs) new QCString(memberGroupDocs)
); );
...@@ -4356,7 +4361,6 @@ static void endGroup() ...@@ -4356,7 +4361,6 @@ static void endGroup()
current->mGrpId=NOGROUP; current->mGrpId=NOGROUP;
current->relates.resize(0); current->relates.resize(0);
} }
memberGroupHeader.resize(0);
memberGroupDocs.resize(0); memberGroupDocs.resize(0);
} }
else if (!autoGroupStack.isEmpty()) // end of group else if (!autoGroupStack.isEmpty()) // end of group
...@@ -4366,12 +4370,19 @@ static void endGroup() ...@@ -4366,12 +4370,19 @@ static void endGroup()
if( parent ) { if( parent ) {
setCurrentGroup( &parent->groupname, parent->pri ); setCurrentGroup( &parent->groupname, parent->pri );
} else { } else {
setCurrentGroup( NULL, Grouping::GROUPING_LOWEST ); setCurrentGroup( 0, Grouping::GROUPING_LOWEST );
} }
delete current; delete current;
} }
} }
static void forceEndGroup()
{
while (memberGroupId!=NOGROUP || !autoGroupStack.isEmpty()) endGroup();
}
//----------------------------------------------------------------------------
static void newDocState() static void newDocState()
{ {
if (tmpDocType!=-1) if (tmpDocType!=-1)
...@@ -4451,9 +4462,11 @@ static void parseCompounds(Entry *rt) ...@@ -4451,9 +4462,11 @@ static void parseCompounds(Entry *rt)
memberGroupInside.resize(0); memberGroupInside.resize(0);
scanYYlex() ; scanYYlex() ;
forceEndGroup();
delete current; current=0; delete current; current=0;
ce->program.resize(0); ce->program.resize(0);
if (depthIf>0) if (depthIf>0)
{ {
warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!");
...@@ -4482,10 +4495,14 @@ void parseMain(Entry *rt) ...@@ -4482,10 +4495,14 @@ void parseMain(Entry *rt)
scanYYrestart( scanYYin ); scanYYrestart( scanYYin );
BEGIN( FindMembers ); BEGIN( FindMembers );
scanYYlex(); scanYYlex();
forceEndGroup();
if (depthIf>0) if (depthIf>0)
{ {
warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!");
} }
rt->program.resize(0); rt->program.resize(0);
delete current; current=0; delete current; current=0;
parseCompounds(rt); parseCompounds(rt);
......
...@@ -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,100 +3461,45 @@ void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -3447,100 +3461,45 @@ 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 *name,const char *title,const char *args) const char *prefix,
{ const char *name,const char *title,const char *args)
{
//printf("addRefItem(%s) todoId=%d testId=%d bugId=%d\n",name,todoId,testId,bugId); if (sli)
{
//////////////////////////////////////////////////////////// QListIterator<ListItemInfo> slii(*sli);
// add item to the todo list ListItemInfo *lii;
//////////////////////////////////////////////////////////// for (slii.toFirst();(lii=slii.current());++slii)
{
if (todoId>0 && Config_getBool("GENERATE_TODOLIST")) RefList *refList = Doxygen::specialLists->find(lii->type);
{ ASSERT(refList!=0);
RefItem *item = todoList.getRefItem(todoId); //printf("addRefItem(%s) todoId=%d testId=%d bugId=%d\n",name,todoId,testId,bugId);
ASSERT(item!=0);
if (item->written) return; if (Config_getBool(refList->optionName()))
{
QCString doc; RefItem *item = refList->getRefItem(lii->itemId);
doc += "<dl><dt>\\anchor "; ASSERT(item!=0);
doc += item->listAnchor; if (item->written) return;
doc += "\n";
doc += prefix; QCString doc(1000);
doc += " \\_internalref "; doc += "<dl><dt>\\anchor ";
doc += name; doc += item->listAnchor;
doc += " \""; doc += "\n";
doc += title; doc += prefix;
doc += "\""; doc += " \\_internalref ";
if (args) doc += args; doc += name;
doc += "</dt>\n<dd>"; doc += " \"";
doc += item->text; doc += title;
doc += "</dd></dl>\n"; doc += "\"";
//printf("Todo page: %s\n",doc.data()); if (args) doc += args;
addRelatedPage("todo",theTranslator->trTodoList(),doc,0,"generated",1,0,0,0); doc += "</dt>\n<dd>";
doc += item->text;
item->written=TRUE; doc += "</dd></dl>\n";
} //printf("Todo page: %s\n",doc.data());
addRelatedPage(refList->listName(),refList->pageTitle(),doc,0,"generated",1,0,0,0);
//////////////////////////////////////////////////////////// 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