diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2006-05-07 18:20:12 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2006-05-07 18:20:12 (GMT) |
commit | 0674d909555d4b1fe1e000425195ef33b00fe1a5 (patch) | |
tree | 2d15670fa3b1c4279e9d9439de2606f91f865d8b /src/memberdef.cpp | |
parent | 6f84cba4db755b69633ad66f6efbbaf94ca8df81 (diff) | |
download | Doxygen-0674d909555d4b1fe1e000425195ef33b00fe1a5.zip Doxygen-0674d909555d4b1fe1e000425195ef33b00fe1a5.tar.gz Doxygen-0674d909555d4b1fe1e000425195ef33b00fe1a5.tar.bz2 |
Release-1.4.6-20060507
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r-- | src/memberdef.cpp | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp index f0103c2..87f620d 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2005 by Dimitri van Heesch. + * Copyright (C) 1997-2006 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -333,6 +333,7 @@ MemberDef::MemberDef(const char *df,int dl, //membTAL=0; m_defTmpArgLists=0; m_hasCallGraph = FALSE; + m_hasCallerGraph = FALSE; initLines=0; type=t; if (mt==Typedef) type.stripPrefix("typedef "); @@ -1908,7 +1909,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, && isFunction() && Config_getBool("HAVE_DOT") ) { - DotCallGraph callGraph(this,Config_getInt("MAX_DOT_GRAPH_DEPTH")); + DotCallGraph callGraph(this,Config_getInt("MAX_DOT_GRAPH_DEPTH"), false); if (!callGraph.isTrivial()) { msg("Generating call graph for function %s\n",qualifiedName().data()); @@ -1920,6 +1921,22 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.enableAll(); } } + if ((m_hasCallerGraph || Config_getBool("CALLER_GRAPH")) + && isFunction() && Config_getBool("HAVE_DOT") + ) + { + DotCallGraph callerGraph(this,Config_getInt("MAX_DOT_GRAPH_DEPTH"), true); + if (!callerGraph.isTrivial()) + { + msg("Generating caller graph for function %s\n",qualifiedName().data()); + ol.disable(OutputGenerator::Man); + ol.newParagraph(); + ol.startCallGraph(); + ol.parseText(theTranslator->trCallerGraph()); + ol.endCallGraph(callerGraph); + ol.enableAll(); + } + } ol.endIndent(); @@ -1950,6 +1967,27 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, } +QCString MemberDef::memberTypeName() const +{ + switch (mtype) + { + case Define: return "define"; + case Function: return "function"; + case Variable: return "variable"; + case Typedef: return "typedef"; + case Enumeration: return "enumeration"; + case EnumValue: return "enumvalue"; + case Prototype: return "prototype"; + case Signal: return "signal"; + case Slot: return "slot"; + case Friend: return "friend"; + case DCOP: return "dcop"; + case Property: return "property"; + case Event: return "event"; + default: return "unknown"; + } +} + void MemberDef::warnIfUndocumented() { if (memberGroup) return; @@ -1979,8 +2017,8 @@ void MemberDef::warnIfUndocumented() (prot!=Private || Config_getBool("EXTRACT_PRIVATE")) ) { - warn_undoc(m_defFileName,m_defLine,"Warning: Member %s%s of %s %s is not documented.", - name().data(),argsString()?argsString():"",t,d->name().data()); + warn_undoc(m_defFileName,m_defLine,"Warning: Member %s%s (%s) of %s %s is not documented.", + name().data(),argsString()?argsString():"",memberTypeName().data(),t,d->name().data()); } } @@ -2459,6 +2497,12 @@ void MemberDef::enableCallGraph(bool e) if (e) Doxygen::parseSourcesNeeded = TRUE; } +void MemberDef::enableCallerGraph(bool e) +{ + m_hasCallerGraph=e; + if (e) Doxygen::parseSourcesNeeded = TRUE; +} + bool MemberDef::protectionVisible() const { return prot==Public || |