Mercurial > hg > orthanc-python
comparison CodeAnalysis/ParseOrthancSDK.py @ 31:abe6dcd7f35e
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 12 May 2020 12:20:39 +0200 |
parents | b2bbb516056e |
children | 23f3099bed47 |
comparison
equal
deleted
inserted
replaced
29:a3642e761a58 | 31:abe6dcd7f35e |
---|---|
396 elif (len(args) >= 2 and | 396 elif (len(args) >= 2 and |
397 IsTargetMemoryBufferType(args[0].type) and | 397 IsTargetMemoryBufferType(args[0].type) and |
398 IsClassType(args[1].type) and | 398 IsClassType(args[1].type) and |
399 CheckOnlySupportedArguments(args[2:])): | 399 CheckOnlySupportedArguments(args[2:])): |
400 print('Simple method of class %s, returning bytes: %s' % ( | 400 print('Simple method of class %s, returning bytes: %s' % ( |
401 args[0].type.get_pointee().spelling, | 401 args[1].type.get_pointee().spelling, |
402 node.spelling)) | 402 node.spelling)) |
403 | 403 |
404 className = args[1].type.get_pointee().spelling | |
405 | |
406 if className.startswith('const '): | |
407 className = className[len('const '):] | |
408 | |
404 method = GenerateFunctionBodyTemplate(node.spelling, args[0].type, args[2:]) | 409 method = GenerateFunctionBodyTemplate(node.spelling, args[0].type, args[2:]) |
405 method['self'] = ', self->object_' | 410 method['self'] = ', self->object_' |
406 classes[className]['methods'].append(method) | 411 classes[className]['methods'].append(method) |
407 countSupportedFunctions += 1 | 412 countSupportedFunctions += 1 |
408 | 413 |