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
6d118eec
Commit
6d118eec
authored
Dec 07, 2013
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more info to the context
parent
6dbf32d5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
361 additions
and
155 deletions
+361
-155
classdef.cpp
src/classdef.cpp
+6
-0
classdef.h
src/classdef.h
+1
-0
context.cpp
src/context.cpp
+307
-152
context.h
src/context.h
+45
-1
membergroup.h
src/membergroup.h
+2
-2
No files found.
src/classdef.cpp
View file @
6d118eec
...
@@ -4769,3 +4769,9 @@ const ExampleSDict *ClassDef::exampleList() const
...
@@ -4769,3 +4769,9 @@ const ExampleSDict *ClassDef::exampleList() const
{
{
return
m_impl
->
exampleSDict
;
return
m_impl
->
exampleSDict
;
}
}
bool
ClassDef
::
subGrouping
()
const
{
return
m_impl
->
subGrouping
;
}
src/classdef.h
View file @
6d118eec
...
@@ -317,6 +317,7 @@ class ClassDef : public Definition
...
@@ -317,6 +317,7 @@ class ClassDef : public Definition
const
ExampleSDict
*
exampleList
()
const
;
const
ExampleSDict
*
exampleList
()
const
;
bool
hasExamples
()
const
;
bool
hasExamples
()
const
;
QCString
getMemberListFileName
()
const
;
QCString
getMemberListFileName
()
const
;
bool
subGrouping
()
const
;
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
// --- setters ----
// --- setters ----
...
...
src/context.cpp
View file @
6d118eec
...
@@ -1124,11 +1124,17 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1124,11 +1124,17 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
addProperty
(
"properties"
,
this
,
&
Private
::
properties
);
addProperty
(
"properties"
,
this
,
&
Private
::
properties
);
addProperty
(
"events"
,
this
,
&
Private
::
events
);
addProperty
(
"events"
,
this
,
&
Private
::
events
);
addProperty
(
"friends"
,
this
,
&
Private
::
friends
);
addProperty
(
"friends"
,
this
,
&
Private
::
friends
);
addProperty
(
"relatedDecls"
,
this
,
&
Private
::
relatedDecls
);
addProperty
(
"related"
,
this
,
&
Private
::
related
);
addProperty
(
"typedefs"
,
this
,
&
Private
::
typedefs
);
addProperty
(
"detailedTypedefs"
,
this
,
&
Private
::
detailedTypedefs
);
addProperty
(
"enums"
,
this
,
&
Private
::
enums
);
addProperty
(
"detailedEnums"
,
this
,
&
Private
::
detailedEnums
);
addProperty
(
"methods"
,
this
,
&
Private
::
methods
);
addProperty
(
"detailedServices"
,
this
,
&
Private
::
detailedServices
);
addProperty
(
"relatedDefs"
,
this
,
&
Private
::
relatedDefs
);
addProperty
(
"detailedInterfaces"
,
this
,
&
Private
::
detailedInterfaces
);
addProperty
(
"detailedConstructors"
,
this
,
&
Private
::
detailedConstructors
);
addProperty
(
"detailedMethods"
,
this
,
&
Private
::
detailedMethods
);
addProperty
(
"detailedRelated"
,
this
,
&
Private
::
detailedRelated
);
addProperty
(
"detailedVariables"
,
this
,
&
Private
::
detailedVariables
);
addProperty
(
"detailedProperties"
,
this
,
&
Private
::
detailedProperties
);
addProperty
(
"detailedEvents"
,
this
,
&
Private
::
detailedEvents
);
addProperty
(
"nestedClasses"
,
this
,
&
Private
::
nestedClasses
);
addProperty
(
"nestedClasses"
,
this
,
&
Private
::
nestedClasses
);
addProperty
(
"compoundType"
,
this
,
&
Private
::
compoundType
);
addProperty
(
"compoundType"
,
this
,
&
Private
::
compoundType
);
addProperty
(
"templateDecls"
,
this
,
&
Private
::
templateDecls
);
addProperty
(
"templateDecls"
,
this
,
&
Private
::
templateDecls
);
...
@@ -1136,6 +1142,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1136,6 +1142,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
addProperty
(
"examples"
,
this
,
&
Private
::
examples
);
addProperty
(
"examples"
,
this
,
&
Private
::
examples
);
addProperty
(
"allMembersList"
,
this
,
&
Private
::
allMembersList
);
addProperty
(
"allMembersList"
,
this
,
&
Private
::
allMembersList
);
addProperty
(
"allMembersFileName"
,
this
,
&
Private
::
allMembersFileName
);
addProperty
(
"allMembersFileName"
,
this
,
&
Private
::
allMembersFileName
);
addProperty
(
"memberGroups"
,
this
,
&
Private
::
memberGroups
);
}
}
TemplateVariant
title
()
const
TemplateVariant
title
()
const
{
{
...
@@ -1298,7 +1305,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1298,7 +1305,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
MemberList
*
ml
=
m_classDef
->
getMemberList
(
type
);
MemberList
*
ml
=
m_classDef
->
getMemberList
(
type
);
if
(
ml
)
if
(
ml
)
{
{
list
.
reset
(
new
MemberListInfoContext
(
ml
,
title
));
list
.
reset
(
new
MemberListInfoContext
(
m
_classDef
,
relPathAsString
(),
m
l
,
title
));
}
}
}
}
if
(
list
)
if
(
list
)
...
@@ -1430,25 +1437,49 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1430,25 +1437,49 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
{
return
getMemberList
(
m_cache
.
friends
,
MemberListType_friends
,
theTranslator
->
trFriends
());
return
getMemberList
(
m_cache
.
friends
,
MemberListType_friends
,
theTranslator
->
trFriends
());
}
}
TemplateVariant
related
Decls
()
const
TemplateVariant
related
()
const
{
{
return
getMemberList
(
m_cache
.
related
Decls
,
MemberListType_related
,
theTranslator
->
trRelatedFunctions
());
return
getMemberList
(
m_cache
.
related
,
MemberListType_related
,
theTranslator
->
trRelatedFunctions
());
}
}
TemplateVariant
t
ypedefs
()
const
TemplateVariant
detailedT
ypedefs
()
const
{
{
return
getMemberList
(
m_cache
.
t
ypedefs
,
MemberListType_typedefMembers
,
theTranslator
->
trMemberTypedefDocumentation
());
return
getMemberList
(
m_cache
.
detailedT
ypedefs
,
MemberListType_typedefMembers
,
theTranslator
->
trMemberTypedefDocumentation
());
}
}
TemplateVariant
e
nums
()
const
TemplateVariant
detailedE
nums
()
const
{
{
return
getMemberList
(
m_cache
.
e
nums
,
MemberListType_enumMembers
,
theTranslator
->
trMemberEnumerationDocumentation
());
return
getMemberList
(
m_cache
.
detailedE
nums
,
MemberListType_enumMembers
,
theTranslator
->
trMemberEnumerationDocumentation
());
}
}
TemplateVariant
method
s
()
const
TemplateVariant
detailedService
s
()
const
{
{
return
getMemberList
(
m_cache
.
methods
,
MemberListType_functionMembers
,
theTranslator
->
trMemberFunctionDocumentation
());
return
getMemberList
(
m_cache
.
detailedServices
,
MemberListType_serviceMembers
,
theTranslator
->
trServices
());
}
}
TemplateVariant
relatedDef
s
()
const
TemplateVariant
detailedInterface
s
()
const
{
{
return
getMemberList
(
m_cache
.
relatedDefs
,
MemberListType_relatedMembers
,
theTranslator
->
trRelatedFunctionDocumentation
());
return
getMemberList
(
m_cache
.
detailedInterfaces
,
MemberListType_interfaceMembers
,
theTranslator
->
trInterfaces
());
}
TemplateVariant
detailedConstructors
()
const
{
return
getMemberList
(
m_cache
.
detailedConstructors
,
MemberListType_constructors
,
theTranslator
->
trConstructorDocumentation
());
}
TemplateVariant
detailedMethods
()
const
{
return
getMemberList
(
m_cache
.
detailedMethods
,
MemberListType_functionMembers
,
theTranslator
->
trMemberFunctionDocumentation
());
}
TemplateVariant
detailedRelated
()
const
{
return
getMemberList
(
m_cache
.
detailedRelated
,
MemberListType_relatedMembers
,
theTranslator
->
trRelatedFunctionDocumentation
());
}
TemplateVariant
detailedVariables
()
const
{
return
getMemberList
(
m_cache
.
detailedVariables
,
MemberListType_variableMembers
,
theTranslator
->
trMemberDataDocumentation
());
}
TemplateVariant
detailedProperties
()
const
{
return
getMemberList
(
m_cache
.
detailedProperties
,
MemberListType_propertyMembers
,
theTranslator
->
trPropertyDocumentation
());
}
TemplateVariant
detailedEvents
()
const
{
return
getMemberList
(
m_cache
.
detailedEvents
,
MemberListType_eventMembers
,
theTranslator
->
trEventDocumentation
());
}
}
TemplateVariant
nestedClasses
()
const
TemplateVariant
nestedClasses
()
const
{
{
...
@@ -1457,9 +1488,9 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1457,9 +1488,9 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
static
bool
extractLocalClasses
=
Config_getBool
(
"EXTRACT_LOCAL_CLASSES"
);
static
bool
extractLocalClasses
=
Config_getBool
(
"EXTRACT_LOCAL_CLASSES"
);
if
(
!
m_cache
.
nestedClasses
)
if
(
!
m_cache
.
nestedClasses
)
{
{
NestedClassListContext
*
classList
=
new
NestedClassListContext
;
if
(
m_classDef
->
getClassSDict
())
if
(
m_classDef
->
getClassSDict
())
{
{
NestedClassListContext
*
classList
=
new
NestedClassListContext
;
ClassSDict
::
Iterator
sdi
(
*
m_classDef
->
getClassSDict
());
ClassSDict
::
Iterator
sdi
(
*
m_classDef
->
getClassSDict
());
ClassDef
*
cd
;
ClassDef
*
cd
;
for
(
sdi
.
toFirst
();(
cd
=
sdi
.
current
());
++
sdi
)
for
(
sdi
.
toFirst
();(
cd
=
sdi
.
current
());
++
sdi
)
...
@@ -1474,17 +1505,10 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1474,17 +1505,10 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
classList
->
append
(
cd
);
classList
->
append
(
cd
);
}
}
}
}
m_cache
.
nestedClasses
.
reset
(
classList
);
}
}
m_cache
.
nestedClasses
.
reset
(
classList
);
}
}
if
(
m_cache
.
nestedClasses
)
return
m_cache
.
nestedClasses
.
get
();
{
return
m_cache
.
nestedClasses
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
compoundType
()
const
TemplateVariant
compoundType
()
const
{
{
...
@@ -1536,14 +1560,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1536,14 +1560,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
addTemplateDecls
(
m_classDef
,
tl
);
addTemplateDecls
(
m_classDef
,
tl
);
m_cache
.
templateDecls
.
reset
(
tl
);
m_cache
.
templateDecls
.
reset
(
tl
);
}
}
if
(
m_cache
.
templateDecls
)
return
m_cache
.
templateDecls
.
get
();
{
return
m_cache
.
templateDecls
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
typeConstraints
()
const
TemplateVariant
typeConstraints
()
const
{
{
...
@@ -1551,14 +1568,11 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1551,14 +1568,11 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
{
m_cache
.
typeConstraints
.
reset
(
new
ArgumentListContext
(
m_classDef
->
typeConstraints
(),
m_classDef
,
relPathAsString
()));
m_cache
.
typeConstraints
.
reset
(
new
ArgumentListContext
(
m_classDef
->
typeConstraints
(),
m_classDef
,
relPathAsString
()));
}
}
if
(
m_cache
.
typeConstraints
)
{
return
m_cache
.
typeConstraints
.
get
();
}
else
else
{
{
return
TemplateVariant
(
FALSE
);
m_cache
.
typeConstraints
.
reset
(
new
ArgumentListContext
);
}
}
return
m_cache
.
typeConstraints
.
get
();
}
}
TemplateVariant
examples
()
const
TemplateVariant
examples
()
const
{
{
...
@@ -1568,14 +1582,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1568,14 +1582,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
addExamples
(
exampleList
);
addExamples
(
exampleList
);
m_cache
.
examples
.
reset
(
exampleList
);
m_cache
.
examples
.
reset
(
exampleList
);
}
}
if
(
m_cache
.
examples
)
return
m_cache
.
examples
.
get
();
{
return
m_cache
.
examples
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
allMembersList
()
const
TemplateVariant
allMembersList
()
const
{
{
...
@@ -1584,19 +1591,31 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1584,19 +1591,31 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
AllMembersListContext
*
ml
=
new
AllMembersListContext
(
m_classDef
->
memberNameInfoSDict
());
AllMembersListContext
*
ml
=
new
AllMembersListContext
(
m_classDef
->
memberNameInfoSDict
());
m_cache
.
allMembersList
.
reset
(
ml
);
m_cache
.
allMembersList
.
reset
(
ml
);
}
}
if
(
m_cache
.
allMembersList
)
{
return
m_cache
.
allMembersList
.
get
();
}
else
else
{
{
return
TemplateVariant
(
FALSE
);
m_cache
.
allMembersList
.
reset
(
new
AllMembersListContext
);
}
}
return
m_cache
.
allMembersList
.
get
();
}
}
TemplateVariant
allMembersFileName
()
const
TemplateVariant
allMembersFileName
()
const
{
{
return
m_classDef
->
getMemberListFileName
();
return
m_classDef
->
getMemberListFileName
();
}
}
TemplateVariant
memberGroups
()
const
{
if
(
!
m_cache
.
memberGroups
)
{
if
(
m_classDef
->
getMemberGroupSDict
())
{
m_cache
.
memberGroups
.
reset
(
new
MemberGroupListContext
(
m_classDef
,
relPathAsString
(),
m_classDef
->
getMemberGroupSDict
(),
m_classDef
->
subGrouping
()));
}
else
{
m_cache
.
memberGroups
.
reset
(
new
MemberGroupListContext
);
}
}
return
m_cache
.
memberGroups
.
get
();
}
private
:
private
:
ClassDef
*
m_classDef
;
ClassDef
*
m_classDef
;
...
@@ -1643,11 +1662,18 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
...
@@ -1643,11 +1662,18 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
ScopedPtr
<
MemberListInfoContext
>
properties
;
ScopedPtr
<
MemberListInfoContext
>
properties
;
ScopedPtr
<
MemberListInfoContext
>
events
;
ScopedPtr
<
MemberListInfoContext
>
events
;
ScopedPtr
<
MemberListInfoContext
>
friends
;
ScopedPtr
<
MemberListInfoContext
>
friends
;
ScopedPtr
<
MemberListInfoContext
>
relatedDecls
;
ScopedPtr
<
MemberListInfoContext
>
related
;
ScopedPtr
<
MemberListInfoContext
>
typedefs
;
ScopedPtr
<
MemberListInfoContext
>
detailedTypedefs
;
ScopedPtr
<
MemberListInfoContext
>
enums
;
ScopedPtr
<
MemberListInfoContext
>
detailedEnums
;
ScopedPtr
<
MemberListInfoContext
>
methods
;
ScopedPtr
<
MemberListInfoContext
>
detailedServices
;
ScopedPtr
<
MemberListInfoContext
>
relatedDefs
;
ScopedPtr
<
MemberListInfoContext
>
detailedInterfaces
;
ScopedPtr
<
MemberListInfoContext
>
detailedConstructors
;
ScopedPtr
<
MemberListInfoContext
>
detailedMethods
;
ScopedPtr
<
MemberListInfoContext
>
detailedRelated
;
ScopedPtr
<
MemberListInfoContext
>
detailedVariables
;
ScopedPtr
<
MemberListInfoContext
>
detailedProperties
;
ScopedPtr
<
MemberListInfoContext
>
detailedEvents
;
ScopedPtr
<
MemberGroupListContext
>
memberGroups
;
ScopedPtr
<
AllMembersListContext
>
allMembersList
;
ScopedPtr
<
AllMembersListContext
>
allMembersList
;
ScopedPtr
<
ArgumentListContext
>
typeConstraints
;
ScopedPtr
<
ArgumentListContext
>
typeConstraints
;
ScopedPtr
<
TemplateList
>
examples
;
ScopedPtr
<
TemplateList
>
examples
;
...
@@ -2160,23 +2186,27 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2160,23 +2186,27 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
{
m_cache
.
enumValues
.
reset
(
new
MemberListContext
(
ml
));
m_cache
.
enumValues
.
reset
(
new
MemberListContext
(
ml
));
}
}
else
{
m_cache
.
enumValues
.
reset
(
new
MemberListContext
);
}
}
}
if
(
m_cache
.
enumValues
)
return
m_cache
.
enumValues
.
get
();
{
return
m_cache
.
enumValues
.
get
();
}
else
{
return
FALSE
;
}
}
}
TemplateVariant
templateArgs
()
const
TemplateVariant
templateArgs
()
const
{
{
if
(
!
m_cache
.
templateArgs
)
if
(
!
m_cache
.
templateArgs
&&
m_memberDef
->
templateArguments
()
)
{
{
m_cache
.
templateArgs
.
reset
(
new
ArgumentListContext
(
m_memberDef
->
templateArguments
(),
m_memberDef
,
relPathAsString
()));
m_cache
.
templateArgs
.
reset
(
new
ArgumentListContext
(
m_memberDef
->
templateArguments
(),
m_memberDef
,
relPathAsString
()));
}
}
return
m_cache
.
templateArgs
.
get
();
if
(
m_cache
.
templateArgs
)
{
return
m_cache
.
templateArgs
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
templateAlias
()
const
TemplateVariant
templateAlias
()
const
{
{
...
@@ -2229,15 +2259,12 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2229,15 +2259,12 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
{
m_cache
.
arguments
.
reset
(
new
ArgumentListContext
(
defArgList
,
m_memberDef
,
relPathAsString
()));
m_cache
.
arguments
.
reset
(
new
ArgumentListContext
(
defArgList
,
m_memberDef
,
relPathAsString
()));
}
}
else
{
m_cache
.
arguments
.
reset
(
new
ArgumentListContext
);
}
}
}
if
(
m_cache
.
arguments
)
return
m_cache
.
arguments
.
get
();
{
return
m_cache
.
arguments
.
get
();
}
else
{
return
FALSE
;
}
}
}
TemplateVariant
hasParameterList
()
const
TemplateVariant
hasParameterList
()
const
{
{
...
@@ -2323,14 +2350,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2323,14 +2350,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
addTemplateDecls
(
tl
);
addTemplateDecls
(
tl
);
m_cache
.
templateDecls
.
reset
(
tl
);
m_cache
.
templateDecls
.
reset
(
tl
);
}
}
if
(
m_cache
.
templateDecls
)
return
m_cache
.
templateDecls
.
get
();
{
return
m_cache
.
templateDecls
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
labels
()
const
TemplateVariant
labels
()
const
{
{
...
@@ -2338,25 +2358,18 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2338,25 +2358,18 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
{
QStrList
sl
;
QStrList
sl
;
m_memberDef
->
getLabels
(
sl
,
m_memberDef
->
getOuterScope
());
m_memberDef
->
getLabels
(
sl
,
m_memberDef
->
getOuterScope
());
TemplateList
*
tl
=
new
TemplateList
;
if
(
sl
.
count
()
>
0
)
if
(
sl
.
count
()
>
0
)
{
{
TemplateList
*
tl
=
new
TemplateList
;
QStrListIterator
it
(
sl
);
QStrListIterator
it
(
sl
);
for
(;
it
.
current
();
++
it
)
for
(;
it
.
current
();
++
it
)
{
{
tl
->
append
(
*
it
);
tl
->
append
(
*
it
);
}
}
m_cache
.
labels
.
reset
(
tl
);
}
}
m_cache
.
labels
.
reset
(
tl
);
}
}
if
(
m_cache
.
labels
)
return
m_cache
.
labels
.
get
();
{
return
m_cache
.
labels
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
paramDocs
()
const
TemplateVariant
paramDocs
()
const
{
{
...
@@ -2392,63 +2405,49 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2392,63 +2405,49 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
if
(
!
m_cache
.
implements
)
if
(
!
m_cache
.
implements
)
{
{
MemberDef
*
md
=
m_memberDef
->
reimplements
();
MemberDef
*
md
=
m_memberDef
->
reimplements
();
m_cache
.
implements
.
reset
(
new
TemplateList
);
if
(
md
)
if
(
md
)
{
{
ClassDef
*
cd
=
md
->
getClassDef
();
ClassDef
*
cd
=
md
->
getClassDef
();
if
(
cd
&&
(
md
->
virtualness
()
==
Pure
||
cd
->
compoundType
()
==
ClassDef
::
Interface
))
if
(
cd
&&
(
md
->
virtualness
()
==
Pure
||
cd
->
compoundType
()
==
ClassDef
::
Interface
))
{
{
m_cache
.
implements
.
reset
(
new
TemplateList
);
MemberContext
*
mc
=
new
MemberContext
(
md
);
MemberContext
*
mc
=
new
MemberContext
(
md
);
m_cache
.
implementsMember
.
reset
(
mc
);
m_cache
.
implementsMember
.
reset
(
mc
);
m_cache
.
implements
->
append
(
mc
);
m_cache
.
implements
->
append
(
mc
);
}
}
}
}
}
}
if
(
m_cache
.
implements
)
return
m_cache
.
implements
.
get
();
{
return
m_cache
.
implements
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
reimplements
()
const
TemplateVariant
reimplements
()
const
{
{
if
(
!
m_cache
.
reimplements
)
if
(
!
m_cache
.
reimplements
)
{
{
MemberDef
*
md
=
m_memberDef
->
reimplements
();
MemberDef
*
md
=
m_memberDef
->
reimplements
();
m_cache
.
reimplements
.
reset
(
new
TemplateList
);
if
(
md
)
if
(
md
)
{
{
ClassDef
*
cd
=
md
->
getClassDef
();
ClassDef
*
cd
=
md
->
getClassDef
();
if
(
cd
&&
md
->
virtualness
()
!=
Pure
&&
cd
->
compoundType
()
!=
ClassDef
::
Interface
)
if
(
cd
&&
md
->
virtualness
()
!=
Pure
&&
cd
->
compoundType
()
!=
ClassDef
::
Interface
)
{
{
m_cache
.
reimplements
.
reset
(
new
TemplateList
);
MemberContext
*
mc
=
new
MemberContext
(
md
);
MemberContext
*
mc
=
new
MemberContext
(
md
);
m_cache
.
reimplementsMember
.
reset
(
mc
);
m_cache
.
reimplementsMember
.
reset
(
mc
);
m_cache
.
reimplements
->
append
(
mc
);
m_cache
.
reimplements
->
append
(
mc
);
}
}
}
}
}
}
if
(
m_cache
.
reimplements
)
return
m_cache
.
reimplements
.
get
();
{
return
m_cache
.
reimplements
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
implementedBy
()
const
TemplateVariant
implementedBy
()
const
{
{
if
(
!
m_cache
.
implementedBy
)
if
(
!
m_cache
.
implementedBy
)
{
{
MemberList
*
ml
=
m_memberDef
->
reimplementedBy
();
MemberList
*
ml
=
m_memberDef
->
reimplementedBy
();
m_cache
.
implementedBy
.
reset
(
new
TemplateList
);
if
(
ml
)
if
(
ml
)
{
{
MemberListIterator
mli
(
*
ml
);
MemberListIterator
mli
(
*
ml
);
MemberDef
*
md
=
0
;
MemberDef
*
md
=
0
;
m_cache
.
implementedBy
.
reset
(
new
TemplateList
);
for
(
mli
.
toFirst
();(
md
=
mli
.
current
());
++
mli
)
for
(
mli
.
toFirst
();(
md
=
mli
.
current
());
++
mli
)
{
{
ClassDef
*
cd
=
md
->
getClassDef
();
ClassDef
*
cd
=
md
->
getClassDef
();
...
@@ -2461,25 +2460,18 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2461,25 +2460,18 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
}
}
}
}
}
if
(
m_cache
.
implementedBy
)
return
m_cache
.
implementedBy
.
get
();
{
return
m_cache
.
implementedBy
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
reimplementedBy
()
const
TemplateVariant
reimplementedBy
()
const
{
{
if
(
!
m_cache
.
reimplementedBy
)
if
(
!
m_cache
.
reimplementedBy
)
{
{
m_cache
.
reimplementedBy
.
reset
(
new
TemplateList
);
MemberList
*
ml
=
m_memberDef
->
reimplementedBy
();
MemberList
*
ml
=
m_memberDef
->
reimplementedBy
();
if
(
ml
)
if
(
ml
)
{
{
MemberListIterator
mli
(
*
ml
);
MemberListIterator
mli
(
*
ml
);
MemberDef
*
md
=
0
;
MemberDef
*
md
=
0
;
m_cache
.
reimplementedBy
.
reset
(
new
TemplateList
);
for
(
mli
.
toFirst
();(
md
=
mli
.
current
());
++
mli
)
for
(
mli
.
toFirst
();(
md
=
mli
.
current
());
++
mli
)
{
{
ClassDef
*
cd
=
md
->
getClassDef
();
ClassDef
*
cd
=
md
->
getClassDef
();
...
@@ -2492,14 +2484,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2492,14 +2484,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
}
}
}
}
}
if
(
m_cache
.
reimplementedBy
)
return
m_cache
.
reimplementedBy
.
get
();
{
return
m_cache
.
reimplementedBy
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
void
addExamples
(
TemplateList
*
list
)
const
void
addExamples
(
TemplateList
*
list
)
const
{
{
...
@@ -2527,14 +2512,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2527,14 +2512,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
addExamples
(
exampleList
);
addExamples
(
exampleList
);
m_cache
.
examples
.
reset
(
exampleList
);
m_cache
.
examples
.
reset
(
exampleList
);
}
}
if
(
m_cache
.
examples
)
return
m_cache
.
examples
.
get
();
{
return
m_cache
.
examples
.
get
();
}
else
{
return
TemplateVariant
(
FALSE
);
}
}
}
TemplateVariant
typeConstraints
()
const
TemplateVariant
typeConstraints
()
const
{
{
...
@@ -2542,14 +2520,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
...
@@ -2542,14 +2520,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
{
m_cache
.
typeConstraints
.
reset
(
new
ArgumentListContext
(
m_memberDef
->
typeConstraints
(),
m_memberDef
,
relPathAsString
()));
m_cache
.
typeConstraints
.
reset
(
new
ArgumentListContext
(
m_memberDef
->
typeConstraints
(),
m_memberDef
,
relPathAsString
()));
}
}
if
(
m_cache
.
typeConstraints
)
{
return
m_cache
.
typeConstraints
.
get
();
}
else
else
{
{
return
TemplateVariant
(
FALSE
);
m_cache
.
typeConstraints
.
reset
(
new
ArgumentListContext
);
}
}
return
m_cache
.
typeConstraints
.
get
();
}
}
TemplateVariant
functionQualifier
()
const
TemplateVariant
functionQualifier
()
const
{
{
...
@@ -4533,6 +4508,11 @@ class MemberListContext::Private : public GenericNodeListContext<MemberContext>
...
@@ -4533,6 +4508,11 @@ class MemberListContext::Private : public GenericNodeListContext<MemberContext>
}
}
};
};
MemberListContext
::
MemberListContext
()
{
p
=
new
Private
;
}
MemberListContext
::
MemberListContext
(
const
MemberList
*
list
)
MemberListContext
::
MemberListContext
(
const
MemberList
*
list
)
{
{
p
=
new
Private
;
p
=
new
Private
;
...
@@ -4705,6 +4685,11 @@ class AllMembersListContext::Private : public GenericNodeListContext<MemberInfoC
...
@@ -4705,6 +4685,11 @@ class AllMembersListContext::Private : public GenericNodeListContext<MemberInfoC
}
}
};
};
AllMembersListContext
::
AllMembersListContext
()
{
p
=
new
Private
(
0
);
}
AllMembersListContext
::
AllMembersListContext
(
const
MemberNameInfoSDict
*
ml
)
AllMembersListContext
::
AllMembersListContext
(
const
MemberNameInfoSDict
*
ml
)
{
{
p
=
new
Private
(
ml
);
p
=
new
Private
(
ml
);
...
@@ -4731,6 +4716,161 @@ TemplateListIntf::ConstIterator *AllMembersListContext::createIterator() const
...
@@ -4731,6 +4716,161 @@ TemplateListIntf::ConstIterator *AllMembersListContext::createIterator() const
return
p
->
createIterator
();
return
p
->
createIterator
();
}
}
//------------------------------------------------------------------------
//%% struct MemberGroupInfo: member group information
//%% {
class
MemberGroupInfoContext
::
Private
:
public
PropertyMapper
{
public
:
Private
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberGroup
*
mg
)
:
m_def
(
def
),
m_relPath
(
relPath
),
m_memberListContext
(
mg
->
members
()),
m_memberGroups
(
def
,
relPath
,
0
),
m_memberGroup
(
mg
)
{
addProperty
(
"members"
,
this
,
&
Private
::
members
);
addProperty
(
"title"
,
this
,
&
Private
::
groupTitle
);
addProperty
(
"subtitle"
,
this
,
&
Private
::
groupSubtitle
);
addProperty
(
"anchor"
,
this
,
&
Private
::
groupAnchor
);
addProperty
(
"memberGroups"
,
this
,
&
Private
::
memberGroups
);
addProperty
(
"docs"
,
this
,
&
Private
::
docs
);
}
TemplateVariant
members
()
const
{
return
&
m_memberListContext
;
}
TemplateVariant
groupTitle
()
const
{
return
m_memberGroup
->
header
();
}
TemplateVariant
groupSubtitle
()
const
{
return
""
;
}
TemplateVariant
groupAnchor
()
const
{
return
m_memberGroup
->
anchor
();
}
TemplateVariant
memberGroups
()
const
{
return
&
m_memberGroups
;
}
TemplateVariant
docs
()
const
{
if
(
!
m_docs
)
{
QCString
docs
=
m_memberGroup
->
documentation
();
if
(
!
docs
.
isEmpty
())
{
m_docs
.
reset
(
new
TemplateVariant
(
parseDoc
(
m_def
,
"[@name docs]"
,
-
1
,
// TODO store file & line
m_relPath
,
m_memberGroup
->
documentation
()
+
"
\n
"
,
FALSE
)));
}
else
{
m_docs
.
reset
(
new
TemplateVariant
(
""
));
}
}
return
*
m_docs
;
}
private
:
Definition
*
m_def
;
QCString
m_relPath
;
MemberListContext
m_memberListContext
;
MemberGroupListContext
m_memberGroups
;
const
MemberGroup
*
m_memberGroup
;
mutable
ScopedPtr
<
TemplateVariant
>
m_docs
;
};
//%% }
MemberGroupInfoContext
::
MemberGroupInfoContext
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberGroup
*
mg
)
{
p
=
new
Private
(
def
,
relPath
,
mg
);
}
MemberGroupInfoContext
::~
MemberGroupInfoContext
()
{
delete
p
;
}
TemplateVariant
MemberGroupInfoContext
::
get
(
const
char
*
name
)
const
{
return
p
->
get
(
name
);
}
//------------------------------------------------------------------------
//%% list MemberGroupList[MemberGroupInfo] : list of member groups
class
MemberGroupListContext
::
Private
:
public
GenericNodeListContext
<
MemberGroupInfoContext
>
{
public
:
void
addMemberGroup
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberGroup
*
mg
)
{
append
(
new
MemberGroupInfoContext
(
def
,
relPath
,
mg
));
}
};
MemberGroupListContext
::
MemberGroupListContext
()
{
p
=
new
Private
;
}
MemberGroupListContext
::
MemberGroupListContext
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberGroupList
*
list
)
{
p
=
new
Private
;
if
(
list
)
{
MemberGroupListIterator
mgli
(
*
list
);
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
{
p
->
addMemberGroup
(
def
,
relPath
,
mg
);
}
}
}
MemberGroupListContext
::
MemberGroupListContext
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberGroupSDict
*
dict
,
bool
subGrouping
)
{
p
=
new
Private
;
if
(
dict
)
{
MemberGroupSDict
::
Iterator
di
(
*
dict
);
const
MemberGroup
*
mg
;
for
(
di
.
toFirst
();(
mg
=
di
.
current
());
++
di
)
{
if
(
!
mg
->
allMembersInSameSection
()
||
!
subGrouping
)
{
p
->
addMemberGroup
(
def
,
relPath
,
mg
);
}
}
}
}
MemberGroupListContext
::~
MemberGroupListContext
()
{
delete
p
;
}
// TemplateListIntf
int
MemberGroupListContext
::
count
()
const
{
return
p
->
count
();
}
TemplateVariant
MemberGroupListContext
::
at
(
int
index
)
const
{
return
p
->
at
(
index
);
}
TemplateListIntf
::
ConstIterator
*
MemberGroupListContext
::
createIterator
()
const
{
return
p
->
createIterator
();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//%% struct MemberListInfo: member list information
//%% struct MemberListInfo: member list information
...
@@ -4738,14 +4878,18 @@ TemplateListIntf::ConstIterator *AllMembersListContext::createIterator() const
...
@@ -4738,14 +4878,18 @@ TemplateListIntf::ConstIterator *AllMembersListContext::createIterator() const
class
MemberListInfoContext
::
Private
:
public
PropertyMapper
class
MemberListInfoContext
::
Private
:
public
PropertyMapper
{
{
public
:
public
:
Private
(
const
MemberList
*
ml
,
const
QCString
&
title
,
const
QCString
&
subtitle
)
:
Private
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberList
*
ml
,
const
QCString
&
title
,
const
QCString
&
subtitle
)
:
m_memberListContext
(
ml
),
m_memberList
(
ml
),
m_title
(
title
),
m_subtitle
(
subtitle
)
m_memberListContext
(
ml
),
{
m_memberGroups
(
def
,
relPath
,
ml
?
ml
->
getMemberGroupList
()
:
0
),
addProperty
(
"members"
,
this
,
&
Private
::
members
);
m_memberList
(
ml
),
addProperty
(
"title"
,
this
,
&
Private
::
title
);
m_title
(
title
),
addProperty
(
"subtitle"
,
this
,
&
Private
::
subtitle
);
m_subtitle
(
subtitle
)
addProperty
(
"anchor"
,
this
,
&
Private
::
anchor
);
{
// TODO: member groups
addProperty
(
"members"
,
this
,
&
Private
::
members
);
addProperty
(
"title"
,
this
,
&
Private
::
title
);
addProperty
(
"subtitle"
,
this
,
&
Private
::
subtitle
);
addProperty
(
"anchor"
,
this
,
&
Private
::
anchor
);
addProperty
(
"memberGroups"
,
this
,
&
Private
::
memberGroups
);
}
}
TemplateVariant
members
()
const
TemplateVariant
members
()
const
{
{
...
@@ -4763,18 +4907,24 @@ class MemberListInfoContext::Private : public PropertyMapper
...
@@ -4763,18 +4907,24 @@ class MemberListInfoContext::Private : public PropertyMapper
{
{
return
m_memberList
->
listTypeAsString
(
m_memberList
->
listType
());
return
m_memberList
->
listTypeAsString
(
m_memberList
->
listType
());
}
}
TemplateVariant
memberGroups
()
const
{
return
&
m_memberGroups
;
}
private
:
private
:
MemberListContext
m_memberListContext
;
MemberListContext
m_memberListContext
;
MemberGroupListContext
m_memberGroups
;
const
MemberList
*
m_memberList
;
const
MemberList
*
m_memberList
;
QCString
m_title
;
QCString
m_title
;
QCString
m_subtitle
;
QCString
m_subtitle
;
};
};
//%% }
//%% }
MemberListInfoContext
::
MemberListInfoContext
(
const
MemberList
*
ml
,
MemberListInfoContext
::
MemberListInfoContext
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberList
*
ml
,
const
QCString
&
title
,
const
QCString
&
subtitle
)
const
QCString
&
title
,
const
QCString
&
subtitle
)
{
{
p
=
new
Private
(
ml
,
title
,
subtitle
);
p
=
new
Private
(
def
,
relPath
,
ml
,
title
,
subtitle
);
}
}
MemberListInfoContext
::~
MemberListInfoContext
()
MemberListInfoContext
::~
MemberListInfoContext
()
...
@@ -4892,6 +5042,11 @@ class ArgumentListContext::Private : public GenericNodeListContext<ArgumentConte
...
@@ -4892,6 +5042,11 @@ class ArgumentListContext::Private : public GenericNodeListContext<ArgumentConte
}
}
};
};
ArgumentListContext
::
ArgumentListContext
()
{
p
=
new
Private
;
}
ArgumentListContext
::
ArgumentListContext
(
const
ArgumentList
*
list
,
ArgumentListContext
::
ArgumentListContext
(
const
ArgumentList
*
list
,
Definition
*
def
,
const
QCString
&
relPath
)
Definition
*
def
,
const
QCString
&
relPath
)
{
{
...
...
src/context.h
View file @
6d118eec
...
@@ -31,6 +31,9 @@ struct Argument;
...
@@ -31,6 +31,9 @@ struct Argument;
class
ArgumentList
;
class
ArgumentList
;
class
MemberNameInfoSDict
;
class
MemberNameInfoSDict
;
struct
MemberInfo
;
struct
MemberInfo
;
class
MemberGroup
;
class
MemberGroupSDict
;
class
MemberGroupList
;
//----------------------------------------------------
//----------------------------------------------------
...
@@ -650,6 +653,7 @@ class InheritanceListContext : public TemplateListIntf
...
@@ -650,6 +653,7 @@ class InheritanceListContext : public TemplateListIntf
class
MemberListContext
:
public
TemplateListIntf
class
MemberListContext
:
public
TemplateListIntf
{
{
public
:
public
:
MemberListContext
();
MemberListContext
(
const
MemberList
*
ml
);
MemberListContext
(
const
MemberList
*
ml
);
MemberListContext
(
MemberSDict
*
ml
,
bool
doSort
);
MemberListContext
(
MemberSDict
*
ml
,
bool
doSort
);
~
MemberListContext
();
~
MemberListContext
();
...
@@ -664,12 +668,50 @@ class MemberListContext : public TemplateListIntf
...
@@ -664,12 +668,50 @@ class MemberListContext : public TemplateListIntf
Private
*
p
;
Private
*
p
;
};
};
//----------------------------------------------------
class
MemberGroupInfoContext
:
public
TemplateStructIntf
{
public
:
MemberGroupInfoContext
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberGroup
*
mg
);
~
MemberGroupInfoContext
();
// TemplateStructIntf methods
virtual
TemplateVariant
get
(
const
char
*
name
)
const
;
private
:
class
Private
;
Private
*
p
;
};
//----------------------------------------------------
class
MemberGroupListContext
:
public
TemplateListIntf
{
public
:
MemberGroupListContext
();
MemberGroupListContext
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberGroupList
*
list
);
MemberGroupListContext
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberGroupSDict
*
mgDict
,
bool
subGrouping
);
~
MemberGroupListContext
();
// TemplateListIntf
virtual
int
count
()
const
;
virtual
TemplateVariant
at
(
int
index
)
const
;
virtual
TemplateListIntf
::
ConstIterator
*
createIterator
()
const
;
private
:
class
Private
;
Private
*
p
;
};
//----------------------------------------------------
//----------------------------------------------------
class
MemberListInfoContext
:
public
TemplateStructIntf
class
MemberListInfoContext
:
public
TemplateStructIntf
{
{
public
:
public
:
MemberListInfoContext
(
const
MemberList
*
ml
,
const
QCString
&
title
,
MemberListInfoContext
(
Definition
*
def
,
const
QCString
&
relPath
,
const
MemberList
*
ml
,
const
QCString
&
title
,
const
QCString
&
subtitle
=
QCString
());
const
QCString
&
subtitle
=
QCString
());
~
MemberListInfoContext
();
~
MemberListInfoContext
();
...
@@ -702,6 +744,7 @@ class MemberInfoContext : public TemplateStructIntf
...
@@ -702,6 +744,7 @@ class MemberInfoContext : public TemplateStructIntf
class
AllMembersListContext
:
public
TemplateListIntf
class
AllMembersListContext
:
public
TemplateListIntf
{
{
public
:
public
:
AllMembersListContext
();
AllMembersListContext
(
const
MemberNameInfoSDict
*
ml
);
AllMembersListContext
(
const
MemberNameInfoSDict
*
ml
);
~
AllMembersListContext
();
~
AllMembersListContext
();
...
@@ -736,6 +779,7 @@ class ArgumentContext : public TemplateStructIntf
...
@@ -736,6 +779,7 @@ class ArgumentContext : public TemplateStructIntf
class
ArgumentListContext
:
public
TemplateListIntf
class
ArgumentListContext
:
public
TemplateListIntf
{
{
public
:
public
:
ArgumentListContext
();
ArgumentListContext
(
const
ArgumentList
*
al
,
Definition
*
def
,
const
QCString
&
relPath
);
ArgumentListContext
(
const
ArgumentList
*
al
,
Definition
*
def
,
const
QCString
&
relPath
);
~
ArgumentListContext
();
~
ArgumentListContext
();
...
...
src/membergroup.h
View file @
6d118eec
...
@@ -61,8 +61,8 @@ class MemberGroup
...
@@ -61,8 +61,8 @@ class MemberGroup
MemberListType
lt
,
MemberListType
lt
,
ClassDef
*
inheritedFrom
,
const
QCString
&
inheritId
);
ClassDef
*
inheritedFrom
,
const
QCString
&
inheritId
);
QCString
documentation
()
{
return
doc
;
}
QCString
documentation
()
const
{
return
doc
;
}
bool
allMembersInSameSection
()
{
return
inSameSection
;
}
bool
allMembersInSameSection
()
const
{
return
inSameSection
;
}
void
addToDeclarationSection
();
void
addToDeclarationSection
();
int
countDecMembers
(
GroupDef
*
gd
=
0
);
int
countDecMembers
(
GroupDef
*
gd
=
0
);
int
countDocMembers
();
int
countDocMembers
();
...
...
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