annotate CodeAnalysis/Class.mustache @ 186:55473de7694f java-code-model

added warning about auto-generated files
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jul 2024 16:10:35 +0200
parents 20b004998fc2
children 66cd20e970d8
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: 131
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: 182
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: 182
diff changeset
23
55473de7694f added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 182
diff changeset
24
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
25 // Forward declaration of the autogenerated methods
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 {{#methods}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 static PyObject *sdk_{{class_name}}_{{c_function}}(
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 sdk_{{class_name}}_Object* self, PyObject *args);
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 {{/methods}}
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
30 // End of forward declarations
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
31
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
32
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
33 // Forward declaration of the custom methods
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
34 {{#custom_methods}}
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
35 extern PyObject *{{implementation}}(
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
36 sdk_{{class_name}}_Object* self, PyObject *args);
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
37 {{/custom_methods}}
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
38 // End of forward declarations
0
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
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 static PyMethodDef sdk_{{class_name}}_Methods[] = {
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {{#methods}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 { "{{short_name}}",
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 (PyCFunction) sdk_{{class_name}}_{{c_function}}, METH_VARARGS,
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 "Generated from C function {{c_function}}()" },
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {{/methods}}
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
47 {{#custom_methods}}
182
20b004998fc2 documentation of custom methods
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 171
diff changeset
48 { "{{short_name}}",
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
49 (PyCFunction) {{implementation}}, METH_VARARGS,
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
50 "Generated from C function {{sdk_function}}()" },
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
51 {{/custom_methods}}
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 { NULL } /* Sentinel */
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 static int sdk_{{class_name}}_Constructor(
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 sdk_{{class_name}}_Object *self, PyObject *args, PyObject *kwds)
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
59 PythonLock::LogCall("Creating Python object of class {{class_name}}");
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 self->object_ = NULL;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 self->borrowed_ = false;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 long long object = 0;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 unsigned char borrowed = false;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 if (PyArg_ParseTuple(args, "Lb", &object, &borrowed))
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 {
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 self->object_ = reinterpret_cast<{{class_name}}*>(static_cast<intptr_t>(object));
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 self->borrowed_ = borrowed;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 return 0;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 else
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 {
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 PyErr_SetString(PyExc_ValueError, "Expected a pair (pointer, borrowed) in the constructor");
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 return -1;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 /**
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 * Static global structure => the fields that are beyond the last
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 * initialized field are set to zero.
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 * https://stackoverflow.com/a/11152199/881731
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 **/
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 static PyTypeObject sdk_{{class_name}}_Type = {
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 PyVarObject_HEAD_INIT(NULL, 0)
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 "orthanc.{{short_name}}", /* tp_name */
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 sizeof(sdk_{{class_name}}_Object), /* tp_basicsize */
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 };
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 {{#destructor}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 static void sdk_{{class_name}}_Destructor(PyObject *self)
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 {
28
b2bbb516056e The "Calling Python..." info logs are disabled if "PythonVerbose" is "false"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
96 PythonLock::LogCall("Destroying Python object of class {{class_name}}");
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 sdk_{{class_name}}_Object& tmp = *((sdk_{{class_name}}_Object*) self);
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 if (tmp.object_ != NULL &&
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 !tmp.borrowed_)
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 {
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 {{destructor}}(OrthancPlugins::GetGlobalContext(), tmp.object_);
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 tmp.object_ = NULL;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 Py_TYPE(self)->tp_free((PyObject *)self);
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 {{/destructor}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 static void Register{{class_name}}Class(PyObject* module)
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 {
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 sdk_{{class_name}}_Type.tp_new = PyType_GenericNew;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 sdk_{{class_name}}_Type.tp_flags = Py_TPFLAGS_DEFAULT;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 sdk_{{class_name}}_Type.tp_doc = "Generated from Orthanc C class: {{class_name}}";
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 sdk_{{class_name}}_Type.tp_methods = sdk_{{class_name}}_Methods;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 sdk_{{class_name}}_Type.tp_init = (initproc) sdk_{{class_name}}_Constructor;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 {{#destructor}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 /**
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 * "tp_dealloc is called when the reference count of the object goes
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 * down to zero. This is where you destroy the object and its
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 * members. It should then free the memory occupied by the object by
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 * calling tp_free."
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 * https://stackoverflow.com/a/24863227/881731
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 **/
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 sdk_{{class_name}}_Type.tp_dealloc = sdk_{{class_name}}_Destructor;
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 {{/destructor}}
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 if (PyType_Ready(&sdk_{{class_name}}_Type) < 0)
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 {
171
c8de83fe7faa removed deprecation warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
133 ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: {{class_name}}");
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 Py_INCREF(&sdk_{{class_name}}_Type);
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 if (PyModule_AddObject(module, "{{short_name}}", (PyObject *)&sdk_{{class_name}}_Type) < 0)
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 {
171
c8de83fe7faa removed deprecation warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 166
diff changeset
140 ORTHANC_PLUGINS_LOG_ERROR("Cannot register Python class: {{class_name}}");
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 Py_DECREF(&sdk_{{class_name}}_Type);
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 }
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
147 PyTypeObject* Get{{class_name}}Type()
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 {
63
32de70a1e4c7 New functions from the SDK wrapped in Python: CreateDicom, RegisterFindCallback, RegisterMoveCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 56
diff changeset
149 return &sdk_{{class_name}}_Type;
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 }