Exemple #1
0
 def get_set_strings(self, ps1, ps2):
     with CPyString.fromPy(ps1) as pys_ps1,\
             CPyString.fromPy(ps2) as pys_ps2:
         _ret_c = lib.cw__foo_interface_get_set_strings(self._cpp_impl, pys_ps1.release_djinni_string(), pys_ps2.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
Exemple #2
0
 def get_set_strings(self, ps1, ps2):
     with CPyString.fromPy(ps1) as pys_ps1,\
             CPyString.fromPy(ps2) as pys_ps2:
         _ret_c = lib.cw__foo_interface_get_set_strings(
             self._cpp_impl, pys_ps1.release_djinni_string(),
             pys_ps2.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
Exemple #3
0
 def on_string_change(self, private_string):
     with CPyString.fromPy(private_string) as pys_private_string:
         _ret_c = lib.cw__foo_listener_bf_on_string_change(self._cpp_impl, pys_private_string.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
 def on_string_change(self, private_string):
     with CPyString.fromPy(private_string) as pys_private_string:
         _ret_c = lib.cw__foo_listener_bf_on_string_change(self._cpp_impl, pys_private_string.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
Exemple #5
0
 def update_static_messg_to(static_string):
     with CPyString.fromPy(static_string) as pys_static_string:
         _ret_c = lib.cw__foo_static_update_static_messg_to(pys_static_string.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
 def method_returning_some_type(self, key):
     with CPyString.fromPy(key) as pys_key:
         _ret_c = lib.cw__my_cpp_interface_method_returning_some_type(
             self._cpp_impl, pys_key.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyPrimitive.toPy(_ret_c)
         assert _ret is not None
         return _ret
Exemple #7
0
 def update_static_messg_to(static_string):
     with CPyString.fromPy(static_string) as pys_static_string:
         _ret_c = lib.cw__foo_static_update_static_messg_to(
             pys_static_string.release_djinni_string())
         CPyException.toPyCheckAndRaise(_ret_c)
         _ret = CPyString.toPy(_ret_c)
         assert _ret is not None
         return _ret
Exemple #8
0
 def cause_changes_int_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_int_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 = CPyPrimitive.toPy(_ret_c)
         assert _ret is not None
         return _ret
 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
Exemple #10
0
 def __get_elem(cself, index):
     try:
         with CPyString.fromPy(CPyObject.toPy(None, cself)[index]) 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
Exemple #11
0
 def __get_elem(cself, index):
     try:
         with CPyString.fromPy(CPyObject.toPy(None, cself)[index]) 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
Exemple #12
0
 def on_string_change(cself, private_string):
     try:
         with CPyString.fromPy(FooListenerHelper.selfToPy(cself).on_string_change(CPyString.toPy(private_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
Exemple #13
0
 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
Exemple #14
0
 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
Exemple #15
0
 def on_changes_string_returned(cself, i, f, s, binar, b, d):
     try:
         with CPyString.fromPy(FooListenerHelper.selfToPy(cself).on_changes_string_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_string()
             assert _ret != ffi.NULL
             return _ret
     except Exception as _djinni_py_e:
         CPyException.setExceptionFromPy(_djinni_py_e)
         return ffi.NULL
Exemple #16
0
 def get_string(cself):
     try:
         with CPyString.fromPy(FooListenerBfHelper.selfToPy(cself).get_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
Exemple #17
0
 def get_string(cself):
     try:
         with CPyString.fromPy(FooListenerBfHelper.selfToPy(cself).get_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 get_my_record_f4(cself):
     try:
         with CPyString.fromPy(CPyRecord.toPy(None, cself).test3) 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
Exemple #19
0
 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 get_custom_datatype_f1(cself):
     try:
         with CPyString.fromPy(CPyRecord.toPy(None,
                                              cself).recordData) 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
Exemple #22
0
 def return_str(cself):
     try:
         with CPyString.fromPy(
                 ClientInterfaceHelper.selfToPy(
                     cself).return_str()) 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
Exemple #23
0
 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
Exemple #25
0
 def meth_taking_optional_interface(cself, i):
     try:
         with CPyString.fromPy(
                 ClientInterfaceHelper.selfToPy(
                     cself).meth_taking_optional_interface(
                         ClientInterfaceHelper.toPy(i))) 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
Exemple #26
0
 def cause_changes_int_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_int_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 = CPyPrimitive.toPy(_ret_c)
         assert _ret is not None
         return _ret
Exemple #27
0
 def set_private_string(self, private_string):
     with CPyString.fromPy(private_string) as pys_private_string:
         lib.cw__foo_interface_set_private_string(
             self._cpp_impl, pys_private_string.release_djinni_string())
         CPyException.toPyCheckAndRaise(ffi.NULL)
Exemple #28
0
 def set_string(self, private_string):
     with CPyString.fromPy(private_string) as pys_private_string:
         lib.cw__foo_primitives_set_string(self._cpp_impl, pys_private_string.release_djinni_string())
         CPyException.toPyCheckAndRaise(ffi.NULL)
Exemple #29
0
 def cause_py_exception(self, exception_arg):
     with CPyString.fromPy(exception_arg) as pys_exception_arg:
         lib.cw__foo_receiver_cause_py_exception(self._cpp_impl, pys_exception_arg.release_djinni_string())
         CPyException.toPyCheckAndRaise(ffi.NULL)
Exemple #30
0
 def check_token_type(t, type):
     with CPyString.fromPy(type) as pys_type:
         lib.cw__test_helpers_check_token_type(UserTokenHelper.fromPy(t), pys_type.release_djinni_string())
         CPyException.toPyCheckAndRaise(ffi.NULL)
Exemple #31
0
 def cause_py_exception(self, exception_arg):
     with CPyString.fromPy(exception_arg) as pys_exception_arg:
         lib.cw__foo_receiver_cause_py_exception(
             self._cpp_impl, pys_exception_arg.release_djinni_string())
         CPyException.toPyCheckAndRaise(ffi.NULL)
Exemple #32
0
 def check_token_type(t, type):
     with CPyString.fromPy(type) as pys_type:
         lib.cw__test_helpers_check_token_type(
             UserTokenHelper.fromPy(t), pys_type.release_djinni_string())
         CPyException.toPyCheckAndRaise(ffi.NULL)