Skip to content

Commit f5a9176

Browse files
committed
output on doxyparse if a function is a prototype
issue #5618
1 parent 3b392af commit f5a9176

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

addon/doxyparse/doxyparse.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ static void printDefinition(std::string type, std::string signature, int line) {
154154
static void printProtection(std::string protection) {
155155
printf(" protection: %s\n", protection.c_str());
156156
}
157+
static void printPrototypeYes() {
158+
printf(" prototype: yes\n");
159+
}
157160
static void printNumberOfLines(int lines) {
158161
printf(" lines_of_code: %d\n", lines);
159162
}
@@ -295,6 +298,12 @@ void functionInformation(MemberDef* md) {
295298
}
296299
}
297300

301+
void prototypeInformation(MemberDef* md) {
302+
printPrototypeYes();
303+
const ArgumentList &argList = md->argumentList();
304+
printNumberOfArguments(argList.size());
305+
}
306+
298307
static void lookupSymbol(Definition *d) {
299308
if (d->definitionType() == Definition::TypeMember) {
300309
MemberDef *md = dynamic_cast<MemberDef*>(d);
@@ -304,7 +313,10 @@ static void lookupSymbol(Definition *d) {
304313
if (md->protection() == Public) {
305314
printProtection("public");
306315
}
307-
if (md->isFunction()) {
316+
if (md->isFunction() && md->isPrototype()) {
317+
prototypeInformation(md);
318+
}
319+
else if (md->isFunction()) {
308320
functionInformation(md);
309321
}
310322
}

0 commit comments

Comments
 (0)