Library of Assembled Shared Sources
 
Loading...
Searching...
No Matches
pycallback_export_traits.inl
Go to the documentation of this file.
1/*
2 * *** ATTENTION! DO NOT MODIFY THIS FILE DIRECTLY! ***
3 *
4 * It has automatically been generated from pycallback_export_traits.tmpl.inl
5 * by param_expander.py on Fri Aug 14 16:06:14 2026.
6 */
7
8/** @file
9 * @author Bram de Greve (bram@cocamware.com)
10 * @author Tom De Muer (tom@cocamware.com)
11 *
12 * *** BEGIN LICENSE INFORMATION ***
13 *
14 * The contents of this file are subject to the Common Public Attribution License
15 * Version 1.0 (the "License"); you may not use this file except in compliance with
16 * the License. You may obtain a copy of the License at
17 * http://lass.sourceforge.net/cpal-license. The License is based on the
18 * Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover
19 * use of software over a computer network and provide for limited attribution for
20 * the Original Developer. In addition, Exhibit A has been modified to be consistent
21 * with Exhibit B.
22 *
23 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
24 * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
25 * language governing rights and limitations under the License.
26 *
27 * The Original Code is LASS - Library of Assembled Shared Sources.
28 *
29 * The Initial Developer of the Original Code is Bram de Greve and Tom De Muer.
30 * The Original Developer is the Initial Developer.
31 *
32 * All portions of the code written by the Initial Developer are:
33 * Copyright (C) 2004-2026 the Initial Developer.
34 * All Rights Reserved.
35 *
36 * Contributor(s):
37 *
38 * Alternatively, the contents of this file may be used under the terms of the
39 * GNU General Public License Version 2 or later (the GPL), in which case the
40 * provisions of GPL are applicable instead of those above. If you wish to allow use
41 * of your version of this file only under the terms of the GPL and not to allow
42 * others to use your version of this file under the CPAL, indicate your decision by
43 * deleting the provisions above and replace them with the notice and other
44 * provisions required by the GPL License. If you do not delete the provisions above,
45 * a recipient may use your version of this file under either the CPAL or the GPL.
46 *
47 * *** END LICENSE INFORMATION ***
48 */
49
50#ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_PYCALLBACK_EXPORT_TRAITS_H
51#define LASS_GUARDIAN_OF_INCLUSION_UTIL_PYCALLBACK_EXPORT_TRAITS_H
52
53namespace lass
54{
55namespace python
56{
57
58template <>
59struct PyExportTraits<lass::util::MultiCallback0>
60{
61 static constexpr const char* py_typing = "Callable[[], None]";
62
63 typedef lass::util::MultiCallback0 TCallback;
64 typedef lass::util::Callback0 TNonMultiCallback;
65 static PyObject* build(const lass::util::MultiCallback0& callback)
66 {
67 return new lass::python::MultiCallback(callback);
68 }
69 static int get(PyObject* obj, lass::util::MultiCallback0& callback)
70 {
71 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
72 {
73 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
74 callback = *almost->get();
75 return 0;
76 }
77 // see if we can convert from a callable object into a regular callback and add that
78 // to the multi-callback
79
80 TNonMultiCallback tempCallback;
81 int rv = pyGetSimpleObject(obj, tempCallback);
82 if (rv)
83 return rv;
84 callback.reset();
85 callback.add(tempCallback);
86 return 0;
87 }
88};
89
90
91
92template
93<
94 typename P1
95>
96struct PyExportTraits<lass::util::MultiCallback1< P1 > >
97{
98 static constexpr const char* py_typing = "Callable[[P1], None]";
99
100 typedef lass::util::MultiCallback1< P1 > TCallback;
101 typedef lass::util::Callback1< P1 > TNonMultiCallback;
102 static PyObject* build(const TCallback& callback)
103 {
104 return new lass::python::MultiCallback(callback);
105 }
106 static int get(PyObject* obj, TCallback& callback)
107 {
108 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
109 {
110 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
111 callback = *almost->get();
112 return 0;
113 }
114 // see if we can convert from a callable object into a regular callback and add that
115 // to the multi-callback
116
117 TNonMultiCallback tempCallback;
118 int rv = pyGetSimpleObject(obj, tempCallback);
119 if (rv)
120 return rv;
121 callback.reset();
122 callback.add(tempCallback);
123 return 0;
124 }
125};
126
127template
128<
129 typename P1, typename P2
130>
131struct PyExportTraits<lass::util::MultiCallback2< P1, P2 > >
132{
133 static constexpr const char* py_typing = "Callable[[P1, P2], None]";
134
135 typedef lass::util::MultiCallback2< P1, P2 > TCallback;
136 typedef lass::util::Callback2< P1, P2 > TNonMultiCallback;
137 static PyObject* build(const TCallback& callback)
138 {
139 return new lass::python::MultiCallback(callback);
140 }
141 static int get(PyObject* obj, TCallback& callback)
142 {
143 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
144 {
145 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
146 callback = *almost->get();
147 return 0;
148 }
149 // see if we can convert from a callable object into a regular callback and add that
150 // to the multi-callback
151
152 TNonMultiCallback tempCallback;
153 int rv = pyGetSimpleObject(obj, tempCallback);
154 if (rv)
155 return rv;
156 callback.reset();
157 callback.add(tempCallback);
158 return 0;
159 }
160};
161
162template
163<
164 typename P1, typename P2, typename P3
165>
166struct PyExportTraits<lass::util::MultiCallback3< P1, P2, P3 > >
167{
168 static constexpr const char* py_typing = "Callable[[P1, P2, P3], None]";
169
170 typedef lass::util::MultiCallback3< P1, P2, P3 > TCallback;
171 typedef lass::util::Callback3< P1, P2, P3 > TNonMultiCallback;
172 static PyObject* build(const TCallback& callback)
173 {
174 return new lass::python::MultiCallback(callback);
175 }
176 static int get(PyObject* obj, TCallback& callback)
177 {
178 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
179 {
180 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
181 callback = *almost->get();
182 return 0;
183 }
184 // see if we can convert from a callable object into a regular callback and add that
185 // to the multi-callback
186
187 TNonMultiCallback tempCallback;
188 int rv = pyGetSimpleObject(obj, tempCallback);
189 if (rv)
190 return rv;
191 callback.reset();
192 callback.add(tempCallback);
193 return 0;
194 }
195};
196
197template
198<
199 typename P1, typename P2, typename P3, typename P4
200>
201struct PyExportTraits<lass::util::MultiCallback4< P1, P2, P3, P4 > >
202{
203 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4], None]";
204
205 typedef lass::util::MultiCallback4< P1, P2, P3, P4 > TCallback;
206 typedef lass::util::Callback4< P1, P2, P3, P4 > TNonMultiCallback;
207 static PyObject* build(const TCallback& callback)
208 {
209 return new lass::python::MultiCallback(callback);
210 }
211 static int get(PyObject* obj, TCallback& callback)
212 {
213 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
214 {
215 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
216 callback = *almost->get();
217 return 0;
218 }
219 // see if we can convert from a callable object into a regular callback and add that
220 // to the multi-callback
221
222 TNonMultiCallback tempCallback;
223 int rv = pyGetSimpleObject(obj, tempCallback);
224 if (rv)
225 return rv;
226 callback.reset();
227 callback.add(tempCallback);
228 return 0;
229 }
230};
231
232template
233<
234 typename P1, typename P2, typename P3, typename P4, typename P5
235>
236struct PyExportTraits<lass::util::MultiCallback5< P1, P2, P3, P4, P5 > >
237{
238 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5], None]";
239
240 typedef lass::util::MultiCallback5< P1, P2, P3, P4, P5 > TCallback;
241 typedef lass::util::Callback5< P1, P2, P3, P4, P5 > TNonMultiCallback;
242 static PyObject* build(const TCallback& callback)
243 {
244 return new lass::python::MultiCallback(callback);
245 }
246 static int get(PyObject* obj, TCallback& callback)
247 {
248 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
249 {
250 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
251 callback = *almost->get();
252 return 0;
253 }
254 // see if we can convert from a callable object into a regular callback and add that
255 // to the multi-callback
256
257 TNonMultiCallback tempCallback;
258 int rv = pyGetSimpleObject(obj, tempCallback);
259 if (rv)
260 return rv;
261 callback.reset();
262 callback.add(tempCallback);
263 return 0;
264 }
265};
266
267template
268<
269 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6
270>
271struct PyExportTraits<lass::util::MultiCallback6< P1, P2, P3, P4, P5, P6 > >
272{
273 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6], None]";
274
275 typedef lass::util::MultiCallback6< P1, P2, P3, P4, P5, P6 > TCallback;
276 typedef lass::util::Callback6< P1, P2, P3, P4, P5, P6 > TNonMultiCallback;
277 static PyObject* build(const TCallback& callback)
278 {
279 return new lass::python::MultiCallback(callback);
280 }
281 static int get(PyObject* obj, TCallback& callback)
282 {
283 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
284 {
285 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
286 callback = *almost->get();
287 return 0;
288 }
289 // see if we can convert from a callable object into a regular callback and add that
290 // to the multi-callback
291
292 TNonMultiCallback tempCallback;
293 int rv = pyGetSimpleObject(obj, tempCallback);
294 if (rv)
295 return rv;
296 callback.reset();
297 callback.add(tempCallback);
298 return 0;
299 }
300};
301
302template
303<
304 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7
305>
306struct PyExportTraits<lass::util::MultiCallback7< P1, P2, P3, P4, P5, P6, P7 > >
307{
308 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7], None]";
309
310 typedef lass::util::MultiCallback7< P1, P2, P3, P4, P5, P6, P7 > TCallback;
311 typedef lass::util::Callback7< P1, P2, P3, P4, P5, P6, P7 > TNonMultiCallback;
312 static PyObject* build(const TCallback& callback)
313 {
314 return new lass::python::MultiCallback(callback);
315 }
316 static int get(PyObject* obj, TCallback& callback)
317 {
318 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
319 {
320 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
321 callback = *almost->get();
322 return 0;
323 }
324 // see if we can convert from a callable object into a regular callback and add that
325 // to the multi-callback
326
327 TNonMultiCallback tempCallback;
328 int rv = pyGetSimpleObject(obj, tempCallback);
329 if (rv)
330 return rv;
331 callback.reset();
332 callback.add(tempCallback);
333 return 0;
334 }
335};
336
337template
338<
339 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8
340>
341struct PyExportTraits<lass::util::MultiCallback8< P1, P2, P3, P4, P5, P6, P7, P8 > >
342{
343 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7, P8], None]";
344
345 typedef lass::util::MultiCallback8< P1, P2, P3, P4, P5, P6, P7, P8 > TCallback;
346 typedef lass::util::Callback8< P1, P2, P3, P4, P5, P6, P7, P8 > TNonMultiCallback;
347 static PyObject* build(const TCallback& callback)
348 {
349 return new lass::python::MultiCallback(callback);
350 }
351 static int get(PyObject* obj, TCallback& callback)
352 {
353 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
354 {
355 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
356 callback = *almost->get();
357 return 0;
358 }
359 // see if we can convert from a callable object into a regular callback and add that
360 // to the multi-callback
361
362 TNonMultiCallback tempCallback;
363 int rv = pyGetSimpleObject(obj, tempCallback);
364 if (rv)
365 return rv;
366 callback.reset();
367 callback.add(tempCallback);
368 return 0;
369 }
370};
371
372template
373<
374 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9
375>
376struct PyExportTraits<lass::util::MultiCallback9< P1, P2, P3, P4, P5, P6, P7, P8, P9 > >
377{
378 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7, P8, P9], None]";
379
380 typedef lass::util::MultiCallback9< P1, P2, P3, P4, P5, P6, P7, P8, P9 > TCallback;
381 typedef lass::util::Callback9< P1, P2, P3, P4, P5, P6, P7, P8, P9 > TNonMultiCallback;
382 static PyObject* build(const TCallback& callback)
383 {
384 return new lass::python::MultiCallback(callback);
385 }
386 static int get(PyObject* obj, TCallback& callback)
387 {
388 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
389 {
390 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
391 callback = *almost->get();
392 return 0;
393 }
394 // see if we can convert from a callable object into a regular callback and add that
395 // to the multi-callback
396
397 TNonMultiCallback tempCallback;
398 int rv = pyGetSimpleObject(obj, tempCallback);
399 if (rv)
400 return rv;
401 callback.reset();
402 callback.add(tempCallback);
403 return 0;
404 }
405};
406
407template
408<
409 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10
410>
411struct PyExportTraits<lass::util::MultiCallback10< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 > >
412{
413 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7, P8, P9, P10], None]";
414
415 typedef lass::util::MultiCallback10< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 > TCallback;
416 typedef lass::util::Callback10< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 > TNonMultiCallback;
417 static PyObject* build(const TCallback& callback)
418 {
419 return new lass::python::MultiCallback(callback);
420 }
421 static int get(PyObject* obj, TCallback& callback)
422 {
423 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
424 {
425 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
426 callback = *almost->get();
427 return 0;
428 }
429 // see if we can convert from a callable object into a regular callback and add that
430 // to the multi-callback
431
432 TNonMultiCallback tempCallback;
433 int rv = pyGetSimpleObject(obj, tempCallback);
434 if (rv)
435 return rv;
436 callback.reset();
437 callback.add(tempCallback);
438 return 0;
439 }
440};
441
442template
443<
444 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11
445>
446struct PyExportTraits<lass::util::MultiCallback11< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 > >
447{
448 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11], None]";
449
450 typedef lass::util::MultiCallback11< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 > TCallback;
451 typedef lass::util::Callback11< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 > TNonMultiCallback;
452 static PyObject* build(const TCallback& callback)
453 {
454 return new lass::python::MultiCallback(callback);
455 }
456 static int get(PyObject* obj, TCallback& callback)
457 {
458 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
459 {
460 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
461 callback = *almost->get();
462 return 0;
463 }
464 // see if we can convert from a callable object into a regular callback and add that
465 // to the multi-callback
466
467 TNonMultiCallback tempCallback;
468 int rv = pyGetSimpleObject(obj, tempCallback);
469 if (rv)
470 return rv;
471 callback.reset();
472 callback.add(tempCallback);
473 return 0;
474 }
475};
476
477template
478<
479 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12
480>
481struct PyExportTraits<lass::util::MultiCallback12< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 > >
482{
483 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12], None]";
484
485 typedef lass::util::MultiCallback12< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 > TCallback;
486 typedef lass::util::Callback12< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 > TNonMultiCallback;
487 static PyObject* build(const TCallback& callback)
488 {
489 return new lass::python::MultiCallback(callback);
490 }
491 static int get(PyObject* obj, TCallback& callback)
492 {
493 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
494 {
495 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
496 callback = *almost->get();
497 return 0;
498 }
499 // see if we can convert from a callable object into a regular callback and add that
500 // to the multi-callback
501
502 TNonMultiCallback tempCallback;
503 int rv = pyGetSimpleObject(obj, tempCallback);
504 if (rv)
505 return rv;
506 callback.reset();
507 callback.add(tempCallback);
508 return 0;
509 }
510};
511
512template
513<
514 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13
515>
516struct PyExportTraits<lass::util::MultiCallback13< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 > >
517{
518 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13], None]";
519
520 typedef lass::util::MultiCallback13< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 > TCallback;
521 typedef lass::util::Callback13< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 > TNonMultiCallback;
522 static PyObject* build(const TCallback& callback)
523 {
524 return new lass::python::MultiCallback(callback);
525 }
526 static int get(PyObject* obj, TCallback& callback)
527 {
528 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
529 {
530 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
531 callback = *almost->get();
532 return 0;
533 }
534 // see if we can convert from a callable object into a regular callback and add that
535 // to the multi-callback
536
537 TNonMultiCallback tempCallback;
538 int rv = pyGetSimpleObject(obj, tempCallback);
539 if (rv)
540 return rv;
541 callback.reset();
542 callback.add(tempCallback);
543 return 0;
544 }
545};
546
547template
548<
549 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14
550>
551struct PyExportTraits<lass::util::MultiCallback14< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 > >
552{
553 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14], None]";
554
555 typedef lass::util::MultiCallback14< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 > TCallback;
556 typedef lass::util::Callback14< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 > TNonMultiCallback;
557 static PyObject* build(const TCallback& callback)
558 {
559 return new lass::python::MultiCallback(callback);
560 }
561 static int get(PyObject* obj, TCallback& callback)
562 {
563 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
564 {
565 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
566 callback = *almost->get();
567 return 0;
568 }
569 // see if we can convert from a callable object into a regular callback and add that
570 // to the multi-callback
571
572 TNonMultiCallback tempCallback;
573 int rv = pyGetSimpleObject(obj, tempCallback);
574 if (rv)
575 return rv;
576 callback.reset();
577 callback.add(tempCallback);
578 return 0;
579 }
580};
581
582template
583<
584 typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15
585>
586struct PyExportTraits<lass::util::MultiCallback15< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 > >
587{
588 static constexpr const char* py_typing = "Callable[[P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15], None]";
589
590 typedef lass::util::MultiCallback15< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 > TCallback;
591 typedef lass::util::Callback15< P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 > TNonMultiCallback;
592 static PyObject* build(const TCallback& callback)
593 {
594 return new lass::python::MultiCallback(callback);
595 }
596 static int get(PyObject* obj, TCallback& callback)
597 {
598 if (obj->ob_type == MultiCallback::_lassPyClassDef.type())
599 {
600 lass::util::SharedPtr<TCallback>* almost = static_cast<lass::util::SharedPtr<TCallback>*>(static_cast<MultiCallback*>(obj)->raw(false));
601 callback = *almost->get();
602 return 0;
603 }
604 // see if we can convert from a callable object into a regular callback and add that
605 // to the multi-callback
606
607 TNonMultiCallback tempCallback;
608 int rv = pyGetSimpleObject(obj, tempCallback);
609 if (rv)
610 return rv;
611 callback.reset();
612 callback.add(tempCallback);
613 return 0;
614 }
615};
616
617
618}
619}
620
621#endif
622
623// EOF
Comprehensive C++ to Python binding library.
Library for Assembled Shared Sources.
Definition config.h:53
by copy, general case assumes shadow type or PyObjectPlus based type.