changeset 185:7e8085f80df5 java-code-model

simplification
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jul 2024 15:51:35 +0200
parents f34f3a149c22
children 55473de7694f
files CodeAnalysis/FunctionDocumentation.mustache CodeAnalysis/GenerateOrthancSDK.py
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CodeAnalysis/FunctionDocumentation.mustache	Tue Jul 02 15:49:05 2024 +0200
+++ b/CodeAnalysis/FunctionDocumentation.mustache	Tue Jul 02 15:51:35 2024 +0200
@@ -1,7 +1,7 @@
 {{#documentation.short_description}}
 # {{documentation.short_description}}
 {{/documentation.short_description}}
-def {{short_name}}({{#is_method}}self{{#documentation.has_args}}, {{/documentation.has_args}}{{/is_method}}{{documentation.args_declaration}}) -> {{documentation.return_type}}:
+def {{short_name}}({{#self}}self{{#documentation.has_args}}, {{/documentation.has_args}}{{/self}}{{documentation.args_declaration}}) -> {{documentation.return_type}}:
     """
 {{#documentation.description}}
     {{text}}
--- a/CodeAnalysis/GenerateOrthancSDK.py	Tue Jul 02 15:49:05 2024 +0200
+++ b/CodeAnalysis/GenerateOrthancSDK.py	Tue Jul 02 15:51:35 2024 +0200
@@ -372,14 +372,13 @@
         g = FormatFunction(m)
         if g != None:
             g['self'] = ', self->object_'
-            g['is_method'] = True
             methods.append(g)
 
     custom_methods = []
 
     if c['name'] in CUSTOM_METHODS:
         for custom_method in CUSTOM_METHODS[c['name']]:
-            custom_method['is_method'] = True
+            custom_method['self'] = True   # Indicates that this is a method
             custom_method['documentation'] = DocumentFunction(custom_method)
             custom_methods.append(custom_method)