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_next(cself): try: _ret = CPyPrimitive.fromPy(next(CPyObjectProxy.toPyIter(cself))) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __python_next(cself): try: with CPyString.fromPyOpt(next(CPyObjectProxy.toPyIter(cself))) as py_obj: return py_obj.release_djinni_string() except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __get_elem(cself, index): try: _ret = CPyObjectProxy.fromPy(MapStringInt64THelper.c_data_set, MapStringInt64TProxy(CPyObject.toPy(None, cself)[index])) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_map_record_f1(cself): try: _ret = CPyObjectProxy.fromPy(MapStringInt64THelper.c_data_set, MapStringInt64TProxy(CPyRecord.toPy(None, cself).map)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_containers_record_f11(cself): try: _ret = CPyObjectProxy.fromPy(MapInt8TListDateHelper.c_data_set, MapInt8TListDateProxy(CPyRecord.toPy(None, cself).map_int_list_date)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __python_next(cself): try: _ret= CPyEnum.fromPy(next(CPyObjectProxy.toPyIter(cself))) assert _ret.value != -1 return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_containers_record_f14(cself): try: _ret = CPyObjectProxy.fromPy(SetOptionalStringHelper.c_data_set, SetOptionalStringProxy(CPyRecord.toPy(None, cself).set_optional_string)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_set_record_f2(cself): try: _ret = CPyObjectProxy.fromPy(SetInt32THelper.c_data_set, SetInt32TProxy(CPyRecord.toPy(None, cself).iset)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_containers_record_f16(cself): try: _ret = CPyObjectProxy.fromPy(MapBoxedInt32TSetStringHelper.c_data_set, MapBoxedInt32TSetStringProxy(CPyRecord.toPy(None, cself).map_optional_int_set_string)) 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 = CPyString.toPyWithoutTakingOwnership(key) try: with CPyString.fromPyOpt(CPyObjectProxy.toPyObj(None, cself)[pyKey]) as py_obj: return py_obj.release_djinni_string() except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __get_value(cself, key): pyKey = CPyString.toPyWithoutTakingOwnership(key) assert pyKey is not None try: _ret = CPyPrimitive.fromPy(CPyObjectProxy.toPyObj(None, cself)[pyKey]) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __get_value(cself, key): pyKey = CPyEnum.toPy(MyEnum, key) assert pyKey is not None try: _ret = CPyPrimitive.fromPy( CPyObjectProxy.toPyObj(None, cself)[pyKey]) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __get_elem(cself, index): try: _ret = CPyObjectProxy.fromPy( MapStringInt64THelper.c_data_set, MapStringInt64TProxy(CPyObject.toPy(None, cself)[index])) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __python_next(cself): try: with CPyString.fromPy(next( CPyObjectProxy.toPyIter(cself))) as py_obj: _ret = py_obj.release_djinni_string() assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def python_create_foo_containers_record(optional_list_int,list_int,list_binary,list_optional_binary,list_list_string,list_record,optional_map_string_int,map_string_int,map_string_string,map_optional_string_optional_string,map_int_list_date,optional_set_string,set_string,set_optional_string,map_int_set_string,map_optional_int_set_string): py_rec = FooContainersRecord( CPyObject.toPyOpt(ListInt32THelper.c_data_set, optional_list_int), CPyObject.toPy(ListInt32THelper.c_data_set, list_int), CPyObject.toPy(ListBinaryHelper.c_data_set, list_binary), CPyObject.toPy(ListOptionalBinaryHelper.c_data_set, list_optional_binary), CPyObject.toPy(ListListStringHelper.c_data_set, list_list_string), CPyObject.toPy(ListRecordFooSomeOtherRecordHelper.c_data_set, list_record), CPyObjectProxy.toPyObjOpt(MapStringInt32THelper.c_data_set, optional_map_string_int), CPyObjectProxy.toPyObj(MapStringInt32THelper.c_data_set, map_string_int), CPyObjectProxy.toPyObj(MapStringStringHelper.c_data_set, map_string_string), CPyObjectProxy.toPyObj(MapOptionalStringOptionalStringHelper.c_data_set, map_optional_string_optional_string), CPyObjectProxy.toPyObj(MapInt8TListDateHelper.c_data_set, map_int_list_date), CPyObjectProxy.toPyObjOpt(SetStringHelper.c_data_set, optional_set_string), CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, set_string), CPyObjectProxy.toPyObj(SetOptionalStringHelper.c_data_set, set_optional_string), CPyObjectProxy.toPyObj(MapInt8TSetStringHelper.c_data_set, map_int_set_string), CPyObjectProxy.toPyObj(MapBoxedInt32TSetStringHelper.c_data_set, map_optional_int_set_string)) return CPyRecord.fromPy(FooContainersRecord.c_data_set, py_rec) #to do: can be optional?
def __get_value(cself, key): pyKey = CPyString.toPyWithoutTakingOwnership(key) assert pyKey is not None try: _ret = CPyPrimitive.fromPy( CPyObjectProxy.toPyObj(None, cself)[pyKey]) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_all_datatypes_f13(cself): try: _ret = CPyObjectProxy.fromPy( MapInt8TBoolHelper.c_data_set, MapInt8TBoolProxy(CPyRecord.toPy(None, cself).mapData)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_my_record_f20(cself): try: _ret = CPyObjectProxy.fromPy( MapEnumMyEnumInt16THelper.c_data_set, MapEnumMyEnumInt16TProxy(CPyRecord.toPy(None, cself).test17)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_my_record_f10(cself): try: _ret = CPyObjectProxy.fromPy( SetInt32THelper.c_data_set, SetInt32TProxy(CPyRecord.toPy(None, cself).test7)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_my_record_f3(cself): try: _ret = CPyObjectProxy.fromPy( SetStringHelper.c_data_set, SetStringProxy(CPyRecord.toPy(None, cself).store)) 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 = CPyPrimitive.toPy(key) assert pyKey is not None try: _ret = CPyObject.fromPy(ListDateHelper.c_data_set, 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_map_record_f2(cself): try: _ret = CPyObjectProxy.fromPy( MapInt32TInt32THelper.c_data_set, MapInt32TInt32TProxy(CPyRecord.toPy(None, cself).imap)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_containers_record_f11(cself): try: _ret = CPyObjectProxy.fromPy( MapInt8TListDateHelper.c_data_set, MapInt8TListDateProxy( CPyRecord.toPy(None, cself).map_int_list_date)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_containers_record_f14(cself): try: _ret = CPyObjectProxy.fromPy( SetOptionalStringHelper.c_data_set, SetOptionalStringProxy( CPyRecord.toPy(None, cself).set_optional_string)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_containers_record_f16(cself): try: _ret = CPyObjectProxy.fromPy( MapBoxedInt32TSetStringHelper.c_data_set, MapBoxedInt32TSetStringProxy( CPyRecord.toPy(None, cself).map_optional_int_set_string)) 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 = CPyString.toPyWithoutTakingOwnership(key) assert pyKey is not None try: with CPyString.fromPy(CPyObjectProxy.toPyObj(None, cself)[pyKey]) as py_obj: _ret = py_obj.release_djinni_string() 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 = CPyEnum.toPy(Color, key) assert pyKey is not None try: with CPyString.fromPy(CPyObjectProxy.toPyObj(None, cself)[pyKey]) as py_obj: _ret = py_obj.release_djinni_string() assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def python_create_foo_containers_record( optional_list_int, list_int, list_binary, list_optional_binary, list_list_string, list_record, optional_map_string_int, map_string_int, map_string_string, map_optional_string_optional_string, map_int_list_date, optional_set_string, set_string, set_optional_string, map_int_set_string, map_optional_int_set_string): py_rec = FooContainersRecord( CPyObject.toPyOpt(ListInt32THelper.c_data_set, optional_list_int), CPyObject.toPy(ListInt32THelper.c_data_set, list_int), CPyObject.toPy(ListBinaryHelper.c_data_set, list_binary), CPyObject.toPy(ListOptionalBinaryHelper.c_data_set, list_optional_binary), CPyObject.toPy(ListListStringHelper.c_data_set, list_list_string), CPyObject.toPy(ListRecordFooSomeOtherRecordHelper.c_data_set, list_record), CPyObjectProxy.toPyObjOpt(MapStringInt32THelper.c_data_set, optional_map_string_int), CPyObjectProxy.toPyObj(MapStringInt32THelper.c_data_set, map_string_int), CPyObjectProxy.toPyObj(MapStringStringHelper.c_data_set, map_string_string), CPyObjectProxy.toPyObj( MapOptionalStringOptionalStringHelper.c_data_set, map_optional_string_optional_string), CPyObjectProxy.toPyObj(MapInt8TListDateHelper.c_data_set, map_int_list_date), CPyObjectProxy.toPyObjOpt(SetStringHelper.c_data_set, optional_set_string), CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, set_string), CPyObjectProxy.toPyObj(SetOptionalStringHelper.c_data_set, set_optional_string), CPyObjectProxy.toPyObj(MapInt8TSetStringHelper.c_data_set, map_int_set_string), CPyObjectProxy.toPyObj(MapBoxedInt32TSetStringHelper.c_data_set, map_optional_int_set_string)) return CPyRecord.fromPy(FooContainersRecord.c_data_set, py_rec) #to do: can be optional?
def python_create_my_record(test, test1, test2, test3, test3_1, test4, test4_1, test5, test6, test7, test8, test9, test10, test10_1, test11, test13, test14, test15, test16, test17): py_rec = MyRecord( CPyPrimitive.toPy(test), CPyBoxedU32.toPyOpt(test1), CPyObject.toPy(ListUint32THelper.c_data_set, test2), CPyString.toPy(test3), CPyString.toPyOpt(test3_1), CPyDate.toPy(test4), CPyBoxedDate.toPyOpt(test4_1), 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, test10_1), 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 get_empty_map(): _ret_c = lib.cw__test_helpers_get_empty_map() CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyObjectProxy.toPyObj(MapStringInt64THelper.c_data_set, _ret_c) assert _ret is not None return _ret
def check_empty_map(m): _ret_c = lib.cw__test_helpers_check_empty_map(CPyObjectProxy.fromPy(MapStringInt64THelper.c_data_set, MapStringInt64TProxy(m))) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyPrimitive.toPy(_ret_c) assert _ret is not None return _ret
def __python_add(cself, key, value): CPyObjectProxy.toPyObj(None, cself)[CPyEnum.toPy(Color, key)] = CPyEnum.toPy(Color, value)
def __python_add(cself, el): CPyObjectProxy.toPyObj(None, cself).add(CPyEnum.toPy(Color, el))
def __python_add(cself, el): CPyObjectProxy.toPyObj(None, cself).add(CPyString.toPyOpt(el))
def __python_add(cself, key, value): CPyObjectProxy.toPyObj(None, cself)[CPyPrimitive.toPy(key)] = CPyPrimitive.toPy(value)
def __add(cself, key, value): CPyObjectProxy.toPyObj( None, cself)[CPyPrimitive.toPy(key)] = CPyPrimitive.toPy(value)
def python_create_set_record(set, iset): py_rec = SetRecord( CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, set), CPyObjectProxy.toPyObj(SetInt32THelper.c_data_set, iset)) return CPyRecord.fromPy(SetRecord.c_data_set, py_rec) #to do: can be optional?
def __python_add(cself, key, value): CPyObjectProxy.toPyObj(None, cself)[CPyString.toPy(key)] = CPyString.toPy(value)
def set_optional_map_string_int(self, m): lib.cw__foo_containers_interface_set_optional_map_string_int(self._cpp_impl, CPyObjectProxy.fromPyOpt(MapStringInt32THelper.c_data_set, MapStringInt32TProxy(m))) CPyException.toPyCheckAndRaise(ffi.NULL)
def __python_add(cself, key, value): CPyObjectProxy.toPyObj( None, cself)[CPyString.toPy(key)] = CPyString.toPy(value)
def __python_add(cself, key, value): CPyObjectProxy.toPyObj(None, cself)[CPyBoxedI32.toPyOpt(key)] = CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, value)
def check_enum_map(m): lib.cw__test_helpers_check_enum_map(CPyObjectProxy.fromPy(MapEnumColorStringHelper.c_data_set, MapEnumColorStringProxy(m))) CPyException.toPyCheckAndRaise(ffi.NULL)
def __get_size(cself): return len(CPyObjectProxy.toPyObj(None, cself))
def get_foo_containers_record_f7(cself): try: return CPyObjectProxy.fromPyOpt(MapStringInt32THelper.c_data_set, MapStringInt32TProxy(CPyRecord.toPy(None, cself).optional_map_string_int)) except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def python_create_map_record(map, imap): py_rec = MapRecord( CPyObjectProxy.toPyObj(MapStringInt64THelper.c_data_set, map), CPyObjectProxy.toPyObj(MapInt32TInt32THelper.c_data_set, imap)) return CPyRecord.fromPy(MapRecord.c_data_set, py_rec) #to do: can be optional?
def get_optional_map_string_int(self): _ret_c = lib.cw__foo_containers_interface_get_optional_map_string_int(self._cpp_impl) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyObjectProxy.toPyObjOpt(MapStringInt32THelper.c_data_set, _ret_c) return _ret
def __python_add(cself, key, value): CPyObjectProxy.toPyObj(None, cself)[CPyEnum.toPy( MyEnum, key)] = CPyPrimitive.toPy(value)
def __python_add(cself, key, value): CPyObjectProxy.toPyObj( None, cself)[CPyPrimitive.toPy(key)] = CPyObjectProxy.toPyObj( SetStringHelper.c_data_set, value)
def get_foo_containers_record_f12(cself): try: return CPyObjectProxy.fromPyOpt(SetStringHelper.c_data_set, SetStringProxy(CPyRecord.toPy(None, cself).optional_set_string)) except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __python_add(cself, el): CPyObjectProxy.toPyObj(None, cself).add(CPyPrimitive.toPy(el))
def conflict_arg(self, cs): _ret_c = lib.cw__conflict_user_conflict_arg(self._cpp_impl, CPyObjectProxy.fromPy(SetInterfaceConflictHelper.c_data_set, SetInterfaceConflictProxy(cs))) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyPrimitive.toPy(_ret_c) assert _ret is not None return _ret
def set_optional_map_string_int(self, m): lib.cw__foo_containers_interface_set_optional_map_string_int( self._cpp_impl, CPyObjectProxy.fromPyOpt(MapStringInt32THelper.c_data_set, MapStringInt32TProxy(m))) CPyException.toPyCheckAndRaise(ffi.NULL)
def __python_add(cself, el): CPyObject.toPy(None, cself).append( CPyObjectProxy.toPyObj(MapStringInt64THelper.c_data_set, el))
def __python_add(cself, el): CPyObject.toPy(None, cself).append(CPyObjectProxy.toPyObj(MapStringInt64THelper.c_data_set, el))
def python_create_set_record(set,iset): py_rec = SetRecord( CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, set), CPyObjectProxy.toPyObj(SetInt32THelper.c_data_set, iset)) return CPyRecord.fromPy(SetRecord.c_data_set, py_rec) #to do: can be optional?