summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/commands.doc75
-rw-r--r--src/commentscan.l32
-rw-r--r--src/context.cpp40
-rw-r--r--src/definition.cpp22
-rw-r--r--src/docbookvisitor.cpp3
-rw-r--r--src/doctokenizer.l4
-rw-r--r--src/doxygen.cpp35
-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
14 files changed, 250 insertions, 25 deletions
diff --git a/doc/commands.doc b/doc/commands.doc
index dc55252..fb03d98 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -106,6 +106,8 @@ documentation:
\refitem cmdheaderfile \\headerfile
\refitem cmdhidecallergraph \\hidecallergraph
\refitem cmdhidecallgraph \\hidecallgraph
+\refitem cmdhiderefby \\hiderefby
+\refitem cmdhiderefs \\hiderefs
\refitem cmdhideinitializer \\hideinitializer
\refitem cmdhtmlinclude \\htmlinclude
\refitem cmdhtmlonly \\htmlonly
@@ -174,6 +176,8 @@ documentation:
\refitem cmdsee \\see
\refitem cmdshort \\short
\refitem cmdshowinitializer \\showinitializer
+\refitem cmdshowrefby \\showrefby
+\refitem cmdshowrefs \\showrefs
\refitem cmdsince \\since
\refitem cmdskip \\skip
\refitem cmdskipline \\skipline
@@ -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 cmdshowrefby \\showrefby
+
+ \addindex \\showrefby
+ 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 cmdshowrefs "\\showrefs",
+ section \ref cmdhiderefby "\\hiderefby",
+ section \ref cmdhiderefs "\\hiderefs" and
+ option \ref cfg_referenced_by_relation "REFERENCED_BY_RELATION"
+
+<hr>
+\section cmdhiderefby \\hiderefby
+
+ \addindex \\hiderefby
+ 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 cmdshowrefs "\\showrefs",
+ section \ref cmdshowrefby "\\showrefby",
+ section \ref cmdhiderefs "\\hiderefs" and
+ option \ref cfg_referenced_by_relation "REFERENCED_BY_RELATION"
+
+<hr>
+\section cmdshowrefs \\showrefs
+
+ \addindex \\showrefs
+ 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 cmdshowrefby "\\showrefby",
+ section \ref cmdhiderefby "\\hiderefby",
+ section \ref cmdhiderefs "\\hiderefs" and
+ option \ref cfg_references_relation "REFERENCES_RELATION"
+
+<hr>
+\section cmdhiderefs \\hiderefs
+
+ \addindex \\hiderefs
+ 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 cmdshowrefs "\\showrefs",
+ section \ref cmdshowrefby "\\showrefby",
+ section \ref cmdhiderefby "\\hiderefby" 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 1d84917..e317a86 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 },
+ { "showrefby", &handleReferencedByRelation, FALSE },
+ { "hiderefby", &handleHideReferencedByRelation, FALSE },
+ { "showrefs", &handleReferencesRelation, FALSE },
+ { "hiderefs", &handleHideReferencesRelation, FALSE },
{ "internal", &handleInternal, TRUE },
{ "_linebr", &handleLineBr, FALSE },
{ "static", &handleStatic, FALSE },
@@ -2835,6 +2843,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 ed94ff8..40fa6ef 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");
@@ -1113,6 +1121,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
@@ -4060,6 +4072,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);
@@ -4984,6 +5000,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())
@@ -5024,6 +5044,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();
@@ -5044,6 +5072,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())
@@ -5084,6 +5116,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..936565d 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
@@ -1644,13 +1638,21 @@ void Definition::mergeRefItems(Definition *d)
m_impl->xrefListItems->setAutoDelete(TRUE);
}
QListIterator<ListItemInfo> slii(*xrefList);
+ QListIterator<ListItemInfo> mlii(*m_impl->xrefListItems);
ListItemInfo *lii;
+ ListItemInfo *mii;
for (slii.toFirst();(lii=slii.current());++slii)
{
- if (_getXRefListId(lii->type)==-1)
+ bool found = false;
+ for (mlii.toFirst();(mii=mlii.current());++mlii)
{
- m_impl->xrefListItems->append(new ListItemInfo(*lii));
+ if ((qstrcmp(lii->type,mii->type)==0) && (lii->itemId == mii->itemId))
+ {
+ found = true;
+ break;
+ }
}
+ if (!found) m_impl->xrefListItems->append(new ListItemInfo(*lii));
}
}
}
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index da84931..a5f0483 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -941,7 +941,8 @@ void DocbookDocVisitor::visitPost(DocHtmlTable *)
{
DB_VIS_C
if (m_hide) return;
- m_t << " </tbody>" << endl;
+ if (bodySet) m_t << " </tbody>" << endl;
+ bodySet = FALSE;
m_t << " </tgroup>" << endl;
m_t << "</informaltable>" << endl;
}
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 5cd97a8..6a703df 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -406,8 +406,8 @@ REFWORD2_NOCV {REFWORD2_PRE}("("{FUNCPART}")")?
REFWORD3 ({ID}":")*{ID}":"?
REFWORD4_NOCV (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOP2}))
REFWORD4 {REFWORD4_NOCV}{CVSPEC}?
-REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
-REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
+REFWORD {FILEMASK}|{LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
+REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
%option noyywrap
%option yylineno
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index b94cd92..96a2a83 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2195,6 +2195,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());
@@ -2391,6 +2393,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);
@@ -2628,6 +2632,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)
@@ -3199,6 +3205,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"
@@ -3451,6 +3459,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"
@@ -3718,6 +3728,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)
@@ -3837,6 +3849,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]);
@@ -3988,8 +4002,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());
}
}
}
@@ -5389,6 +5408,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;
@@ -5481,6 +5502,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);
@@ -6513,6 +6536,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);
@@ -6578,6 +6603,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;
@@ -6782,6 +6809,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);
@@ -6854,6 +6883,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);
@@ -7196,6 +7227,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);
@@ -9968,7 +10001,7 @@ static void escapeAliases()
while ((in=value.find("^^",p))!=-1)
{
newValue+=value.mid(p,in-p);
- newValue+="\\_linebr";
+ newValue+="@_linebr";
p=in+2;
}
newValue+=value.mid(p,value.length()-p);
diff --git a/src/entry.cpp b/src/entry.cpp
index 534603a..15c6fec 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 be0eef9..44e47da 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -250,6 +250,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 9223a56..57ff44b 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);
@@ -781,6 +783,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 63a2dd5..a2fcf69 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -586,6 +586,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
@@ -649,6 +651,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 ");
@@ -3032,9 +3036,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);
@@ -4012,6 +4016,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
{
@@ -4659,6 +4675,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;
@@ -5171,6 +5197,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 eae2572..2c88438 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -240,6 +240,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;
@@ -352,6 +355,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 c76304b..76691d1 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -8530,12 +8530,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()
)
{
@@ -8551,7 +8548,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 410a4c5..7700295 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);
}