summaryrefslogtreecommitdiffstats
path: root/src/xmlgen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-02-27 20:01:29 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-02-27 20:01:29 (GMT)
commitd745dd3737ece0f328e515b1cf10306da0901597 (patch)
tree2d189d04d6f9413eb324fae5f56f273f3855ff8b /src/xmlgen.cpp
parent11de530ba769e4e2735a20a74262380d51f8772f (diff)
downloadDoxygen-d745dd3737ece0f328e515b1cf10306da0901597.zip
Doxygen-d745dd3737ece0f328e515b1cf10306da0901597.tar.gz
Doxygen-d745dd3737ece0f328e515b1cf10306da0901597.tar.bz2
Release-1.4.1-20050227
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r--src/xmlgen.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 2030789..aa7cb6c 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -825,7 +825,19 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
MemberList *ml,const char *kind,const char *header=0,
const char *documentation=0)
{
- if (ml->count()==0) return; // empty list
+ MemberListIterator mli(*ml);
+ MemberDef *md;
+ int count=0;
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ // namespace members are also inserted in the file scope, but
+ // to prevent this duplication in the XML output, we filter those here.
+ if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
+ {
+ count++;
+ }
+ }
+ if (count==0) return; // empty list
t << " <sectiondef kind=\"" << kind << "\">" << endl;
if (header)
@@ -838,11 +850,14 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
t << "</description>" << endl;
}
- MemberListIterator mli(*ml);
- MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
- generateXMLForMember(md,ti,t,d);
+ // namespace members are also inserted in the file scope, but
+ // to prevent this duplication in the XML output, we filter those here.
+ if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
+ {
+ generateXMLForMember(md,ti,t,d);
+ }
}
t << " </sectiondef>" << endl;
}