Beispiel #1
0
 def id_binary(b):
     with CPyBinary.fromPy(b) as pybin_b:
         _ret_c = lib.cw__test_helpers_id_binary(pybin_b.release_djinni_binary())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyBinary.toPy(_ret_c)
         assert _ret is not None
         return _ret
Beispiel #2
0
 def cause_changes_binary_returned(self, i, f, s, binar, b, d):
     with CPyString.fromPy(s) as pys_s,\
             CPyBinary.fromPy(binar) as pybin_binar:
         _ret_c = lib.cw__foo_receiver_cause_changes_binary_returned(self._cpp_impl, CPyPrimitive.fromPy(i), CPyPrimitive.fromPy(f), pys_s.release_djinni_string(), pybin_binar.release_djinni_binary(), CPyPrimitive.fromPy(b), CPyDate.fromPy(d))
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyBinary.toPy(_ret_c)
         assert _ret is not None
         return _ret
Beispiel #3
0
 def id_binary(b):
     with CPyBinary.fromPy(b) as pybin_b:
         _ret_c = lib.cw__test_helpers_id_binary(
             pybin_b.release_djinni_binary())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyBinary.toPy(_ret_c)
         assert _ret is not None
         return _ret
Beispiel #4
0
 def cause_changes_binary_returned(self, i, f, s, binar, b, d):
     with CPyString.fromPy(s) as pys_s,\
             CPyBinary.fromPy(binar) as pybin_binar:
         _ret_c = lib.cw__foo_receiver_cause_changes_binary_returned(
             self._cpp_impl, CPyPrimitive.fromPy(i), CPyPrimitive.fromPy(f),
             pys_s.release_djinni_string(),
             pybin_binar.release_djinni_binary(), CPyPrimitive.fromPy(b),
             CPyDate.fromPy(d))
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyBinary.toPy(_ret_c)
         assert _ret is not None
         return _ret
Beispiel #5
0
 def get_binary_in_listener_bf_in_listener_bf(self):
     _ret_c = lib.cw__foo_receiver_get_binary_in_listener_bf_in_listener_bf(
         self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyBinary.toPy(_ret_c)
     assert _ret is not None
     return _ret
 def __get_elem(cself, index):
     try:
         with CPyBinary.fromPyOpt(CPyObject.toPy(None, cself)[index]) as py_obj:
             return py_obj.release_djinni_binary()
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #7
0
 def __get_elem(cself, index):
     try:
         with CPyBinary.fromPyOpt(CPyObject.toPy(None,
                                                 cself)[index]) as py_obj:
             return py_obj.release_djinni_binary()
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #8
0
 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
Beispiel #9
0
 def get_binary(cself):
     try:
         with CPyBinary.fromPy(FooListenerBfHelper.selfToPy(cself).get_binary()) as py_obj:
             _ret = py_obj.release_djinni_binary()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #10
0
 def get_binary(cself):
     try:
         with CPyBinary.fromPy(FooListenerBfHelper.selfToPy(cself).get_binary()) as py_obj:
             _ret = py_obj.release_djinni_binary()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #11
0
 def get_my_record_f8(cself):
     try:
         with CPyBinary.fromPy(CPyRecord.toPy(None, cself).test5) as py_obj:
             _ret = py_obj.release_djinni_binary()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #12
0
 def on_changes_binary_returned(cself, i, f, s, binar, b, d):
     try:
         with CPyBinary.fromPy(FooListenerHelper.selfToPy(cself).on_changes_binary_returned(CPyPrimitive.toPy(i), CPyPrimitive.toPy(f), CPyString.toPy(s), CPyBinary.toPy(binar), CPyPrimitive.toPy(b), CPyDate.toPy(d))) as py_obj:
             _ret = py_obj.release_djinni_binary()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #13
0
 def identifier_check(cself, data, r, jret):
     try:
         _ret = CPyPrimitive.fromPy(
             ClientInterfaceHelper.selfToPy(cself).identifier_check(
                 CPyBinary.toPy(data), CPyPrimitive.toPy(r),
                 CPyPrimitive.toPy(jret)))
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #14
0
 def get_all_datatypes_f9(cself):
     try:
         with CPyBinary.fromPy(CPyRecord.toPy(None,
                                              cself).binaryData) as py_obj:
             _ret = py_obj.release_djinni_binary()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #15
0
 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
Beispiel #16
0
 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?
Beispiel #17
0
 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?
Beispiel #18
0
 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?
Beispiel #19
0
 def get_binary_in_listener_bf_in_listener_bf(self):
     _ret_c = lib.cw__foo_receiver_get_binary_in_listener_bf_in_listener_bf(self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyBinary.toPy(_ret_c)
     assert _ret is not None
     return _ret
Beispiel #20
0
 def set_binary(cself, b):
     try:
         FooListenerBfHelper.selfToPy(cself).set_binary(CPyBinary.toPy(b))
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
Beispiel #21
0
 def set_binary_in_listener_bf_in_listener_bf(self, b):
     with CPyBinary.fromPy(b) as pybin_b:
         lib.cw__foo_receiver_set_binary_in_listener_bf_in_listener_bf(
             self._cpp_impl, pybin_b.release_djinni_binary())
         CPyException.toPyCheckAndRaise(ffi.NULL)
Beispiel #22
0
 def set_binary(cself, b):
     try:
         FooListenerBfHelper.selfToPy(cself).set_binary(CPyBinary.toPy(b))
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
Beispiel #23
0
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyBinary.toPy(el))
Beispiel #24
0
 def set_binary(self, b):
     with CPyBinary.fromPy(b) as pybin_b:
         lib.cw__foo_listener_bf_set_binary(self._cpp_impl, pybin_b.release_djinni_binary())
         CPyException.toPyCheckAndRaise(ffi.NULL)
Beispiel #25
0
 def on_changes_int_returned(cself, i, f, s, binar, b, d):
     try:
         _ret = CPyPrimitive.fromPy(FooListenerHelper.selfToPy(cself).on_changes_int_returned(CPyPrimitive.toPy(i), CPyPrimitive.toPy(f), CPyString.toPy(s), CPyBinary.toPy(binar), CPyPrimitive.toPy(b), CPyDate.toPy(d)))
         return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Beispiel #26
0
 def set_binary(self, private_binary):
     with CPyBinary.fromPy(private_binary) as pybin_private_binary:
         lib.cw__foo_primitives_set_binary(self._cpp_impl, pybin_private_binary.release_djinni_binary())
         CPyException.toPyCheckAndRaise(ffi.NULL)
Beispiel #27
0
 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
Beispiel #28
0
 def get_binary(self):
     _ret_c = lib.cw__foo_primitives_get_binary(self._cpp_impl)
     CPyException.toPyCheckAndRaise(_ret_c)
     _ret = CPyBinary.toPy(_ret_c)
     assert _ret is not None
     return _ret
Beispiel #29
0
 def __python_add(cself, el):
     CPyObject.toPy(None, cself).append(CPyBinary.toPyOpt(el))