# HG changeset patch # User Sebastien Jodogne <s.jodogne@gmail.com> # Date 1720001443 -7200 # Node ID f8e664baa9ddcf04f4fd43756275ebc81e68c79e # Parent 14af12f73fb51952b9517ca30a852d1fd4617952 improved statistics in ParseOrthancSDK.py diff -r 14af12f73fb5 -r f8e664baa9dd CodeGeneration/ParseOrthancSDK.py --- 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))