summaryrefslogtreecommitdiffstats
path: root/src/memberdef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-11-26 19:53:39 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-11-26 19:53:39 (GMT)
commiteed0c89f7534b387004da7badcbabdf66570c685 (patch)
treed1259f61bbceef54b55372c127470f199a296461 /src/memberdef.cpp
parent727e5e1c179148fdc4123176ac2d9021c33e3eba (diff)
downloadDoxygen-eed0c89f7534b387004da7badcbabdf66570c685.zip
Doxygen-eed0c89f7534b387004da7badcbabdf66570c685.tar.gz
Doxygen-eed0c89f7534b387004da7badcbabdf66570c685.tar.bz2
Bug 692004 - show includes for free functions
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r--src/memberdef.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 6b1300c..b95d399 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -2382,6 +2382,46 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
}
}
+void MemberDef::_writeGroupInclude(OutputList &ol,bool inGroup)
+{
+ // only write out the include file if this is not part of a class or file
+ // definition
+ static bool showGroupedMembInc = Config_getBool("SHOW_GROUPED_MEMB_INC");
+ FileDef *fd = getFileDef();
+ QCString nm;
+ if (fd) nm = getFileDef()->docName();
+ if (inGroup && fd && showGroupedMembInc && !nm.isEmpty())
+ {
+ ol.startParagraph();
+ ol.startTypewriter();
+ SrcLangExt lang = getLanguage();
+ bool isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
+ if (isIDLorJava)
+ {
+ ol.docify("import ");
+ }
+ else
+ {
+ ol.docify("#include ");
+ }
+
+ if (isIDLorJava) ol.docify("\""); else ol.docify("<");
+
+ if (fd && fd->isLinkable())
+ {
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),fd->anchor(),nm);
+ }
+ else
+ {
+ ol.docify(nm);
+ }
+
+ if (isIDLorJava) ol.docify("\""); else ol.docify(">");
+
+ ol.endTypewriter();
+ ol.endParagraph();
+ }
+}
/*! Writes the "detailed documentation" section of this member to
* all active output formats.
@@ -2711,6 +2751,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.endDoxyAnchor(cfname,memAnchor);
ol.startIndent();
+ _writeGroupInclude(ol,inGroup);
+
/* write multi-line initializer (if any) */
if (hasMultiLineInitializer()
//initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled