annotate CodeAnalysis/GlobalFunctions.mustache @ 192:b0f096d2339e java-code-model

documentation of orthanc.RegisterRestCallback()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jul 2024 18:25:53 +0200
parents 55473de7694f
children 3678a028f1f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Python plugin for Orthanc
166
6fada29b6759 updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 155
diff changeset
3 * Copyright (C) 2020-2023 Osimis S.A., Belgium
6fada29b6759 updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 155
diff changeset
4 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
155
71d305c29cfa updated year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 114
diff changeset
5 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
186
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
22 // WARNING: Auto-generated file. Do not modify it by hand.
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
23
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
24
192
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
25 // Forward declaration of the custom global functions
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
26 {{#custom_functions}}
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
27 extern PyObject *{{implementation}}(PyObject* module, PyObject *args);
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
28 {{/custom_functions}}
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
29 // End of forward declarations
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
30
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
31
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 {{#global_functions}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 static PyObject* sdk_{{c_function}}(PyObject* module, PyObject* args)
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
35 PythonLock::LogCall("Calling Python global function: {{c_function}}()");
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 {{> function_body}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 {{/global_functions}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 static PyMethodDef ORTHANC_SDK_FUNCTIONS[] =
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 {
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 {{#global_functions}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 { "{{short_name}}", sdk_{{c_function}}, METH_VARARGS,
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 "Generated from C function {{c_function}}()" },
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 {{/global_functions}}
192
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
48 {{#custom_functions}}
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
49 { "{{short_name}}", {{implementation}}, METH_VARARGS,
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
50 "Implemented in C++ function {{implementation}}()" },
b0f096d2339e documentation of orthanc.RegisterRestCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 186
diff changeset
51 {{/custom_functions}}
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 { NULL, NULL }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 };
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 PyMethodDef* GetOrthancSdkFunctions()
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 {
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 return ORTHANC_SDK_FUNCTIONS;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 }