Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
9879fddb
Commit
9879fddb
authored
Sep 11, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix to show relations between C#/Java generic classes
parent
561a996c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
doxygen.cpp
src/doxygen.cpp
+21
-11
No files found.
src/doxygen.cpp
View file @
9879fddb
...
...
@@ -4659,7 +4659,8 @@ static bool findClassRelation(
if
(
si
==-
1
)
si
=
0
;
if
(
baseClass
==
0
&&
(
root
->
lang
==
SrcLangExt_CSharp
||
root
->
lang
==
SrcLangExt_Java
))
{
baseClass
=
Doxygen
::
genericsDict
->
find
(
baseClassName
);
// for Java/C# strip the template part before looking for matching
baseClass
=
Doxygen
::
genericsDict
->
find
(
baseClassName
.
left
(
i
));
//printf("looking for '%s' result=%p\n",baseClassName.data(),baseClass);
}
if
(
baseClass
==
0
&&
i
!=-
1
)
...
...
@@ -4949,6 +4950,22 @@ static void findClassEntries(EntryNav *rootNav)
RECURSE_ENTRYTREE
(
findClassEntries
,
rootNav
);
}
static
QCString
extractClassName
(
EntryNav
*
rootNav
)
{
// strip any anonymous scopes first
QCString
bName
=
stripAnonymousNamespaceScope
(
rootNav
->
name
());
bName
=
stripTemplateSpecifiersFromScope
(
bName
);
int
i
;
if
((
rootNav
->
lang
()
==
SrcLangExt_CSharp
||
rootNav
->
lang
()
==
SrcLangExt_Java
)
&&
(
i
=
bName
.
find
(
'<'
))
!=-
1
)
{
// a Java/C# generic class looks like a C++ specialization, so we need to strip the
// template part before looking for matches
bName
=
bName
.
left
(
i
);
}
return
bName
;
}
/*! Using the dictionary build by findClassEntries(), this
* function will look for additional template specialization that
* exists as inheritance relations only. These instances will be
...
...
@@ -4963,9 +4980,7 @@ static void findInheritedTemplateInstances()
for
(;(
rootNav
=
edi
.
current
());
++
edi
)
{
ClassDef
*
cd
;
// strip any anonymous scopes first
QCString
bName
=
stripAnonymousNamespaceScope
(
rootNav
->
name
());
bName
=
stripTemplateSpecifiersFromScope
(
bName
);
QCString
bName
=
extractClassName
(
rootNav
);
Debug
::
print
(
Debug
::
Classes
,
0
,
" Inheritance: Class %s :
\n
"
,
bName
.
data
());
if
((
cd
=
getClass
(
bName
)))
{
...
...
@@ -4986,9 +5001,7 @@ static void findUsedTemplateInstances()
for
(;(
rootNav
=
edi
.
current
());
++
edi
)
{
ClassDef
*
cd
;
// strip any anonymous scopes first
QCString
bName
=
stripAnonymousNamespaceScope
(
rootNav
->
name
());
bName
=
stripTemplateSpecifiersFromScope
(
bName
);
QCString
bName
=
extractClassName
(
rootNav
);
Debug
::
print
(
Debug
::
Classes
,
0
,
" Usage: Class %s :
\n
"
,
bName
.
data
());
if
((
cd
=
getClass
(
bName
)))
{
...
...
@@ -5011,10 +5024,7 @@ static void computeClassRelations()
rootNav
->
loadEntry
(
g_storage
);
Entry
*
root
=
rootNav
->
entry
();
// strip any anonymous scopes first
QCString
bName
=
stripAnonymousNamespaceScope
(
rootNav
->
name
());
bName
=
stripTemplateSpecifiersFromScope
(
bName
);
QCString
bName
=
extractClassName
(
rootNav
);
Debug
::
print
(
Debug
::
Classes
,
0
,
" Relations: Class %s :
\n
"
,
bName
.
data
());
if
((
cd
=
getClass
(
bName
)))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment