annotate Sources/Autogenerated/sdk_OrthancPluginJob.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 008be55355a4
children f34f3a149c22
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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_OrthancPluginJob_OrthancPluginSubmitJob(
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 sdk_OrthancPluginJob_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 OrthancPluginSubmitJob() on object of class OrthancPluginJob");
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
177
008be55355a4 regenerating the wrapper after patching SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
13 long int arg0 = 0;
129
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
177
008be55355a4 regenerating the wrapper after patching SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
15 if (!PyArg_ParseTuple(args, "l", &arg0))
129
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 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
18 return NULL;
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 }
174
e9be3c9294d4 [IMPORTANT] replaced old auto-generated code with Java code model
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
20
129
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 OrthancPlugins::OrthancString s;
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 s.Assign(OrthancPluginSubmitJob(OrthancPlugins::GetGlobalContext(), self->object_, arg0));
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 if (s.GetContent() == NULL)
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 {
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 PythonLock::RaiseException(OrthancPluginErrorCode_InternalError);
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 return NULL;
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 }
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 else
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 return PyUnicode_FromString(s.GetContent());
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 }
5643e97d9367 reproducible code generation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34