Mercurial > hg > orthanc
changeset 6285:cadeae6be091
added "unwrapped_functions" field in the code model
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 20 Aug 2025 14:26:28 +0200 |
parents | 86a9be04014c |
children | a2b24bfeb0d6 |
files | OrthancServer/Plugins/Include/orthanc/OrthancPluginCodeModel.json OrthancServer/Resources/CodeModel/GenerateCodeModel.py |
diffstat | 2 files changed, 58 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Include/orthanc/OrthancPluginCodeModel.json Tue Aug 19 10:44:42 2025 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancPluginCodeModel.json Wed Aug 20 14:26:28 2025 +0200 @@ -5487,5 +5487,57 @@ 9 ] } + ], + "unwrapped_functions": [ + "OrthancPluginRegisterRestCallback", + "OrthancPluginRegisterRestCallbackNoLock", + "OrthancPluginRegisterOnStoredInstanceCallback", + "OrthancPluginGetInstanceData", + "OrthancPluginRegisterStorageArea", + "OrthancPluginRegisterOnChangeCallback", + "OrthancPluginGetImageBuffer", + "OrthancPluginRestApiGet2", + "OrthancPluginRegisterWorklistCallback", + "OrthancPluginRegisterDecodeImageCallback", + "OrthancPluginCreateImageAccessor", + "OrthancPluginLookupDictionary", + "OrthancPluginSendMultipartItem2", + "OrthancPluginRegisterIncomingHttpRequestFilter", + "OrthancPluginHttpClient", + "OrthancPluginRegisterFindCallback", + "OrthancPluginGetFindQueryTag", + "OrthancPluginRegisterMoveCallback", + "OrthancPluginRegisterIncomingHttpRequestFilter2", + "OrthancPluginCallPeerApi", + "OrthancPluginCreateJob", + "OrthancPluginCreateJob2", + "OrthancPluginRegisterJobsUnserializer", + "OrthancPluginRegisterRefreshMetricsCallback", + "OrthancPluginEncodeDicomWebJson", + "OrthancPluginEncodeDicomWebXml", + "OrthancPluginEncodeDicomWebJson2", + "OrthancPluginEncodeDicomWebXml2", + "OrthancPluginChunkedHttpClient", + "OrthancPluginRegisterChunkedRestCallback", + "OrthancPluginRegisterStorageCommitmentScpCallback", + "OrthancPluginRegisterIncomingDicomInstanceFilter", + "OrthancPluginRegisterIncomingCStoreInstanceFilter", + "OrthancPluginRegisterReceivedInstanceCallback", + "OrthancPluginGetInstanceDicomWebJson", + "OrthancPluginGetInstanceDicomWebXml", + "OrthancPluginRegisterTranscoderCallback", + "OrthancPluginRegisterStorageArea2", + "OrthancPluginCallRestApi", + "OrthancPluginRegisterWebDavCollection", + "OrthancPluginRegisterStorageArea3", + "OrthancPluginRegisterDatabaseBackendV4", + "OrthancPluginAdoptDicomInstance", + "OrthancPluginGetKeyValue", + "OrthancPluginKeysValuesIteratorNext", + "OrthancPluginDequeueValue", + "OrthancPluginGetQueueSize", + "OrthancPluginSetStableStatus", + "OrthancPluginRegisterHttpAuthentication", + "OrthancPluginRegisterAuditLogHandler" ] } \ No newline at end of file
--- a/OrthancServer/Resources/CodeModel/GenerateCodeModel.py Tue Aug 19 10:44:42 2025 +0200 +++ b/OrthancServer/Resources/CodeModel/GenerateCodeModel.py Wed Aug 20 14:26:28 2025 +0200 @@ -454,6 +454,7 @@ globalFunctions = [] countWrappedFunctions = 0 countAllFunctions = 0 +unwrappedFunctions = [] for node in tu.cursor.get_children(): # Only consider the Orthanc SDK @@ -525,11 +526,12 @@ InjectSinceSdk(method, node) if not EncodeArguments(method, args[1:]): - pass + unwrappedFunctions.append(node.spelling) elif EncodeResultType(method, returnBufferType, node.result_type): classes[cls]['methods'].append(method) countWrappedFunctions += 1 else: + unwrappedFunctions.append(node.spelling) print('[WARNING] Unsupported return type in a method (%s), cannot wrap: %s' % ( node.result_type.spelling, node.spelling)) @@ -549,11 +551,12 @@ InjectSinceSdk(f, node) if not EncodeArguments(f, args): - pass + unwrappedFunctions.append(node.spelling) elif EncodeResultType(f, returnBufferType, node.result_type): globalFunctions.append(f) countWrappedFunctions += 1 else: + unwrappedFunctions.append(node.spelling) print('[WARNING] Unsupported return type in a global function (%s), cannot wrap: %s' % ( node.result_type.spelling, node.spelling)) @@ -587,6 +590,7 @@ 'classes' : sorted(FlattenDictionary(classes), key = lambda x: x['name']), 'enumerations' : sorted(FlattenEnumerations(), key = lambda x: x['name']), 'global_functions' : globalFunctions, # Global functions are ordered in the same order as in the C header + 'unwrapped_functions' : unwrappedFunctions, }