diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2011-07-27 19:00:12 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2011-07-27 19:00:12 (GMT) |
commit | 64f0c97c3adaa28edf6f1da3264621a18c1d1adb (patch) | |
tree | e4c6389f90f951bbd01b45ad4377b0b475dd246f /src/classlist.cpp | |
parent | b655037884e82e257794004d4e88d3a9ed29d5c3 (diff) | |
download | Doxygen-64f0c97c3adaa28edf6f1da3264621a18c1d1adb.zip Doxygen-64f0c97c3adaa28edf6f1da3264621a18c1d1adb.tar.gz Doxygen-64f0c97c3adaa28edf6f1da3264621a18c1d1adb.tar.bz2 |
Release-1.7.4-20110727
Diffstat (limited to 'src/classlist.cpp')
-rw-r--r-- | src/classlist.cpp | 43 |
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); } } |