summaryrefslogtreecommitdiffstats
path: root/src/classlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/classlist.cpp')
-rw-r--r--src/classlist.cpp43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/classlist.cpp b/src/classlist.cpp
index 953cf61..bb6ab73 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -96,8 +96,6 @@ bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const
void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
const char *header,bool localNames)
{
-// static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
-// bool first=TRUE;
if (count()>0)
{
ClassSDict::Iterator sdi(*this);
@@ -110,45 +108,48 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
(filter==0 || *filter==cd->compoundType())
)
{
-// //bool isLink = cd->isLinkable();
-// if (inlineGroupedClasses && cd->partOfGroups()->count()>0)
-// {
-// cd->writeInlineDeclaration(ol,first);
-// first=FALSE;
-// }
-// else // show link's only
-// {
- cd->writeDeclarationLink(ol,found,header,localNames);
-// }
+ cd->writeDeclarationLink(ol,found,header,localNames);
}
}
if (found) ol.endMemberList();
}
}
-void ClassSDict::writeDocumentation(OutputList &ol)
+void ClassSDict::writeDocumentation(OutputList &ol,Definition *container)
{
static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
- if (!inlineGroupedClasses) return;
+ static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ if (!inlineGroupedClasses && !inlineSimpleClasses) return;
if (count()>0)
{
- ol.writeRuler();
- ol.startGroupHeader();
- ol.parseText(fortranOpt?theTranslator->trTypeDocumentation():
- theTranslator->trClassDocumentation());
- ol.endGroupHeader();
+ bool found=FALSE;
ClassSDict::Iterator sdi(*this);
ClassDef *cd=0;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
- if (cd->name().find('@')==-1 &&
- cd->partOfGroups()->count()==1
+ //printf("%s:writeDocumentation() %p=%p embedded=%d\n",
+ // cd->name().data(),container,cd->getOuterScope(),cd->isEmbeddedInOuterScope());
+
+ if (cd->name().find('@')==-1 && cd->isEmbeddedInOuterScope() &&
+ (container==0 || // no container -> used for groups
+ cd->getOuterScope()==container || // correct container -> used for namespaces and classes
+ (container->definitionType()==Definition::TypeFile && cd->getOuterScope()==Doxygen::globalScope && cd->partOfGroups()==0) // non grouped class with file scope -> used for files
+ )
)
{
+ if (!found)
+ {
+ ol.writeRuler();
+ ol.startGroupHeader();
+ ol.parseText(fortranOpt?theTranslator->trTypeDocumentation():
+ theTranslator->trClassDocumentation());
+ ol.endGroupHeader();
+ found=TRUE;
+ }
cd->writeInlineDocumentation(ol);
}
}