本文整理汇总了Python中djinni.pycffi_marshal.CPyObject.toPyOpt方法的典型用法代码示例。如果您正苦于以下问题:Python CPyObject.toPyOpt方法的具体用法?Python CPyObject.toPyOpt怎么用?Python CPyObject.toPyOpt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类djinni.pycffi_marshal.CPyObject
的用法示例。
在下文中一共展示了CPyObject.toPyOpt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: python_create_foo_containers_record
# 需要导入模块: from djinni.pycffi_marshal import CPyObject [as 别名]
# 或者: from djinni.pycffi_marshal.CPyObject import toPyOpt [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_list_int
# 需要导入模块: from djinni.pycffi_marshal import CPyObject [as 别名]
# 或者: from djinni.pycffi_marshal.CPyObject import toPyOpt [as 别名]
def get_optional_list_int(self):
_ret_c = lib.cw__foo_containers_interface_get_optional_list_int(self._cpp_impl)
CPyException.toPyCheckAndRaise(_ret_c)
_ret = CPyObject.toPyOpt(ListInt32THelper.c_data_set, _ret_c)
return _ret