Mercurial > hg > orthanc-java
changeset 38:f8e664baa9dd
improved statistics in ParseOrthancSDK.py
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 03 Jul 2024 12:10:43 +0200 |
parents | 14af12f73fb5 |
children | 7f821a89e000 |
files | CodeGeneration/ParseOrthancSDK.py |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/CodeGeneration/ParseOrthancSDK.py Tue Jul 02 17:05:56 2024 +0200 +++ b/CodeGeneration/ParseOrthancSDK.py Wed Jul 03 12:10:43 2024 +0200 @@ -432,8 +432,12 @@ continue if (node.kind == clang.cindex.CursorKind.FUNCTION_DECL and - node.spelling.startswith('OrthancPlugin') and - not node.spelling in SPECIAL_FUNCTIONS): + node.spelling.startswith('OrthancPlugin')): + + if node.spelling in SPECIAL_FUNCTIONS: + countAllFunctions += 1 + continue + args = list(filter(lambda x: x.kind == clang.cindex.CursorKind.PARM_DECL, node.get_children())) @@ -550,6 +554,6 @@ f.write(json.dumps(codeModel, sort_keys = True, indent = 4)) print('\nTotal functions in the SDK: %d' % countAllFunctions) -print('Total wrapped functions: %d' % countWrappedFunctions) +print('Total wrapped functions (including destructors): %d' % countWrappedFunctions) print('Coverage: %.0f%%' % (float(countWrappedFunctions) / float(countAllFunctions) * 100.0))