summaryrefslogtreecommitdiffstats
path: root/addon/doxyparse
diff options
context:
space:
mode:
authorJoenio Costa <joenio@joenio.me>2020-02-24 23:50:15 (GMT)
committerJoenio Costa <joenio@joenio.me>2020-03-29 16:06:33 (GMT)
commitc6b9eb426893e294d6a2f9261d689d25fe5fa546 (patch)
treedd5a2f6c33dcc9f0939057a096d471a76d589522 /addon/doxyparse
parente688cb8dd84f2e2b078271c62053a494ec3ae226 (diff)
downloadDoxygen-c6b9eb426893e294d6a2f9261d689d25fe5fa546.zip
Doxygen-c6b9eb426893e294d6a2f9261d689d25fe5fa546.tar.gz
Doxygen-c6b9eb426893e294d6a2f9261d689d25fe5fa546.tar.bz2
print protection information on doxyparse
closes analizo/analizo#136
Diffstat (limited to 'addon/doxyparse')
-rw-r--r--addon/doxyparse/doxyparse.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 24769e0..d0b43d5 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -236,6 +236,21 @@ static void referenceTo(MemberDef* md) {
printReferenceTo(type, signature, defined_in);
}
+void protectionInformation(Protection protection) {
+ if (protection == Public) {
+ printProtection("public");
+ }
+ else if (protection == Protected) {
+ printProtection("protected");
+ }
+ else if (protection == Private) {
+ printProtection("private");
+ }
+ else if (protection == Package) {
+ printProtection("package");
+ }
+}
+
void cModule(ClassDef* cd) {
MemberList* ml = cd->getMemberList(MemberListType_variableMembers);
if (ml) {
@@ -249,9 +264,7 @@ void cModule(ClassDef* cd) {
MemberDef* md;
for (mli.toFirst(); (md=mli.current()); ++mli) {
printDefinition("variable", cd->name().data() + std::string("::") + md->name().data(), md->getDefLine());
- if (md->protection() == Public) {
- printProtection("public");
- }
+ protectionInformation(md->protection());
}
}
}
@@ -311,9 +324,7 @@ static void lookupSymbol(Definition *d) {
std::string type = md->memberTypeName().data();
std::string signature = functionSignature(md);
printDefinition(type, signature, md->getDefLine());
- if (md->protection() == Public) {
- printProtection("public");
- }
+ protectionInformation(md->protection());
if (md->isFunction() && md->isPrototype()) {
prototypeInformation(md);
}