summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2009-06-22 20:14:03 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2009-06-22 20:14:03 (GMT)
commit7c0a46b50fad0925e47b78326f8c2e92e3829fb4 (patch)
tree2f918f7da3205101b2a8a300ee9afefe247b3f24 /src/commentscan.l
parent7a3de4c3c8aac25c38b6e93bb0927de40cd1c650 (diff)
downloadDoxygen-7c0a46b50fad0925e47b78326f8c2e92e3829fb4.zip
Doxygen-7c0a46b50fad0925e47b78326f8c2e92e3829fb4.tar.gz
Doxygen-7c0a46b50fad0925e47b78326f8c2e92e3829fb4.tar.bz2
Release-1.5.9-20090622
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l43
1 files changed, 40 insertions, 3 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index 181a15a..0ddb9fa 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -405,6 +405,7 @@ static int g_memberGroupId = DOX_NOGROUP;
static QCString g_memberGroupHeader;
static QCString g_memberGroupDocs;
static QCString g_memberGroupRelates;
+static QCString g_compoundName;
//-----------------------------------------------------------------------------
@@ -2033,6 +2034,11 @@ static bool handleExample(const QCString &)
static bool handleDetails(const QCString &)
{
+ if (inContext!=OutputBrief)
+ {
+ addOutput("\n\n"); // treat @details outside brief description
+ // as a new paragraph
+ }
setOutput(OutputDoc);
return FALSE;
}
@@ -2455,13 +2461,14 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
//---------------------------------------------------------------------------
-void groupEnterFile(const char *,int)
+void groupEnterFile(const char *fileName,int)
{
g_autoGroupStack.setAutoDelete(TRUE);
g_autoGroupStack.clear();
g_memberGroupId = DOX_NOGROUP;
g_memberGroupDocs.resize(0);
g_memberGroupRelates.resize(0);
+ g_compoundName=fileName;
}
void groupLeaveFile(const char *fileName,int line)
@@ -2488,10 +2495,21 @@ void groupEnterCompound(const char *fileName,int line,const char *name)
g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0);
g_memberGroupDocs.resize(0);
+ g_compoundName = name;
+ int i = g_compoundName.find('(');
+ if (i!=-1)
+ {
+ g_compoundName=g_compoundName.left(i); // strip category (Obj-C)
+ }
+ if (g_compoundName.isEmpty())
+ {
+ g_compoundName=fileName;
+ }
}
void groupLeaveCompound(const char *,int,const char *)
{
+ //printf("groupLeaveCompound(%s)\n",name);
//if (g_memberGroupId!=DOX_NOGROUP)
//{
// warn(fileName,line,"Warning: end of compound %s while inside a member group\n",name);
@@ -2499,8 +2517,27 @@ void groupLeaveCompound(const char *,int,const char *)
g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0);
g_memberGroupDocs.resize(0);
+ g_compoundName.resize(0);
}
+static int findExistingGroup(int &groupId,const MemberGroupInfo *info)
+{
+ //printf("findExistingGroup %s:%s\n",info->header.data(),info->compoundName.data());
+ QIntDictIterator<MemberGroupInfo> di(Doxygen::memGrpInfoDict);
+ MemberGroupInfo *mi;
+ for (di.toFirst();(mi=di.current());++di)
+ {
+ if (g_compoundName==mi->compoundName && // same file or scope
+ stricmp(mi->header,info->header)==0 // same header
+ )
+ {
+ //printf("Found it!\n");
+ return di.currentKey(); // put the item in this group
+ }
+ }
+ groupId++; // start new group
+ return groupId;
+}
void openGroup(Entry *e,const char *,int)
{
@@ -2515,11 +2552,11 @@ void openGroup(Entry *e,const char *,int)
if (g_memberGroupId==DOX_NOGROUP) // no group started yet
{
static int curGroupId=0;
- g_memberGroupId = curGroupId++;
- //printf("new group id=%d header=%s\n",g_memberGroupId,g_memberGroupHeader.data());
MemberGroupInfo *info = new MemberGroupInfo;
info->header = g_memberGroupHeader.stripWhiteSpace();
+ info->compoundName = g_compoundName;
+ g_memberGroupId = findExistingGroup(curGroupId,info);
Doxygen::memGrpInfoDict.insert(g_memberGroupId,info);
g_memberGroupRelates = e->relates;