Mercurial > hg > orthanc-python
annotate Sources/Autogenerated/sdk_OrthancPluginFindQuery.methods.h @ 178:194ba7d6e0f4 java-code-model
integration mainline->java-code-model
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Jun 2024 18:51:36 +0200 |
parents | e9be3c9294d4 |
children | f34f3a149c22 |
rev | line source |
---|---|
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 // Actual implementation of the methods |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQuerySize( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 sdk_OrthancPluginFindQuery_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 PythonLock::LogCall("Calling method OrthancPluginGetFindQuerySize() on object of class OrthancPluginFindQuery"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
14 |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 long value = OrthancPluginGetFindQuerySize(OrthancPlugins::GetGlobalContext(), self->object_); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 return PyLong_FromLong(value); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQueryTagName( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 sdk_OrthancPluginFindQuery_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 PythonLock::LogCall("Calling method OrthancPluginGetFindQueryTagName() on object of class OrthancPluginFindQuery"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 unsigned long arg0 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 if (!PyArg_ParseTuple(args, "k", &arg0)) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 } |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
38 |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 OrthancPlugins::OrthancString s; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 s.Assign(OrthancPluginGetFindQueryTagName(OrthancPlugins::GetGlobalContext(), self->object_, arg0)); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 if (s.GetContent() == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 else |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 return PyUnicode_FromString(s.GetContent()); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQueryValue( |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 sdk_OrthancPluginFindQuery_Object* self, PyObject *args) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 PythonLock::LogCall("Calling method OrthancPluginGetFindQueryValue() on object of class OrthancPluginFindQuery"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 if (self->object_ == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 PyErr_SetString(PyExc_ValueError, "Invalid object"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 unsigned long arg0 = 0; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 if (!PyArg_ParseTuple(args, "k", &arg0)) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)"); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 } |
174
e9be3c9294d4
[IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
129
diff
changeset
|
71 |
129
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 OrthancPlugins::OrthancString s; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 s.Assign(OrthancPluginGetFindQueryValue(OrthancPlugins::GetGlobalContext(), self->object_, arg0)); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 if (s.GetContent() == NULL) |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 return NULL; |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 else |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
81 { |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
82 return PyUnicode_FromString(s.GetContent()); |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 } |
5643e97d9367
reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 |