本文整理汇总了Python中objc_generator.ObjCGenerator.variable_name_prefix_for_domain方法的典型用法代码示例。如果您正苦于以下问题:Python ObjCGenerator.variable_name_prefix_for_domain方法的具体用法?Python ObjCGenerator.variable_name_prefix_for_domain怎么用?Python ObjCGenerator.variable_name_prefix_for_domain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类objc_generator.ObjCGenerator
的用法示例。
在下文中一共展示了ObjCGenerator.variable_name_prefix_for_domain方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _generate_dealloc
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_dealloc(self, domains):
lines = []
lines.append('- (void)dealloc')
lines.append('{')
for domain in domains:
if domain.commands and self._command_filter(domain):
lines.append(' [_%sHandler release];' % ObjCGenerator.variable_name_prefix_for_domain(domain))
if domain.events and self._event_filter(domain):
lines.append(' [_%sEventDispatcher release];' % ObjCGenerator.variable_name_prefix_for_domain(domain))
lines.append(' [super dealloc];')
lines.append('}')
return lines
示例2: _generate_ivars
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_ivars(self, domains):
lines = []
for domain in domains:
if domain.commands and self._command_filter(domain):
objc_class_name = "%s%sDomainHandler" % (ObjCGenerator.OBJC_PREFIX, domain.domain_name)
ivar_name = "_%sHandler" % ObjCGenerator.variable_name_prefix_for_domain(domain)
lines.append(" id<%s> %s;" % (objc_class_name, ivar_name))
if domain.events and self._event_filter(domain):
objc_class_name = "%s%sDomainEventDispatcher" % (ObjCGenerator.OBJC_PREFIX, domain.domain_name)
ivar_name = "_%sEventDispatcher" % ObjCGenerator.variable_name_prefix_for_domain(domain)
lines.append(" %s *%s;" % (objc_class_name, ivar_name))
return lines
示例3: _generate_ivars
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_ivars(self, domains):
lines = []
for domain in domains:
if self.should_generate_commands_for_domain(domain):
objc_class_name = '%s%sDomainHandler' % (self.objc_prefix(), domain.domain_name)
ivar_name = '_%sHandler' % ObjCGenerator.variable_name_prefix_for_domain(domain)
lines.append(' id<%s> %s;' % (objc_class_name, ivar_name))
if self.should_generate_events_for_domain(domain):
objc_class_name = '%s%sDomainEventDispatcher' % (self.objc_prefix(), domain.domain_name)
ivar_name = '_%sEventDispatcher' % ObjCGenerator.variable_name_prefix_for_domain(domain)
lines.append(' %s *%s;' % (objc_class_name, ivar_name))
return lines
示例4: _generate_event_dispatcher_getter_for_domain
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_event_dispatcher_getter_for_domain(self, domain):
getter_args = {
"objcPrefix": ObjCGenerator.OBJC_PREFIX,
"domainName": domain.domain_name,
"variableNamePrefix": ObjCGenerator.variable_name_prefix_for_domain(domain),
}
return Template(ObjCTemplates.ConfigurationGetterImplementation).substitute(None, **getter_args)
示例5: _generate_handler_setter_for_domain
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_handler_setter_for_domain(self, domain):
setter_args = {
"objcPrefix": ObjCGenerator.OBJC_PREFIX,
"domainName": domain.domain_name,
"variableNamePrefix": ObjCGenerator.variable_name_prefix_for_domain(domain),
}
return Template(ObjCTemplates.ConfigurationCommandPropertyImplementation).substitute(None, **setter_args)
示例6: _generate_event_dispatcher_getter_for_domain
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_event_dispatcher_getter_for_domain(self, domain):
getter_args = {
'objcPrefix': self.objc_prefix(),
'domainName': domain.domain_name,
'variableNamePrefix': ObjCGenerator.variable_name_prefix_for_domain(domain),
}
return Template(ObjCTemplates.ConfigurationGetterImplementation).substitute(None, **getter_args)
示例7: _generate_handler_setter_for_domain
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_handler_setter_for_domain(self, domain):
setter_args = {
'objcPrefix': self.objc_prefix(),
'domainName': domain.domain_name,
'variableNamePrefix': ObjCGenerator.variable_name_prefix_for_domain(domain),
}
return Template(ObjCTemplates.ConfigurationCommandPropertyImplementation).substitute(None, **setter_args)
示例8: _generate_properties_for_domain
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_properties_for_domain(self, domain):
property_args = {
'objcPrefix': ObjCGenerator.OBJC_PREFIX,
'domainName': domain.domain_name,
'variableNamePrefix': ObjCGenerator.variable_name_prefix_for_domain(domain),
}
lines = []
if domain.commands and self._command_filter(domain):
lines.append(Template(ObjCTemplates.ConfigurationCommandProperty).substitute(None, **property_args))
if domain.events and self._event_filter(domain):
lines.append(Template(ObjCTemplates.ConfigurationEventProperty).substitute(None, **property_args))
return lines
示例9: _generate_properties_for_domain
# 需要导入模块: from objc_generator import ObjCGenerator [as 别名]
# 或者: from objc_generator.ObjCGenerator import variable_name_prefix_for_domain [as 别名]
def _generate_properties_for_domain(self, domain):
property_args = {
'objcPrefix': self.objc_prefix(),
'domainName': domain.domain_name,
'variableNamePrefix': ObjCGenerator.variable_name_prefix_for_domain(domain),
}
lines = []
if self.should_generate_commands_for_domain(domain):
lines.append(Template(ObjCTemplates.ConfigurationCommandProperty).substitute(None, **property_args))
if self.should_generate_events_for_domain(domain):
lines.append(Template(ObjCTemplates.ConfigurationEventProperty).substitute(None, **property_args))
return lines