本文整理汇总了Python中objc_generator.ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration方法的典型用法代码示例。如果您正苦于以下问题:Python ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration方法的具体用法?Python ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration怎么用?Python ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类objc_generator.ObjCGenerator
的用法示例。
在下文中一共展示了ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _generate_anonymous_enum_conversion_for_declaration
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import objc_enum_name_for_anonymous_enum_declaration [as 别名]
def _generate_anonymous_enum_conversion_for_declaration(self, domain, declaration):
objc_enum_name = ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration(declaration)
enum_values = declaration.type.enum_values()
lines = []
lines.append(self._generate_enum_objc_to_protocol_string(objc_enum_name, enum_values))
lines.append(self._generate_enum_from_protocol_string(objc_enum_name, enum_values))
return '\n\n'.join(lines)
示例2: _generate_anonymous_enum_for_declaration
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import objc_enum_name_for_anonymous_enum_declaration [as 别名]
def _generate_anonymous_enum_for_declaration(self, domain, declaration):
objc_enum_name = ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration(declaration)
return self._generate_enum(objc_enum_name, declaration.type.enum_values())