本文整理匯總了Python中djinni.pycffi_marshal.CPyObjectProxy類的典型用法代碼示例。如果您正苦於以下問題:Python CPyObjectProxy類的具體用法?Python CPyObjectProxy怎麽用?Python CPyObjectProxy使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了CPyObjectProxy類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __get_value
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
示例2: __python_next
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
示例3: __python_next
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
示例4: __python_next
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
示例5: get_foo_containers_record_f14
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
示例6: get_set_record_f2
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
示例7: __get_value
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
示例8: get_foo_containers_record_f16
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
示例9: __get_elem
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
示例10: get_map_record_f1
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
示例11: get_foo_containers_record_f11
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
示例12: __get_value
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
示例13: __get_value
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
示例14: python_create_foo_containers_record
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?
示例15: __get_value
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