def cause_changes_int_optional_returned(self, i, f, s, binar, b, d): with CPyBoxedI32.fromPyOpt(i) as pyopt_i,\ CPyString.fromPyOpt(s) as pyopt_s,\ CPyBinary.fromPy(binar) as pybin_binar: _ret_c = lib.cw__foo_receiver_cause_changes_int_optional_returned(self._cpp_impl, pyopt_i.release_djinni_boxed(), CPyPrimitive.fromPy(f), pyopt_s.release_djinni_string(), pybin_binar.release_djinni_binary(), CPyPrimitive.fromPy(b), CPyDate.fromPy(d)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyBoxedI32.toPyOpt(_ret_c) return _ret
def cause_changes_int_optional_returned(self, i, f, s, binar, b, d): with CPyBoxedI32.fromPyOpt(i) as pyopt_i,\ CPyString.fromPyOpt(s) as pyopt_s,\ CPyBinary.fromPy(binar) as pybin_binar: _ret_c = lib.cw__foo_receiver_cause_changes_int_optional_returned( self._cpp_impl, pyopt_i.release_djinni_boxed(), CPyPrimitive.fromPy(f), pyopt_s.release_djinni_string(), pybin_binar.release_djinni_binary(), CPyPrimitive.fromPy(b), CPyDate.fromPy(d)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyBoxedI32.toPyOpt(_ret_c) return _ret
def get_assorted_primitives_f11(cself): try: with CPyBoxedI32.fromPyOpt(CPyRecord.toPy(None, cself).o_thirtytwo) as py_obj: return py_obj.release_djinni_boxed() except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def on_changes_int_optional_returned(cself, i, f, s, binar, b, d): try: with CPyBoxedI32.fromPyOpt(FooListenerHelper.selfToPy(cself).on_changes_int_optional_returned(CPyBoxedI32.toPyOpt(i), CPyPrimitive.toPy(f), CPyString.toPyOpt(s), CPyBinary.toPy(binar), CPyPrimitive.toPy(b), CPyDate.toPy(d))) as py_obj: return py_obj.release_djinni_boxed() except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __python_next(cself): try: with CPyBoxedI32.fromPyOpt(next(CPyObjectProxy.toPyIter(cself))) as py_obj: return py_obj.release_djinni_boxed() except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_my_record_f2(cself): try: with CPyBoxedI32.fromPyOpt(CPyRecord.toPy(None, cself).test1) as py_obj: return py_obj.release_djinni_boxed() except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __python_next(cself): try: with CPyBoxedI32.fromPyOpt(next( CPyObjectProxy.toPyIter(cself))) as py_obj: return py_obj.release_djinni_boxed() except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __get_value(cself, key): pyKey = CPyBoxedI32.toPyOptWithoutTakingOwnership(key) try: _ret = CPyObjectProxy.fromPy(SetStringHelper.c_data_set, SetStringProxy(CPyObjectProxy.toPyObj(None, cself)[pyKey])) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __get_value(cself, key): pyKey = CPyBoxedI32.toPyOptWithoutTakingOwnership(key) try: _ret = CPyObjectProxy.fromPy( SetStringHelper.c_data_set, SetStringProxy(CPyObjectProxy.toPyObj(None, cself)[pyKey])) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def python_create_assorted_primitives(b,eight,sixteen,thirtytwo,sixtyfour,fthirtytwo,fsixtyfour,o_b,o_eight,o_sixteen,o_thirtytwo,o_sixtyfour,o_fthirtytwo,o_fsixtyfour): py_rec = AssortedPrimitives( CPyPrimitive.toPy(b), CPyPrimitive.toPy(eight), CPyPrimitive.toPy(sixteen), CPyPrimitive.toPy(thirtytwo), CPyPrimitive.toPy(sixtyfour), CPyPrimitive.toPy(fthirtytwo), CPyPrimitive.toPy(fsixtyfour), CPyBoxedBool.toPyOpt(o_b), CPyBoxedI8.toPyOpt(o_eight), CPyBoxedI16.toPyOpt(o_sixteen), CPyBoxedI32.toPyOpt(o_thirtytwo), CPyBoxedI64.toPyOpt(o_sixtyfour), CPyBoxedF32.toPyOpt(o_fthirtytwo), CPyBoxedF64.toPyOpt(o_fsixtyfour)) return CPyRecord.fromPy(AssortedPrimitives.c_data_set, py_rec) #to do: can be optional?
def python_create_my_record(test, test1, test2, test3, test31, test4, test41, test5, test6, test7, test8, test9, test10, test101, test11, test13, test14, test15, test16, test17): py_rec = MyRecord( CPyPrimitive.toPy(test), CPyBoxedI32.toPyOpt(test1), CPyObject.toPy(ListInt32THelper.c_data_set, test2), CPyString.toPy(test3), CPyString.toPyOpt(test31), CPyDate.toPy(test4), CPyBoxedDate.toPyOpt(test41), CPyBinary.toPy(test5), CPyObject.toPy(ListBinaryHelper.c_data_set, test6), CPyObjectProxy.toPyObj(SetInt32THelper.c_data_set, test7), CPyObjectProxy.toPyObj(MapInt32TStringHelper.c_data_set, test8), CPyRecord.toPy(Rc.c_data_set, test9), CPyRecord.toPyOpt(Rc.c_data_set, test10), CPyObject.toPy(ListRecordRcHelper.c_data_set, test101), CPyEnum.toPy(MyEnum, test11), CPyEnum.toPyOpt(MyEnum, test13), CPyBoxedI16.toPyOpt(test14), CPyObject.toPy(ListEnumMyEnumHelper.c_data_set, test15), CPyObjectProxy.toPyObj(SetEnumMyEnumHelper.c_data_set, test16), CPyObjectProxy.toPyObj(MapEnumMyEnumInt16THelper.c_data_set, test17)) return CPyRecord.fromPy(MyRecord.c_data_set, py_rec) #to do: can be optional?
def return_none(): _ret_c = lib.cw__test_helpers_return_none() CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyBoxedI32.toPyOpt(_ret_c) return _ret
def __python_add(cself, key, value): CPyObjectProxy.toPyObj(None, cself)[CPyBoxedI32.toPyOpt(key)] = CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, value)
def __python_add(cself, key, value): CPyObjectProxy.toPyObj( None, cself)[CPyBoxedI32.toPyOpt(key)] = CPyObjectProxy.toPyObj( SetStringHelper.c_data_set, value)
def python_create_rc(a, b, c, d, e): py_rec = Rc(CPyPrimitive.toPy(a), CPyPrimitive.toPy(b), CPyBoxedI32.toPyOpt(c), CPyEnum.toPy(MyEnum, d), CPyBinary.toPy(e)) return CPyRecord.fromPy(Rc.c_data_set, py_rec) #to do: can be optional?