Commit 21178ab4 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Bug 730520 - No documentation generated for method-less C++ struct

parent 0921dea6
......@@ -3413,8 +3413,7 @@ QCString ClassDef::getOutputFileBase() const
{
static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
if (!Doxygen::generatingXmlOutput && !separateMemberPages)
if (!Doxygen::generatingXmlOutput)
{
Definition *scope=0;
if (inlineGroupedClasses && partOfGroups()!=0)
......
......@@ -24,6 +24,7 @@
#include "vhdldocgen.h"
#include "defargs.h"
#include "arguments.h"
#include "groupdef.h"
ClassList::ClassList() : QList<ClassDef>()
{
......@@ -131,21 +132,17 @@ void ClassSDict::writeDocumentation(OutputList &ol,Definition * container)
ClassDef *cd=0;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
//printf("%s:writeDocumentation() %p embedded=%d container=%p\n",
// cd->name().data(),cd->getOuterScope(),cd->isEmbeddedInOuterScope(),
// container);
//printf("%s:writeDocumentation() %p linkable=%d embedded=%d container=%p partOfGroups=%d\n",
// cd->name().data(),cd->getOuterScope(),cd->isLinkableInProject(),cd->isEmbeddedInOuterScope(),
// container,cd->partOfGroups() ? cd->partOfGroups()->count() : 0);
if (cd->name().find('@')==-1 &&
cd->isLinkableInProject() &&
cd->isEmbeddedInOuterScope() &&
(container==0 || cd->partOfGroups()==0) // if container==0 -> show as part of the group docs, otherwise only show if not part of a group
//&&
//(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
//)
)
{
//printf(" showing class %s\n",cd->name().data());
if (!found)
{
ol.writeRuler();
......
......@@ -432,7 +432,15 @@ void FileDef::writeClassDeclarations(OutputList &ol,const QCString &title)
void FileDef::writeInlineClasses(OutputList &ol)
{
// temporarily undo the disbling could be done by startMemberDocumentation()
// as a result of setting SEPARATE_MEMBER_PAGES to YES; see bug730512
bool isEnabled = ol.isEnabled(OutputGenerator::Html);
ol.enable(OutputGenerator::Html);
if (m_classSDict) m_classSDict->writeDocumentation(ol,this);
// restore the initial state if needed
if (!isEnabled) ol.disable(OutputGenerator::Html);
}
void FileDef::startMemberDeclarations(OutputList &ol)
......
......@@ -942,7 +942,9 @@ bool MemberDef::hasExamples()
QCString MemberDef::getOutputFileBase() const
{
static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
QCString baseName;
//printf("Member: %s: templateMaster=%p group=%p classDef=%p nspace=%p fileDef=%p\n",
// name().data(),m_impl->templateMaster,m_impl->group,m_impl->classDef,
// m_impl->nspace,m_impl->fileDef);
......@@ -961,6 +963,10 @@ QCString MemberDef::getOutputFileBase() const
else if (m_impl->classDef)
{
baseName=m_impl->classDef->getOutputFileBase();
if (inlineSimpleClasses && m_impl->classDef->isSimple())
{
return baseName;
}
}
else if (m_impl->nspace)
{
......
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