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 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 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 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 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 get_my_record_f13(cself): try: return CPyRecord.fromPyOpt(Rc.c_data_set, CPyRecord.toPy(None, cself).test10) except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
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_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 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 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_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 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 get_foo_client_returned_record_f1(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).record_id) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_extensible_record_f1(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).number1) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_record_with_derivings_f6(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).fsixtyfour) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_foo_some_other_record_f2(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).number2) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_record_with_derivings_f1(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).key1) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
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 get_client_returned_record_f3(cself): try: with CPyString.fromPyOpt(CPyRecord.toPy(None, cself).misc) 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_foo_constants_f1(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).some_integer) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
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 get_all_datatypes_f7(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).float64Data) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
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 get_constant_record_f1(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).some_integer) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get__varname_record__f1(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself)._field_) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_assorted_primitives_f9(cself): try: with CPyBoxedI8.fromPyOpt(CPyRecord.toPy(None, cself).o_eight) 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_some_const_record_f2(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).number2) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_assorted_primitives_f7(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).fsixtyfour) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_my_record_f1(cself): try: _ret = CPyPrimitive.fromPy(CPyRecord.toPy(None, cself).test) return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def cause_changes_record_returned(self, n1, n2): _ret_c = lib.cw__foo_receiver_cause_changes_record_returned( self._cpp_impl, CPyPrimitive.fromPy(n1), CPyPrimitive.fromPy(n2)) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyRecord.toPy(FooSomeOtherRecord.c_data_set, _ret_c) assert _ret is not None return _ret
def get_containers_record(self): _ret_c = lib.cw__foo_containers_interface_get_containers_record( self._cpp_impl) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyRecord.toPy(FooContainersRecord.c_data_set, _ret_c) assert _ret is not None return _ret
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_enum_usage_record_f1(cself): try: _ret = CPyEnum.fromPy(CPyRecord.toPy(None, cself).e) assert _ret != -1 return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def __get_elem(cself, index): try: _ret = CPyRecord.fromPy(FooSomeOtherRecord.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 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 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_nested_collection_f1(cself): try: _ret = CPyObject.fromPy(ListSetStringHelper.c_data_set, CPyRecord.toPy(None, cself).set_list) 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_f6(cself): try: _ret = CPyObject.fromPy(ListRecordFooSomeOtherRecordHelper.c_data_set, CPyRecord.toPy(None, cself).list_record) 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_f5(cself): try: _ret = CPyObject.fromPy(ListListStringHelper.c_data_set, CPyRecord.toPy(None, cself).list_list_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_f4(cself): try: _ret = CPyObject.fromPy(ListOptionalBinaryHelper.c_data_set, CPyRecord.toPy(None, cself).list_optional_binary) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_primitive_list_f1(cself): try: _ret = CPyObject.fromPy(ListInt64THelper.c_data_set, CPyRecord.toPy(None, cself).list) 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_f13(cself): try: _ret = CPyObjectProxy.fromPy(SetStringHelper.c_data_set, SetStringProxy(CPyRecord.toPy(None, cself).set_string)) assert _ret != ffi.NULL return _ret except Exception as _djinni_py_e: CPyException.setExceptionFromPy(_djinni_py_e) return ffi.NULL
def get_record_with_derivings_f2(cself): try: with CPyString.fromPy(CPyRecord.toPy(None, cself).key2) 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_foo_constants_f2(cself): try: with CPyString.fromPy(CPyRecord.toPy(None, cself).some_string) 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_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_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 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 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 python_create_nested_collection(set_list): py_rec = NestedCollection( CPyObject.toPy(ListSetStringHelper.c_data_set, set_list)) return CPyRecord.fromPy(NestedCollection.c_data_set, py_rec) #to do: can be optional?
def get_containers_record(self): _ret_c = lib.cw__foo_containers_interface_get_containers_record(self._cpp_impl) CPyException.toPyCheckAndRaise(_ret_c) _ret = CPyRecord.toPy(FooContainersRecord.c_data_set, _ret_c) assert _ret is not None return _ret
def python_create_some_const_record(number1,number2): py_rec = SomeConstRecord( CPyPrimitive.toPy(number1), CPyPrimitive.toPy(number2)) return CPyRecord.fromPy(SomeConstRecord.c_data_set, py_rec) #to do: can be optional?
def set_optional_containers_record(self, rec): lib.cw__foo_containers_interface_set_optional_containers_record(self._cpp_impl, CPyRecord.fromPyOpt(FooContainersRecord.c_data_set, rec)) CPyException.toPyCheckAndRaise(ffi.NULL)