summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/commands.doc77
-rw-r--r--src/commentscan.l32
-rw-r--r--src/context.cpp40
-rw-r--r--src/definition.cpp10
-rw-r--r--src/doxygen.cpp33
-rw-r--r--src/entry.cpp6
-rw-r--r--src/entry.h2
-rw-r--r--src/marshal.cpp4
-rw-r--r--src/memberdef.cpp35
-rw-r--r--src/memberdef.h6
-rw-r--r--src/util.cpp7
-rw-r--r--src/vhdldocgen.cpp4
12 files changed, 236 insertions, 20 deletions
diff --git a/doc/commands.doc b/doc/commands.doc
index 840c3b7..53e6837 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -106,6 +106,8 @@ documentation:
\refitem cmdheaderfile \\headerfile
\refitem cmdhidecallergraph \\hidecallergraph
\refitem cmdhidecallgraph \\hidecallgraph
+\refitem cmdhidereferencedbyrelation \\hidereferencedbyrelation
+\refitem cmdhidereferencesrelation \\hidereferencesrelation
\refitem cmdhideinitializer \\hideinitializer
\refitem cmdhtmlinclude \\htmlinclude
\refitem cmdhtmlonly \\htmlonly
@@ -156,7 +158,9 @@ documentation:
\refitem cmdpublicsection \\publicsection
\refitem cmdpure \\pure
\refitem cmdref \\ref
-\refitem cmdrefitem \\refitem
+\refitem cmdreferencedbyrelation \\refitem
+\refitem cmdrefitem \\referencedbyrelation
+\refitem cmdreferencesrelation \\referencesrelation
\refitem cmdrelated \\related
\refitem cmdrelates \\relates
\refitem cmdrelatedalso \\relatedalso
@@ -306,7 +310,7 @@ Structural indicators
When this command is put in a comment block of a function or method
and \ref cfg_have_dot "HAVE_DOT" is set to \c YES, then doxygen will
generate a caller graph for that function (provided the implementation of the
- function or method calls other documented functions). The caller graph will be
+ function or method is called by other documented functions). The caller graph will be
generated regardless of the value of \ref cfg_caller_graph "CALLER_GRAPH".
\note The completeness (and correctness) of the caller graph depends on the
doxygen code parser which is not perfect.
@@ -333,6 +337,74 @@ Structural indicators
option \ref cfg_caller_graph "CALLER_GRAPH"
<hr>
+\section cmdreferencedbyrelation \\referencedbyrelation
+
+ \addindex \\referencedbyrelation
+ When this command is put in a comment block of a function, method or variable,
+ then doxygen will generate an overview for that function, method, variable of
+ the, documented, funcions and methods that call / use it.
+ The overview will be generated regardless of the value of
+ \ref cfg_referenced_by_relation "REFERENCED_BY_RELATION".
+ \note The completeness (and correctness) of the overview depends on the
+ doxygen code parser which is not perfect.
+
+ \sa section \ref cmdreferencesrelation "\\referencesrelation",
+ section \ref cmdhidereferencedbyrelation "\\hidereferencedbyrelation",
+ section \ref cmdhidereferencesrelation "\\hidereferencesrelation" and
+ option \ref cfg_referenced_by_relation "REFERENCED_BY_RELATION"
+
+<hr>
+\section cmdhidereferencedbyrelation \\hidereferencedbyrelation
+
+ \addindex \\hidereferencedbyrelation
+ When this command is put in a comment block of a function, method or variable
+ then doxygen will not generate an overview for that function, method or
+ variable of the functions and methods that call / use it.
+ The overview will not be generated regardless of the value of
+ \ref cfg_referenced_by_relation "REFERENCED_BY_RELATION".
+ \note The completeness (and correctness) of the overview depends on the
+ doxygen code parser which is not perfect.
+
+ \sa section \ref cmdreferencesrelation "\\referencesrelation",
+ section \ref cmdreferencedbyrelation "\\referencedbyrelation",
+ section \ref cmdhidereferencesrelation "\\hidereferencesrelation" and
+ option \ref cfg_referenced_by_relation "REFERENCED_BY_RELATION"
+
+<hr>
+\section cmdreferencesrelation \\referencesrelation
+
+ \addindex \\referencesrelation
+ When this command is put in a comment block of a function or method,
+ then doxygen will generate an overview for that function or method of the
+ functions and methods that call it.
+ The overview will be generated regardless of the value of
+ \ref cfg_references_relation "REFERENCES_RELATION".
+ \note The completeness (and correctness) of the overview depends on the
+ doxygen code parser which is not perfect.
+
+ \sa section \ref cmdreferencedbyrelation "\\referencedbyrelation",
+ section \ref cmdhidereferencedbyrelation "\\hidereferencedbyrelation",
+ section \ref cmdhidereferencesrelation "\\hidereferencesrelation" and
+ option \ref cfg_references_relation "REFERENCES_RELATION"
+
+<hr>
+\section cmdhidereferencesrelation \\hidereferencesrelation
+
+ \addindex \\hidereferencesrelation
+ When this command is put in a comment block of a function or method
+ and then doxygen will not generate an overview for that function or method of
+ the functions and methods that call it.
+ The overview will not be generated regardless of the value of
+ \ref cfg_references_relation "REFERENCES_RELATION".
+ \note The completeness (and correctness) of the overview depends on the
+ doxygen code parser which is not perfect.
+
+ \sa section \ref cmdreferencesrelation "\\referencesrelation",
+ section \ref cmdreferencedbyrelation "\\referencedbyrelation",
+ section \ref cmdhidereferencedbyrelation "\\hidereferencedbyrelation" and
+ option \ref cfg_references_relation "REFERENCES_RELATION"
+
+<hr>
\section cmdcategory \\category <name> [<header-file>] [<header-name>]
\addindex \\category
@@ -3424,4 +3496,3 @@ Go to the <a href="htmlcmds.html">next</a> section or return to the
\endhtmlonly
*/
-
diff --git a/src/commentscan.l b/src/commentscan.l
index ac83729..1edfa21 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -107,6 +107,10 @@ static bool handleCallgraph(const QCString &, const QCStringList &);
static bool handleHideCallgraph(const QCString &, const QCStringList &);
static bool handleCallergraph(const QCString &, const QCStringList &);
static bool handleHideCallergraph(const QCString &, const QCStringList &);
+static bool handleReferencedByRelation(const QCString &, const QCStringList &);
+static bool handleHideReferencedByRelation(const QCString &, const QCStringList &);
+static bool handleReferencesRelation(const QCString &, const QCStringList &);
+static bool handleHideReferencesRelation(const QCString &, const QCStringList &);
static bool handleInternal(const QCString &, const QCStringList &);
static bool handleLineBr(const QCString &, const QCStringList &);
static bool handleStatic(const QCString &, const QCStringList &);
@@ -214,6 +218,10 @@ static DocCmdMap docCmdMap[] =
{ "hidecallgraph", &handleHideCallgraph, FALSE },
{ "callergraph", &handleCallergraph, FALSE },
{ "hidecallergraph", &handleHideCallergraph, FALSE },
+ { "referencedbyrelation", &handleReferencedByRelation, FALSE },
+ { "hidereferencedbyrelation", &handleHideReferencedByRelation, FALSE },
+ { "referencesrelation", &handleReferencesRelation, FALSE },
+ { "hidereferencesrelation", &handleHideReferencesRelation, FALSE },
{ "internal", &handleInternal, TRUE },
{ "_linebr", &handleLineBr, FALSE },
{ "static", &handleStatic, FALSE },
@@ -2831,6 +2839,30 @@ static bool handleHideCallergraph(const QCString &, const QCStringList &)
return FALSE;
}
+static bool handleReferencedByRelation(const QCString &, const QCStringList &)
+{
+ current->referencedByRelation = TRUE; // ON
+ return FALSE;
+}
+
+static bool handleHideReferencedByRelation(const QCString &, const QCStringList &)
+{
+ current->referencedByRelation = FALSE; // OFF
+ return FALSE;
+}
+
+static bool handleReferencesRelation(const QCString &, const QCStringList &)
+{
+ current->referencesRelation = TRUE; // ON
+ return FALSE;
+}
+
+static bool handleHideReferencesRelation(const QCString &, const QCStringList &)
+{
+ current->referencesRelation = FALSE; // OFF
+ return FALSE;
+}
+
static bool handleInternal(const QCString &, const QCStringList &)
{
if (!Config_getBool(INTERNAL_DOCS))
diff --git a/src/context.cpp b/src/context.cpp
index 33e7dcf..12c8c34 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -856,6 +856,14 @@ class TranslateContext::Private
{
return theTranslator->trCallerGraph();
}
+ TemplateVariant referencedByRelation() const
+ {
+ return theTranslator->trReferencedBy();
+ }
+ TemplateVariant referencesRelation() const
+ {
+ return theTranslator->trReferences();
+ }
TemplateVariant inheritedFrom() const
{
return theTranslator->trInheritedFrom("@0","@1");
@@ -1112,6 +1120,10 @@ class TranslateContext::Private
s_inst.addProperty("callGraph", &Private::callGraph);
//%% string callerGraph
s_inst.addProperty("callerGraph", &Private::callerGraph);
+ //%% string referencedByRelation
+ s_inst.addProperty("referencedByRelation", &Private::referencedByRelation);
+ //%% string referencesRelation
+ s_inst.addProperty("referencesRelation", &Private::referencesRelation);
//%% markerstring inheritedFrom
s_inst.addProperty("inheritedFrom", &Private::inheritedFrom);
//%% string addtionalInheritedMembers
@@ -3994,6 +4006,10 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
s_inst.addProperty("callGraph", &Private::callGraph);
s_inst.addProperty("hasCallerGraph", &Private::hasCallerGraph);
s_inst.addProperty("callerGraph", &Private::callerGraph);
+ s_inst.addProperty("hasReferencedByRelation", &Private::hasReferencedByRelation);
+ s_inst.addProperty("referencedByRelation", &Private::referencedByRelation);
+ s_inst.addProperty("hasReferencesRelation", &Private::hasReferencesRelation);
+ s_inst.addProperty("referencesRelation", &Private::referencesRelation);
s_inst.addProperty("fieldType", &Private::fieldType);
s_inst.addProperty("type", &Private::type);
s_inst.addProperty("detailsVisibleFor", &Private::detailsVisibleFor);
@@ -4918,6 +4934,10 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
return TemplateVariant(FALSE);
}
+ TemplateVariant hasReferencedByRelation() const
+ {
+ return TemplateVariant(m_memberDef->hasReferencedByRelation());
+ }
TemplateVariant callGraph() const
{
if (hasCallGraph().toBool())
@@ -4958,6 +4978,14 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
return TemplateVariant("");
}
}
+ TemplateVariant referencedByRelation() const
+ {
+ if (hasReferencedByRelation().toBool())
+ {
+ err("context.cpp: output format not yet supported");
+ }
+ return TemplateVariant("");
+ }
DotCallGraph *getCallerGraph() const
{
Cachable &cache = getCache();
@@ -4978,6 +5006,10 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
return TemplateVariant(FALSE);
}
+ TemplateVariant hasReferencesRelation() const
+ {
+ return TemplateVariant(m_memberDef->hasReferencesRelation());
+ }
TemplateVariant callerGraph() const
{
if (hasCallerGraph().toBool())
@@ -5018,6 +5050,14 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
return TemplateVariant("");
}
}
+ TemplateVariant referencesRelation() const
+ {
+ if (hasReferencesRelation().toBool())
+ {
+ err("context.cpp: output format not yet supported");
+ }
+ return TemplateVariant("");
+ }
TemplateVariant type() const
{
return m_memberDef->typeString();
diff --git a/src/definition.cpp b/src/definition.cpp
index bd97f6d..33cf7ea 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1446,18 +1446,12 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName)
{
- if (Config_getBool(REFERENCED_BY_RELATION))
- {
- _writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_impl->sourceRefByDict,FALSE);
- }
+ _writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_impl->sourceRefByDict,FALSE);
}
void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
{
- if (Config_getBool(REFERENCES_RELATION))
- {
- _writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_impl->sourceRefsDict,TRUE);
- }
+ _writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_impl->sourceRefsDict,TRUE);
}
bool Definition::hasDocumentation() const
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 13c60fb..58c7019 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2187,6 +2187,8 @@ static void findUsingDeclImports(EntryNav *rootNav)
newMd->setDefinition(md->definition());
newMd->enableCallGraph(root->callGraph);
newMd->enableCallerGraph(root->callerGraph);
+ newMd->enableReferencedByRelation(root->referencedByRelation);
+ newMd->enableReferencesRelation(root->referencesRelation);
newMd->setBitfields(md->bitfieldString());
newMd->addSectionsToDefinition(root->anchors);
newMd->setBodySegment(md->getStartBodyLine(),md->getEndBodyLine());
@@ -2383,6 +2385,8 @@ static MemberDef *addVariableToClass(
md->setWriteAccessor(root->write);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
md->setHidden(root->hidden);
md->setArtificial(root->artificial);
md->setLanguage(root->lang);
@@ -2620,6 +2624,8 @@ static MemberDef *addVariableToFile(
md->setId(root->id);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
md->setExplicitExternal(root->explicitExternal);
//md->setOuterScope(fd);
if (!root->explicitExternal)
@@ -3133,6 +3139,8 @@ static void addInterfaceOrServiceToServiceOrSingleton(
md->setDefinition(def);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
Debug::print(Debug::Functions,0,
" Interface Member:\n"
@@ -3385,6 +3393,8 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd,
md->setDefinition(def);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
Debug::print(Debug::Functions,0,
" Func Member:\n"
@@ -3652,6 +3662,8 @@ static void buildFunctionList(EntryNav *rootNav)
md->enableCallGraph(md->hasCallGraph() || root->callGraph);
md->enableCallerGraph(md->hasCallerGraph() || root->callerGraph);
+ md->enableReferencedByRelation(md->hasReferencedByRelation() || root->referencedByRelation);
+ md->enableReferencesRelation(md->hasReferencesRelation() || root->referencesRelation);
// merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->getFirst()!=0)
@@ -3771,6 +3783,8 @@ static void buildFunctionList(EntryNav *rootNav)
md->setDefinition(def);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
@@ -3922,8 +3936,13 @@ static void findFriends()
mmd->enableCallGraph(mmd->hasCallGraph() || fmd->hasCallGraph());
mmd->enableCallerGraph(mmd->hasCallerGraph() || fmd->hasCallerGraph());
+ mmd->enableReferencedByRelation(mmd->hasReferencedByRelation() || fmd->hasReferencedByRelation());
+ mmd->enableReferencesRelation(mmd->hasReferencesRelation() || fmd->hasReferencesRelation());
+
fmd->enableCallGraph(mmd->hasCallGraph() || fmd->hasCallGraph());
fmd->enableCallerGraph(mmd->hasCallerGraph() || fmd->hasCallerGraph());
+ fmd->enableReferencedByRelation(mmd->hasReferencedByRelation() || fmd->hasReferencedByRelation());
+ fmd->enableReferencesRelation(mmd->hasReferencesRelation() || fmd->hasReferencesRelation());
}
}
}
@@ -5323,6 +5342,8 @@ static void addMemberDocs(EntryNav *rootNav,
md->setDefinition(fDecl);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
ClassDef *cd=md->getClassDef();
NamespaceDef *nd=md->getNamespaceDef();
QCString fullName;
@@ -5415,6 +5436,8 @@ static void addMemberDocs(EntryNav *rootNav,
md->enableCallGraph(md->hasCallGraph() || root->callGraph);
md->enableCallerGraph(md->hasCallerGraph() || root->callerGraph);
+ md->enableReferencedByRelation(md->hasReferencedByRelation() || root->referencedByRelation);
+ md->enableReferencesRelation(md->hasReferencesRelation() || root->referencesRelation);
md->mergeMemberSpecifiers(root->spec);
md->addSectionsToDefinition(root->anchors);
@@ -6447,6 +6470,8 @@ static void findMember(EntryNav *rootNav,
md->setDefinition(funcDecl);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
md->setDocumentation(root->doc,root->docFile,root->docLine);
md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
@@ -6512,6 +6537,8 @@ static void findMember(EntryNav *rootNav,
md->setDefinition(funcDecl);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
QCString doc=getOverloadDocs();
doc+="<p>";
doc+=root->doc;
@@ -6716,6 +6743,8 @@ static void findMember(EntryNav *rootNav,
md->setDefinition(funcDecl);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
md->setDocumentation(root->doc,root->docFile,root->docLine);
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
md->setDocsForDefinition(!root->proto);
@@ -6788,6 +6817,8 @@ localObjCMethod:
md->setDefinition(funcDecl);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
md->setDocumentation(root->doc,root->docFile,root->docLine);
md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
@@ -7130,6 +7161,8 @@ static void findEnums(EntryNav *rootNav)
md->setMemberGroupId(root->mGrpId);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
+ md->enableReferencedByRelation(root->referencedByRelation);
+ md->enableReferencesRelation(root->referencesRelation);
//printf("%s::setRefItems(%d)\n",md->name().data(),root->sli?root->sli->count():-1);
md->setRefItems(root->sli);
//printf("found enum %s nd=%p\n",md->name().data(),nd);
diff --git a/src/entry.cpp b/src/entry.cpp
index a0460da..4332186 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -79,6 +79,8 @@ Entry::Entry(const Entry &e)
subGrouping = e.subGrouping;
callGraph = e.callGraph;
callerGraph = e.callerGraph;
+ referencedByRelation = e.referencedByRelation;
+ referencesRelation = e.referencesRelation;
virt = e.virt;
args = e.args;
bitfields = e.bitfields;
@@ -219,6 +221,8 @@ void Entry::reset()
{
static bool entryCallGraph = Config_getBool(CALL_GRAPH);
static bool entryCallerGraph = Config_getBool(CALLER_GRAPH);
+ static bool entryReferencedByRelation = Config_getBool(REFERENCED_BY_RELATION);
+ static bool entryReferencesRelation = Config_getBool(REFERENCES_RELATION);
//printf("Entry::reset()\n");
name.resize(0);
type.resize(0);
@@ -250,6 +254,8 @@ void Entry::reset()
mGrpId = -1;
callGraph = entryCallGraph;
callerGraph = entryCallerGraph;
+ referencedByRelation = entryReferencedByRelation;
+ referencesRelation = entryReferencesRelation;
section = EMPTY_SEC;
mtype = Method;
virt = Normal;
diff --git a/src/entry.h b/src/entry.h
index 739b128..8187e03 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -249,6 +249,8 @@ class Entry
bool subGrouping; //!< automatically group class members?
bool callGraph; //!< do we need to draw the call graph?
bool callerGraph; //!< do we need to draw the caller graph?
+ bool referencedByRelation;//!< do we need to show the referenced by relation?
+ bool referencesRelation; //!< do we need to show the references relation?
Specifier virt; //!< virtualness of the entry
QCString args; //!< member argument string
QCString bitfields; //!< member's bit fields
diff --git a/src/marshal.cpp b/src/marshal.cpp
index f0ed2e8..25a9a89 100644
--- a/src/marshal.cpp
+++ b/src/marshal.cpp
@@ -370,6 +370,8 @@ void marshalEntry(StorageIntf *s,Entry *e)
marshalBool(s,e->subGrouping);
marshalBool(s,e->callGraph);
marshalBool(s,e->callerGraph);
+ marshalBool(s,e->referencedByRelation);
+ marshalBool(s,e->referencesRelation);
marshalInt(s,(int)e->virt);
marshalQCString(s,e->args);
marshalQCString(s,e->bitfields);
@@ -780,6 +782,8 @@ Entry * unmarshalEntry(StorageIntf *s)
e->subGrouping = unmarshalBool(s);
e->callGraph = unmarshalBool(s);
e->callerGraph = unmarshalBool(s);
+ e->referencedByRelation = unmarshalBool(s);
+ e->referencesRelation = unmarshalBool(s);
e->virt = (Specifier)unmarshalInt(s);
e->args = unmarshalQCString(s);
e->bitfields = unmarshalQCString(s);
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 5d74270..eb90cd1 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -584,6 +584,8 @@ class MemberDefImpl
bool annUsed;
bool hasCallGraph;
bool hasCallerGraph;
+ bool hasReferencedByRelation;
+ bool hasReferencesRelation;
bool explExt; // member was explicitly declared external
bool tspec; // member is a template specialization
bool groupHasDocs; // true if the entry that caused the grouping was documented
@@ -647,6 +649,8 @@ void MemberDefImpl::init(Definition *def,
defTmpArgLists=0;
hasCallGraph = FALSE;
hasCallerGraph = FALSE;
+ hasReferencedByRelation = FALSE;
+ hasReferencesRelation = FALSE;
initLines=0;
type=t;
if (mt==MemberType_Typedef) type.stripPrefix("typedef ");
@@ -2984,9 +2988,9 @@ void MemberDef::writeDocumentation(MemberList *ml,
_writeExamples(ol);
_writeTypeConstraints(ol);
writeSourceDef(ol,cname);
- writeSourceRefs(ol,cname);
- writeSourceReffedBy(ol,cname);
writeInlineCode(ol,cname);
+ if (hasReferencesRelation()) writeSourceRefs(ol,cname);
+ if (hasReferencedByRelation()) writeSourceReffedBy(ol,cname);
_writeCallGraph(ol);
_writeCallerGraph(ol);
@@ -3960,6 +3964,18 @@ void MemberDef::enableCallerGraph(bool e)
if (e) Doxygen::parseSourcesNeeded = TRUE;
}
+void MemberDef::enableReferencedByRelation(bool e)
+{
+ m_impl->hasReferencedByRelation=e;
+ if (e) Doxygen::parseSourcesNeeded = TRUE;
+}
+
+void MemberDef::enableReferencesRelation(bool e)
+{
+ m_impl->hasReferencesRelation=e;
+ if (e) Doxygen::parseSourcesNeeded = TRUE;
+}
+
#if 0
bool MemberDef::protectionVisible() const
{
@@ -4592,6 +4608,16 @@ bool MemberDef::hasCallerGraph() const
return m_impl->hasCallerGraph;
}
+bool MemberDef::hasReferencedByRelation() const
+{
+ return m_impl->hasReferencedByRelation;
+}
+
+bool MemberDef::hasReferencesRelation() const
+{
+ return m_impl->hasReferencesRelation;
+}
+
MemberDef *MemberDef::templateMaster() const
{
return m_impl->templateMaster;
@@ -5104,6 +5130,11 @@ void combineDeclarationAndDefinition(MemberDef *mdec,MemberDef *mdef)
mdef->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph());
mdec->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
mdec->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph());
+
+ mdef->enableReferencedByRelation(mdec->hasReferencedByRelation() || mdef->hasReferencedByRelation());
+ mdef->enableCallerGraph(mdec->hasReferencesRelation() || mdef->hasReferencesRelation());
+ mdec->enableReferencedByRelation(mdec->hasReferencedByRelation() || mdef->hasReferencedByRelation());
+ mdec->enableCallerGraph(mdec->hasReferencesRelation() || mdef->hasReferencesRelation());
}
}
}
diff --git a/src/memberdef.h b/src/memberdef.h
index bf7ea9a..e9524c6 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -237,6 +237,9 @@ class MemberDef : public Definition
bool hasCallGraph() const;
bool hasCallerGraph() const;
bool visibleMemberGroup(bool hideNoHeader);
+ // refrenced related members
+ bool hasReferencesRelation() const;
+ bool hasReferencedByRelation() const;
MemberDef *templateMaster() const;
QCString getScopeString() const;
@@ -349,6 +352,9 @@ class MemberDef : public Definition
void enableCallGraph(bool e);
void enableCallerGraph(bool e);
+ void enableReferencedByRelation(bool e);
+ void enableReferencesRelation(bool e);
+
void setTemplateMaster(MemberDef *mt);
void addListReference(Definition *d);
void setDocsForDefinition(bool b);
diff --git a/src/util.cpp b/src/util.cpp
index 7371026..afb9905 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -8505,12 +8505,9 @@ bool fileVisibleInIndex(FileDef *fd,bool &genSourceFile)
void addDocCrossReference(MemberDef *src,MemberDef *dst)
{
- static bool referencedByRelation = Config_getBool(REFERENCED_BY_RELATION);
- static bool referencesRelation = Config_getBool(REFERENCES_RELATION);
-
//printf("--> addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data());
if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types
- if ((referencedByRelation || dst->hasCallerGraph()) &&
+ if ((dst->hasReferencedByRelation() || dst->hasCallerGraph()) &&
src->showInCallGraph()
)
{
@@ -8526,7 +8523,7 @@ void addDocCrossReference(MemberDef *src,MemberDef *dst)
mdDecl->addSourceReferencedBy(src);
}
}
- if ((referencesRelation || src->hasCallGraph()) &&
+ if ((src->hasReferencesRelation() || src->hasCallGraph()) &&
src->showInCallGraph()
)
{
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 287565b..9ac0cfd 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -2466,8 +2466,8 @@ void VhdlDocGen::writeSource(MemberDef *mdef,OutputList& ol,QCString & cname)
if (cname.isEmpty()) return;
mdef->writeSourceDef(ol,cname);
- mdef->writeSourceRefs(ol,cname);
- mdef->writeSourceReffedBy(ol,cname);
+ if (mdef->hasReferencesRelation()) mdef->writeSourceRefs(ol,cname);
+ if (mdef->hasReferencedByRelation()) mdef->writeSourceReffedBy(ol,cname);
}