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
9434ecb1
Commit
9434ecb1
authored
Feb 08, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add template context for annotated class index
parent
ae3a22ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
11 deletions
+65
-11
context.cpp
src/context.cpp
+53
-4
namespacedef.cpp
src/namespacedef.cpp
+11
-7
namespacedef.h
src/namespacedef.h
+1
-0
No files found.
src/context.cpp
View file @
9434ecb1
...
...
@@ -1990,6 +1990,7 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
addProperty
(
"highlight"
,
this
,
&
Private
::
highlight
);
addProperty
(
"subhighlight"
,
this
,
&
Private
::
subHighlight
);
addProperty
(
"compoundType"
,
this
,
&
Private
::
compoundType
);
addProperty
(
"hasDetails"
,
this
,
&
Private
::
hasDetails
);
}
TemplateVariant
title
()
const
{
...
...
@@ -2007,6 +2008,10 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
{
return
m_namespaceDef
->
compoundTypeString
();
}
TemplateVariant
hasDetails
()
const
{
return
m_namespaceDef
->
hasDetailedDescription
();
}
private
:
NamespaceDef
*
m_namespaceDef
;
};
...
...
@@ -4074,11 +4079,18 @@ class NestingNodeContext::Private : public PropertyMapper
addProperty
(
"class"
,
this
,
&
Private
::
getClass
);
//%% [optional] Namespace namespace: namespace info (if this node represents a namespace)
addProperty
(
"namespace"
,
this
,
&
Private
::
getNamespace
);
//%% [optional] file
//%% id
//%% int id
addProperty
(
"id"
,
this
,
&
Private
::
id
);
//%% level
//%%
string
level
addProperty
(
"level"
,
this
,
&
Private
::
level
);
//%% string name
addProperty
(
"name"
,
this
,
&
Private
::
name
);
//%% string brief
addProperty
(
"brief"
,
this
,
&
Private
::
brief
);
//%% bool isLinkable
addProperty
(
"isLinkable"
,
this
,
&
Private
::
isLinkable
);
addProperty
(
"anchor"
,
this
,
&
Private
::
anchor
);
addProperty
(
"fileName"
,
this
,
&
Private
::
fileName
);
addNamespaces
(
addCls
);
addClasses
();
...
...
@@ -4132,7 +4144,43 @@ class NestingNodeContext::Private : public PropertyMapper
result
+=
QCString
().
setNum
(
m_index
)
+
"_"
;
return
result
;
}
TemplateVariant
name
()
const
{
return
m_def
->
name
();
}
QCString
relPathAsString
()
const
{
static
bool
createSubdirs
=
Config_getBool
(
"CREATE_SUBDIRS"
);
return
createSubdirs
?
QCString
(
"../../"
)
:
QCString
(
""
);
}
TemplateVariant
brief
()
const
{
if
(
!
m_cache
.
brief
)
{
if
(
m_def
->
hasBriefDescription
())
{
m_cache
.
brief
.
reset
(
new
TemplateVariant
(
parseDoc
(
m_def
,
m_def
->
briefFile
(),
m_def
->
briefLine
(),
""
,
m_def
->
briefDescription
(),
TRUE
)));
}
else
{
m_cache
.
brief
.
reset
(
new
TemplateVariant
(
""
));
}
}
return
*
m_cache
.
brief
;
}
TemplateVariant
isLinkable
()
const
{
return
m_def
->
isLinkable
();
}
TemplateVariant
anchor
()
const
{
return
m_def
->
anchor
();
}
TemplateVariant
fileName
()
const
{
return
m_def
->
getOutputFileBase
();
}
void
addClasses
()
{
...
...
@@ -4164,6 +4212,7 @@ class NestingNodeContext::Private : public PropertyMapper
{
ScopedPtr
<
ClassContext
>
classContext
;
ScopedPtr
<
NamespaceContext
>
namespaceContext
;
ScopedPtr
<
TemplateVariant
>
brief
;
};
mutable
Cachable
m_cache
;
};
...
...
src/namespacedef.cpp
View file @
9434ecb1
...
...
@@ -248,11 +248,17 @@ void NamespaceDef::computeAnchors()
if
(
allMemberList
)
setAnchors
(
allMemberList
);
}
bool
NamespaceDef
::
hasDetailedDescription
()
const
{
static
bool
repeatBrief
=
Config_getBool
(
"REPEAT_BRIEF"
);
return
((
!
briefDescription
().
isEmpty
()
&&
repeatBrief
)
||
!
documentation
().
isEmpty
());
}
void
NamespaceDef
::
writeDetailedDescription
(
OutputList
&
ol
,
const
QCString
&
title
)
{
if
((
!
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"REPEAT_BRIEF"
))
||
!
documentation
().
isEmpty
()
)
if
(
hasDetailedDescription
())
{
ol
.
pushGeneratorState
();
ol
.
disable
(
OutputGenerator
::
Html
);
...
...
@@ -294,7 +300,7 @@ void NamespaceDef::writeDetailedDescription(OutputList &ol,const QCString &title
void
NamespaceDef
::
writeBriefDescription
(
OutputList
&
ol
)
{
if
(
!
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
if
(
hasBriefDescription
(
))
{
DocRoot
*
rootNode
=
validatingParseDoc
(
briefFile
(),
briefLine
(),
this
,
0
,
briefDescription
(),
TRUE
,
FALSE
,
0
,
TRUE
,
FALSE
);
...
...
@@ -307,9 +313,7 @@ void NamespaceDef::writeBriefDescription(OutputList &ol)
ol
.
writeString
(
"
\n
"
);
ol
.
enable
(
OutputGenerator
::
RTF
);
if
(
Config_getBool
(
"REPEAT_BRIEF"
)
||
!
documentation
().
isEmpty
()
)
if
(
hasDetailedDescription
())
{
ol
.
disableAllBut
(
OutputGenerator
::
Html
);
ol
.
startTextLink
(
0
,
"details"
);
...
...
src/namespacedef.h
View file @
9434ecb1
...
...
@@ -71,6 +71,7 @@ class NamespaceDef : public Definition
bool
isLinkableInProject
()
const
;
bool
isLinkable
()
const
;
bool
hasDetailedDescription
()
const
;
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
void
findSectionsInDocumentation
();
...
...
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