diff options
author | Joenio Costa <joenio@joenio.me> | 2020-02-24 18:14:01 (GMT) |
---|---|---|
committer | Joenio Costa <joenio@joenio.me> | 2020-02-24 18:14:01 (GMT) |
commit | f5a91767dc32230f7fc39d78d42d3f16a8961895 (patch) | |
tree | 297ee7da497ddeb21c091455c1dbaecd645cae47 | |
parent | 3b392af822d81ae51919feb2c2fc4c539238bb3b (diff) | |
download | Doxygen-f5a91767dc32230f7fc39d78d42d3f16a8961895.zip Doxygen-f5a91767dc32230f7fc39d78d42d3f16a8961895.tar.gz Doxygen-f5a91767dc32230f7fc39d78d42d3f16a8961895.tar.bz2 |
output on doxyparse if a function is a prototype
issue #5618
-rw-r--r-- | addon/doxyparse/doxyparse.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index 59b560f..515d2ba 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -154,6 +154,9 @@ static void printDefinition(std::string type, std::string signature, int line) { static void printProtection(std::string protection) { printf(" protection: %s\n", protection.c_str()); } +static void printPrototypeYes() { + printf(" prototype: yes\n"); +} static void printNumberOfLines(int lines) { printf(" lines_of_code: %d\n", lines); } @@ -295,6 +298,12 @@ void functionInformation(MemberDef* md) { } } +void prototypeInformation(MemberDef* md) { + printPrototypeYes(); + const ArgumentList &argList = md->argumentList(); + printNumberOfArguments(argList.size()); +} + static void lookupSymbol(Definition *d) { if (d->definitionType() == Definition::TypeMember) { MemberDef *md = dynamic_cast<MemberDef*>(d); @@ -304,7 +313,10 @@ static void lookupSymbol(Definition *d) { if (md->protection() == Public) { printProtection("public"); } - if (md->isFunction()) { + if (md->isFunction() && md->isPrototype()) { + prototypeInformation(md); + } + else if (md->isFunction()) { functionInformation(md); } } |