Mercurial > hg > orthanc-python
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 |
rev | line source |
---|---|
0 | 1 /** |
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 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
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 | 32 {{#global_functions}} |
33 static PyObject* sdk_{{c_function}}(PyObject* module, PyObject* args) | |
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 | 36 |
37 {{> function_body}} | |
38 } | |
39 | |
40 {{/global_functions}} | |
41 | |
42 static PyMethodDef ORTHANC_SDK_FUNCTIONS[] = | |
43 { | |
44 {{#global_functions}} | |
45 { "{{short_name}}", sdk_{{c_function}}, METH_VARARGS, | |
46 "Generated from C function {{c_function}}()" }, | |
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 | 52 { NULL, NULL } |
53 }; | |
54 | |
55 | |
56 PyMethodDef* GetOrthancSdkFunctions() | |
57 { | |
58 return ORTHANC_SDK_FUNCTIONS; | |
59 } |