comparison Sources/Autogenerated/sdk_OrthancPluginFindQuery.methods.h @ 129:5643e97d9367 fix-leak

reproducible code generation
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2023 11:40:22 +0200
parents
children e9be3c9294d4
comparison
equal deleted inserted replaced
128:5b59ebc267e1 129:5643e97d9367
1 // Actual implementation of the methods
2 static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQuerySize(
3 sdk_OrthancPluginFindQuery_Object* self, PyObject *args)
4 {
5 PythonLock::LogCall("Calling method OrthancPluginGetFindQuerySize() on object of class OrthancPluginFindQuery");
6
7 if (self->object_ == NULL)
8 {
9 PyErr_SetString(PyExc_ValueError, "Invalid object");
10 return NULL;
11 }
12
13
14 long value = OrthancPluginGetFindQuerySize(OrthancPlugins::GetGlobalContext(), self->object_);
15
16 return PyLong_FromLong(value);
17 }
18
19 static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQueryTagName(
20 sdk_OrthancPluginFindQuery_Object* self, PyObject *args)
21 {
22 PythonLock::LogCall("Calling method OrthancPluginGetFindQueryTagName() on object of class OrthancPluginFindQuery");
23
24 if (self->object_ == NULL)
25 {
26 PyErr_SetString(PyExc_ValueError, "Invalid object");
27 return NULL;
28 }
29
30 unsigned long arg0 = 0;
31
32 if (!PyArg_ParseTuple(args, "k", &arg0))
33 {
34 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
35 return NULL;
36 }
37 OrthancPlugins::OrthancString s;
38 s.Assign(OrthancPluginGetFindQueryTagName(OrthancPlugins::GetGlobalContext(), self->object_, arg0));
39
40 if (s.GetContent() == NULL)
41 {
42 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
43 return NULL;
44 }
45 else
46 {
47 return PyUnicode_FromString(s.GetContent());
48 }
49 }
50
51 static PyObject *sdk_OrthancPluginFindQuery_OrthancPluginGetFindQueryValue(
52 sdk_OrthancPluginFindQuery_Object* self, PyObject *args)
53 {
54 PythonLock::LogCall("Calling method OrthancPluginGetFindQueryValue() on object of class OrthancPluginFindQuery");
55
56 if (self->object_ == NULL)
57 {
58 PyErr_SetString(PyExc_ValueError, "Invalid object");
59 return NULL;
60 }
61
62 unsigned long arg0 = 0;
63
64 if (!PyArg_ParseTuple(args, "k", &arg0))
65 {
66 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
67 return NULL;
68 }
69 OrthancPlugins::OrthancString s;
70 s.Assign(OrthancPluginGetFindQueryValue(OrthancPlugins::GetGlobalContext(), self->object_, arg0));
71
72 if (s.GetContent() == NULL)
73 {
74 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
75 return NULL;
76 }
77 else
78 {
79 return PyUnicode_FromString(s.GetContent());
80 }
81 }
82