本文整理汇总了Python中dart_utilities.DartUtilities.extended_attribute_value_contains方法的典型用法代码示例。如果您正苦于以下问题:Python DartUtilities.extended_attribute_value_contains方法的具体用法?Python DartUtilities.extended_attribute_value_contains怎么用?Python DartUtilities.extended_attribute_value_contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dart_utilities.DartUtilities
的用法示例。
在下文中一共展示了DartUtilities.extended_attribute_value_contains方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_method
# 需要导入模块: from dart_utilities import DartUtilities [as 别名]
# 或者: from dart_utilities.DartUtilities import extended_attribute_value_contains [as 别名]
def generate_method(operation):
extended_attributes = operation.extended_attributes
idl_type = operation.idl_type
idl_type_str = str(idl_type)
if idl_type_str not in ['boolean', 'void']:
raise Exception('We only support callbacks that return boolean or void values.')
is_custom = 'Custom' in extended_attributes
if not is_custom:
add_includes_for_operation(operation)
call_with = extended_attributes.get('CallWith')
call_with_this_handle = DartUtilities.extended_attribute_value_contains(call_with, 'ThisValue')
contents = {
'call_with_this_handle': call_with_this_handle,
'cpp_type': idl_type.callback_cpp_type,
'custom': is_custom,
'idl_type': idl_type_str,
'name': operation.name,
}
contents.update(generate_arguments_contents(operation.arguments, call_with_this_handle))
return contents