Mercurial > hg > orthanc-python
annotate CodeAnalysis/ClassMethods.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 | f79f5450ad7f |
children | 3678a028f1f6 |
rev | line source |
---|---|
186
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
1 /** |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
2 * Python plugin for Orthanc |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
3 * Copyright (C) 2020-2023 Osimis S.A., Belgium |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
4 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
5 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
6 * |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
10 * the License, or (at your option) any later version. |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
11 * |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
15 * Affero General Public License for more details. |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
16 * |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
19 **/ |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
20 |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
21 |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
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:
139
diff
changeset
|
23 |
55473de7694f
added warning about auto-generated files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
139
diff
changeset
|
24 |
139
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 // Actual implementation of the methods |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 {{#methods}} |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 static PyObject *sdk_{{class_name}}_{{c_function}}( |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 sdk_{{class_name}}_Object* self, PyObject *args) |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 { |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 PythonLock::LogCall("Calling method {{c_function}}() on object of class {{class_name}}"); |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 if (self->object_ == NULL) |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 { |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 return NULL; |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 } |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 {{> function_body}} |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 } |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 |
f79f5450ad7f
added missing file: CodeAnalysis/ClassMethods.mustache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 {{/methods}} |