def python_create_foo_client_returned_record(record_id, content, some_record): py_rec = FooClientReturnedRecord( CPyPrimitive.toPy(record_id), CPyString.toPy(content), CPyRecord.toPy(FooSomeOtherRecord.c_data_set, some_record)) return CPyRecord.fromPy(FooClientReturnedRecord.c_data_set, py_rec) #to do: can be optional?
def check_nested_collection(nc): _ret_c = lib.cw__test_helpers_check_nested_collection( CPyRecord.fromPy(NestedCollection.c_data_set, nc)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyPrimitive.toPy(_ret_c) assert _ret is not None return _ret
def check_map_list_record(m): _ret_c = lib.cw__test_helpers_check_map_list_record( CPyRecord.fromPy(MapListRecord.c_data_set, m)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyPrimitive.toPy(_ret_c) assert _ret is not None return _ret
def print(self, rc): _ret_c = lib.cw__hello_print(self._cpp_impl, CPyRecord.fromPy(MyRecord.c_data_set, rc)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyRecord.toPy(MyRecord.c_data_set, _ret_c) assert _ret is not None return _ret
def check_primitive_list(pl): _ret_c = lib.cw__test_helpers_check_primitive_list( CPyRecord.fromPy(PrimitiveList.c_data_set, pl)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyPrimitive.toPy(_ret_c) assert _ret is not None return _ret
def meth(self, er): _ret_c = lib.cw__interface_using_extended_record_meth( self._cpp_impl, CPyRecord.fromPy(ExtendedRecord.c_data_set, er)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyRecord.toPy(ExtendedRecord.c_data_set, _ret_c) assert _ret is not None return _ret
def run_sort(items): _ret_c = lib.cw__sort_items_run_sort( CPyRecord.fromPy(ItemList.c_data_set, items)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyRecord.toPy(ItemList.c_data_set, _ret_c) assert _ret is not None return _ret
def python_create_my_record(id, info, store, hash): py_rec = MyRecord( CPyPrimitive.toPy(id), CPyString.toPy(info), CPyObjectProxy.toPyObj(SetStringHelper.c_data_set, store), CPyObjectProxy.toPyObj(MapStringInt32THelper.c_data_set, hash)) return CPyRecord.fromPy(MyRecord.c_data_set, py_rec) #to do: can be optional?
def assorted_primitives_id(i): _ret_c = lib.cw__test_helpers_assorted_primitives_id( CPyRecord.fromPy(AssortedPrimitives.c_data_set, i)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyRecord.toPy(AssortedPrimitives.c_data_set, _ret_c) assert _ret is not None return _ret
def _rmethod_(self, _r_arg_): _ret_c = lib.cw___varname_interface___rmethod_( self._cpp_impl, CPyRecord.fromPy(VarnameRecord.c_data_set, _r_arg_)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyRecord.toPy(VarnameRecord.c_data_set, _ret_c) assert _ret is not None return _ret
def get_other_record_f1(cself): try: _ret = CPyRecord.fromPy(CustomDatatype.c_data_set, CPyRecord.toPy(None, cself).customDatatypeData) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_record_with_nested_derivings_f2(cself): try: _ret = CPyRecord.fromPy(RecordWithDerivings.c_data_set, CPyRecord.toPy(None, cself).rec) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def python_create_enum_usage_record(e, o, l, s, m): py_rec = EnumUsageRecord( CPyEnum.toPy(Color, e), CPyEnum.toPyOpt(Color, o), CPyObject.toPy(ListEnumColorHelper.c_data_set, l), CPyObjectProxy.toPyObj(SetEnumColorHelper.c_data_set, s), CPyObjectProxy.toPyObj(MapEnumColorEnumColorHelper.c_data_set, m)) return CPyRecord.fromPy(EnumUsageRecord.c_data_set, py_rec) #to do: can be optional?
def __get_elem(cself, index): try: _ret = CPyRecord.fromPy(FooRecord.c_data_set, 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 on_changes_record_returned(cself, n1, n2): try: _ret = CPyRecord.fromPy(FooSomeOtherRecord.c_data_set, FooListenerHelper.selfToPy(cself).on_changes_record_returned(CPyPrimitive.toPy(n1), CPyPrimitive.toPy(n2))) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_record_using_extended_record_f1(cself): try: _ret = CPyRecord.fromPy(ExtendedRecord.c_data_set, CPyRecord.toPy(None, cself).er) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_my_record_f12(cself): try: _ret = CPyRecord.fromPy(Rc.c_data_set, CPyRecord.toPy(None, cself).test9) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_client_returned_record_f3(cself): try: _ret = CPyRecord.fromPy(FooSomeOtherRecord.c_data_set, CPyRecord.toPy(None, cself).some_record) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def python_create_record_with_derivings(eight,sixteen,thirtytwo,sixtyfour,fthirtytwo,fsixtyfour,d,s): py_rec = RecordWithDerivings( CPyPrimitive.toPy(eight), CPyPrimitive.toPy(sixteen), CPyPrimitive.toPy(thirtytwo), CPyPrimitive.toPy(sixtyfour), CPyPrimitive.toPy(fthirtytwo), CPyPrimitive.toPy(fsixtyfour), CPyDate.toPy(d), CPyString.toPy(s)) return CPyRecord.fromPy(RecordWithDerivings.c_data_set, py_rec) #to do: can be optional?
def get_record(cself, record_id, utf8string, misc): try: _ret = CPyRecord.fromPy( ClientReturnedRecord.c_data_set, ClientInterfaceHelper.selfToPy(cself).get_record( CPyPrimitive.toPy(record_id), CPyString.toPy(utf8string), CPyString.toPyOpt(misc))) 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_all_datatypes(booleanData, integer8Data, integer16Data, integer32Data, integer64Data, float32Data, float64Data, stringData, binaryData, dateData, listData, setData, mapData, optionalData): py_rec = AllDatatypes( CPyPrimitive.toPy(booleanData), CPyPrimitive.toPy(integer8Data), CPyPrimitive.toPy(integer16Data), CPyPrimitive.toPy(integer32Data), CPyPrimitive.toPy(integer64Data), CPyPrimitive.toPy(float32Data), CPyPrimitive.toPy(float64Data), CPyString.toPy(stringData), CPyBinary.toPy(binaryData), CPyDate.toPy(dateData), CPyObject.toPy(ListBoolHelper.c_data_set, listData), CPyObjectProxy.toPyObj(SetBoolHelper.c_data_set, setData), CPyObjectProxy.toPyObj(MapInt8TBoolHelper.c_data_set, mapData), CPyBoxedBool.toPyOpt(optionalData)) return CPyRecord.fromPy(AllDatatypes.c_data_set, py_rec) #to do: can be optional?
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 python_create_other_record(customDatatypeData): py_rec = OtherRecord( CPyRecord.toPy(CustomDatatype.c_data_set, customDatatypeData)) return CPyRecord.fromPy(OtherRecord.c_data_set, py_rec) #to do: can be optional?
def python_create_rc(a): py_rec = Rc( CPyPrimitive.toPy(a)) return CPyRecord.fromPy(Rc.c_data_set, py_rec) #to do: can be optional?
def set_containers_record(self, rec): lib.cw__foo_containers_interface_set_containers_record( self._cpp_impl, CPyRecord.fromPy(FooContainersRecord.c_data_set, rec)) CPyException.toPyCheckAndRaise(ffi.NULL)
def python_create_item_list(items): py_rec = ItemList(CPyObject.toPy(ListStringHelper.c_data_set, items)) return CPyRecord.fromPy(ItemList.c_data_set, py_rec) #to do: can be optional?
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_create_map_list_record(map_list): py_rec = MapListRecord( CPyObject.toPy(ListMapStringInt64THelper.c_data_set, map_list)) return CPyRecord.fromPy(MapListRecord.c_data_set, py_rec) #to do: can be optional?