// ---------------------------- // AUTOGENERATED FROM: // {{{shorthand_file}}} // ---------------------------- #import "{{{class_name}}}.h" @implementation {{{class_name}}} {{#ivars_with_properties}} @synthesize {{{property_name}}} = {{{ivar_name}}}; {{/ivars_with_properties}} - (void) dealloc; { {{#ivars_with_properties_without_ro}} {{^is_assign}} self.{{{property_name}}} = nil; {{/is_assign}} {{/ivars_with_properties_without_ro}} {{#ivars_without_properties_or_with_ro}} {{^is_assign}} [{{{ivar_name}}} release]; {{/is_assign}} {{#is_assign}} // {{{ivar_name}}} is assigned {{/is_assign}} {{/ivars_without_properties_or_with_ro}} [super dealloc]; } {{#ivars_with_properties}} {{#needs_explicit_getter}} - ({{{ivar_type}}}) {{{property_name}}}; { {{#will_get}} [self willReturnValueFor{{{capitalized_property_name}}}]; {{/will_get}} return {{{ivar_name}}}; } {{#will_get}} - (void) willReturnValueFor{{{capitalized_property_name}}}; {} {{/will_get}} {{/needs_explicit_getter}} {{#needs_explicit_setter}} - (void) set{{{capitalized_property_name}}}:({{{ivar_type}}}) aNewValue; { if (aNewValue != {{{ivar_name}}}) { {{#will_set}} aNewValue = [self {{{property_name}}}WillChangeToValue:aNewValue fromValue:{{{ivar_name}}}]; if (aNewValue == {{{ivar_name}}}) return; {{/will_set}} {{#did_set}} {{{ivar_type}}} anOldValue = {{{ivar_name}}}; {{/did_set}} {{^is_assign}} {{#did_set}} [[anOldValue retain] autorelease]; {{/did_set}} {{/is_assign}} {{#is_assign}} {{{ivar_name}}} = aNewValue; {{/is_assign}} {{^is_assign}} [{{{ivar_name}}} release]; {{{ivar_name}}} = [aNewValue {{{memory_management_call}}}]; {{/is_assign}} {{#did_set}} [self {{{property_name}}}DidChangeToValue:aNewValue fromValue:anOldValue]; {{/did_set}} } } {{#will_set}} - ({{{ivar_type}}}) {{{property_name}}}WillChangeToValue:({{{ivar_type}}}) aNewValue fromValue:({{{ivar_type}}}) anOldValue; { return aNewValue; } {{/will_set}} {{#did_set}} - (void) {{{property_name}}}DidChangeToValue:({{{ivar_type}}}) aNewValue fromValue:({{{ivar_type}}}) anOldValue; {} {{/did_set}} {{/needs_explicit_setter}} {{/ivars_with_properties}} @end