本文整理匯總了Python中djinni.pycffi_marshal.CPyObjectProxy.toPyObjOpt方法的典型用法代碼示例。如果您正苦於以下問題:Python CPyObjectProxy.toPyObjOpt方法的具體用法?Python CPyObjectProxy.toPyObjOpt怎麽用?Python CPyObjectProxy.toPyObjOpt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類djinni.pycffi_marshal.CPyObjectProxy
的用法示例。
在下文中一共展示了CPyObjectProxy.toPyObjOpt方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: python_create_foo_containers_record
# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObjOpt [as 別名]
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?
示例2: get_optional_map_string_int
# 需要導入模塊: from djinni.pycffi_marshal import CPyObjectProxy [as 別名]
# 或者: from djinni.pycffi_marshal.CPyObjectProxy import toPyObjOpt [as 別名]
def get_optional_map_string_int(self):
_ret_c = lib.cw__foo_containers_interface_get_optional_map_string_int(self._cpp_impl)
CPyException.toPyCheckAndRaise(_ret_c)
_ret = CPyObjectProxy.toPyObjOpt(MapStringInt32THelper.c_data_set, _ret_c)
return _ret