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
54ac45bd
Commit
54ac45bd
authored
Jul 04, 2014
by
Maksim Osipov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation generator: added support for C# property accessors visibility modifiers.
parent
f5ff1b8e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
6 deletions
+90
-6
context.cpp
src/context.cpp
+27
-3
memberdef.cpp
src/memberdef.cpp
+43
-3
memberdef.h
src/memberdef.h
+4
-0
xmlgen.cpp
src/xmlgen.cpp
+16
-0
No files found.
src/context.cpp
View file @
54ac45bd
...
...
@@ -2766,7 +2766,11 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
addProperty
(
"isExplicit"
,
this
,
&
Private
::
isExplicit
);
addProperty
(
"isMutable"
,
this
,
&
Private
::
isMutable
);
addProperty
(
"isGettable"
,
this
,
&
Private
::
isGettable
);
addProperty
(
"isPrivateGettable"
,
this
,
&
Private
::
isPrivateGettable
);
addProperty
(
"isProtectedGettable"
,
this
,
&
Private
::
isProtectedGettable
);
addProperty
(
"isSettable"
,
this
,
&
Private
::
isSettable
);
addProperty
(
"isPrivateSettable"
,
this
,
&
Private
::
isPrivateSettable
);
addProperty
(
"isProtectedSettable"
,
this
,
&
Private
::
isProtectedSettable
);
addProperty
(
"isReadable"
,
this
,
&
Private
::
isReadable
);
addProperty
(
"isWritable"
,
this
,
&
Private
::
isWritable
);
addProperty
(
"isAddable"
,
this
,
&
Private
::
isAddable
);
...
...
@@ -2855,8 +2859,12 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
m_cache
.
propertyAttrs
.
reset
(
TemplateList
::
alloc
());
if
(
md
&&
md
->
isProperty
())
{
if
(
md
->
isGettable
())
m_cache
.
propertyAttrs
->
append
(
"get"
);
if
(
md
->
isSettable
())
m_cache
.
propertyAttrs
->
append
(
"set"
);
if
(
md
->
isGettable
())
m_cache
.
propertyAttrs
->
append
(
"get"
);
if
(
md
->
isPrivateGettable
())
m_cache
.
propertyAttrs
->
append
(
"private get"
);
if
(
md
->
isProtectedGettable
())
m_cache
.
propertyAttrs
->
append
(
"protected get"
);
if
(
md
->
isSettable
())
m_cache
.
propertyAttrs
->
append
(
"set"
);
if
(
md
->
isPrivateSettable
())
m_cache
.
propertyAttrs
->
append
(
"private set"
);
if
(
md
->
isProtectedSettable
())
m_cache
.
propertyAttrs
->
append
(
"protected set"
);
}
m_cache
.
eventAttrs
.
reset
(
TemplateList
::
alloc
());
if
(
md
&&
md
->
isEvent
())
...
...
@@ -2948,12 +2956,28 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
TemplateVariant
isGettable
()
const
{
return
m_memberDef
->
isSettable
();
return
m_memberDef
->
isGettable
();
}
TemplateVariant
isPrivateGettable
()
const
{
return
m_memberDef
->
isPrivateGettable
();
}
TemplateVariant
isProtectedGettable
()
const
{
return
m_memberDef
->
isProtectedGettable
();
}
TemplateVariant
isSettable
()
const
{
return
m_memberDef
->
isSettable
();
}
TemplateVariant
isPrivateSettable
()
const
{
return
m_memberDef
->
isPrivateSettable
();
}
TemplateVariant
isProtectedSettable
()
const
{
return
m_memberDef
->
isProtectedSettable
();
}
TemplateVariant
isReadable
()
const
{
return
m_memberDef
->
isReadable
();
...
...
src/memberdef.cpp
View file @
54ac45bd
...
...
@@ -1729,15 +1729,27 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol
.
docify
(
" [implementation]"
);
ol
.
endTypewriter
();
}
bool
extractPrivate
=
Config_getBool
(
"EXTRACT_PRIVATE"
);
if
(
isProperty
()
&&
(
isSettable
()
||
isGettable
()))
if
(
isProperty
()
&&
(
isSettable
()
||
isGettable
()
||
isPrivateSettable
()
||
isPrivateGettable
()
||
isProtectedSettable
()
||
isProtectedGettable
()))
{
ol
.
writeLatexSpacing
();
ol
.
startTypewriter
();
ol
.
docify
(
" ["
);
QStrList
sl
;
if
(
isGettable
())
sl
.
append
(
"get"
);
if
(
isSettable
())
sl
.
append
(
"set"
);
if
(
isGettable
())
sl
.
append
(
"get"
);
if
(
isProtectedGettable
())
sl
.
append
(
"protected get"
);
if
(
isSettable
())
sl
.
append
(
"set"
);
if
(
isProtectedSettable
())
sl
.
append
(
"protected set"
);
if
(
extractPrivate
)
{
if
(
isPrivateGettable
())
sl
.
append
(
"private get"
);
if
(
isPrivateSettable
())
sl
.
append
(
"private set"
);
}
const
char
*
s
=
sl
.
first
();
while
(
s
)
{
...
...
@@ -1940,6 +1952,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const
//ol.docify(" [");
SrcLangExt
lang
=
getLanguage
();
bool
optVhdl
=
lang
==
SrcLangExt_VHDL
;
bool
extractPrivate
=
Config_getBool
(
"EXTRACT_PRIVATE"
);
if
(
optVhdl
)
{
sl
.
append
(
VhdlDocGen
::
trTypeString
(
getMemberSpecifiers
()));
...
...
@@ -1955,7 +1968,14 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const
if
(
isMutable
())
sl
.
append
(
"mutable"
);
if
(
isStatic
())
sl
.
append
(
"static"
);
if
(
isGettable
())
sl
.
append
(
"get"
);
if
(
isProtectedGettable
())
sl
.
append
(
"protected get"
);
if
(
isSettable
())
sl
.
append
(
"set"
);
if
(
isProtectedSettable
())
sl
.
append
(
"protected set"
);
if
(
extractPrivate
)
{
if
(
isPrivateGettable
())
sl
.
append
(
"private get"
);
if
(
isPrivateSettable
())
sl
.
append
(
"private set"
);
}
if
(
isAddable
())
sl
.
append
(
"add"
);
if
(
!
isUNOProperty
()
&&
isRemovable
())
sl
.
append
(
"remove"
);
if
(
isRaisable
())
sl
.
append
(
"raise"
);
...
...
@@ -4193,11 +4213,31 @@ bool MemberDef::isGettable() const
return
(
m_impl
->
memSpec
&
Entry
::
Gettable
)
!=
0
;
}
bool
MemberDef
::
isPrivateGettable
()
const
{
return
(
m_impl
->
memSpec
&
Entry
::
PrivateGettable
)
!=
0
;
}
bool
MemberDef
::
isProtectedGettable
()
const
{
return
(
m_impl
->
memSpec
&
Entry
::
ProtectedGettable
)
!=
0
;
}
bool
MemberDef
::
isSettable
()
const
{
return
(
m_impl
->
memSpec
&
Entry
::
Settable
)
!=
0
;
}
bool
MemberDef
::
isPrivateSettable
()
const
{
return
(
m_impl
->
memSpec
&
Entry
::
PrivateSettable
)
!=
0
;
}
bool
MemberDef
::
isProtectedSettable
()
const
{
return
(
m_impl
->
memSpec
&
Entry
::
ProtectedSettable
)
!=
0
;
}
bool
MemberDef
::
isAddable
()
const
{
return
(
m_impl
->
memSpec
&
Entry
::
Addable
)
!=
0
;
...
...
src/memberdef.h
View file @
54ac45bd
...
...
@@ -123,7 +123,11 @@ class MemberDef : public Definition
bool
isExplicit
()
const
;
bool
isMutable
()
const
;
bool
isGettable
()
const
;
bool
isPrivateGettable
()
const
;
bool
isProtectedGettable
()
const
;
bool
isSettable
()
const
;
bool
isPrivateSettable
()
const
;
bool
isProtectedSettable
()
const
;
bool
isReadable
()
const
;
bool
isWritable
()
const
;
bool
isAddable
()
const
;
...
...
src/xmlgen.cpp
View file @
54ac45bd
...
...
@@ -727,10 +727,26 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
if
(
md
->
isGettable
())
t
<<
"yes"
;
else
t
<<
"no"
;
t
<<
"
\"
"
;
t
<<
" privategettable=
\"
"
;
if
(
md
->
isPrivateGettable
())
t
<<
"yes"
;
else
t
<<
"no"
;
t
<<
"
\"
"
;
t
<<
" protectedgettable=
\"
"
;
if
(
md
->
isProtectedGettable
())
t
<<
"yes"
;
else
t
<<
"no"
;
t
<<
"
\"
"
;
t
<<
" settable=
\"
"
;
if
(
md
->
isSettable
())
t
<<
"yes"
;
else
t
<<
"no"
;
t
<<
"
\"
"
;
t
<<
" privatesettable=
\"
"
;
if
(
md
->
isPrivateSettable
())
t
<<
"yes"
;
else
t
<<
"no"
;
t
<<
"
\"
"
;
t
<<
" protectedsettable=
\"
"
;
if
(
md
->
isProtectedSettable
())
t
<<
"yes"
;
else
t
<<
"no"
;
t
<<
"
\"
"
;
if
(
md
->
isAssign
()
||
md
->
isCopy
()
||
md
->
isRetain
()
||
md
->
isStrong
()
||
md
->
isWeak
())
{
t
<<
" accessor=
\"
"
;
...
...
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