Skip to content

Commit

Permalink
Merge pull request rentzsch#86 from robrix/mogenerator
Browse files Browse the repository at this point in the history
---

It is usable as a replacement for both -scalarAttributeType and -objectAttributeType, and pulls from the attributeValueTypeName userInfo field if available.
  • Loading branch information
rentzsch committed Jan 7, 2012
2 parents 636604b + 8a98f26 commit 7b35f59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/machine.m.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ const struct <$managedObjectClassName$>FetchedProperties <$managedObjectClassNam

- (<$Attribute.attributeTypeName$>)<$Attribute.name$>Value {
NSNumber *result = [self <$Attribute.name$>];
return [result <$Attribute.scalarAttributeAccessorMethod$>];
return [result <$Attribute.scalarAccessorMethodName$>];
}

- (void)set<$Attribute.name.initialCapitalString$>Value:(<$Attribute.attributeTypeName$>)value_ {
[self set<$Attribute.name.initialCapitalString$>:[NSNumber <$Attribute.scalarAttributeFactoryMethod$>value_]];
[self set<$Attribute.name.initialCapitalString$>:[NSNumber <$Attribute.scalarFactoryMethodName$>value_]];
}

- (<$Attribute.attributeTypeName$>)primitive<$Attribute.name.initialCapitalString$>Value {
NSNumber *result = [self primitive<$Attribute.name.initialCapitalString$>];
return [result <$Attribute.scalarAttributeAccessorMethod$>];
return [result <$Attribute.scalarAccessorMethodName$>];
}

- (void)setPrimitive<$Attribute.name.initialCapitalString$>Value:(<$Attribute.scalarAttributeType$>)value_ {
[self setPrimitive<$Attribute.name.initialCapitalString$>:[NSNumber <$Attribute.scalarAttributeFactoryMethod$>value_]];
[self setPrimitive<$Attribute.name.initialCapitalString$>:[NSNumber <$Attribute.scalarFactoryMethodName$>value_]];
}
<$endif$>
<$endif$>
Expand Down

0 comments on commit 7b35f59

Please sign in to comment.