Skip to content

Commit

Permalink
Merge branch 'tomekc-transformable_custom_class'
Browse files Browse the repository at this point in the history
  • Loading branch information
atomicbird committed Aug 5, 2018
2 parents 7214f07 + 8ad3d72 commit 0a39417
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Senseful wrote up a [nice summary of mogenerator's command-line options](http://

## Version History

### v1.32: Wed Jun 20 2018
* [NEW] Support for URL and UUID property types ([protocool](https://github.com/tomekc/mogenerator/pull/1), [original PR](https://github.com/rentzsch/mogenerator/pull/370))

### v1.31: Mon Oct 3 2016 [download](https://github.com/rentzsch/mogenerator/releases/download/1.31/mogenerator-1.31.dmg)

* [NEW] Swift 3 support. ([Goncharov Vladimir](https://github.com/rentzsch/mogenerator/pull/347), [Hardik](https://github.com/rentzsch/mogenerator/pull/349), [rentzsch](https://github.com/rentzsch/mogenerator/commit/a65f6421baf39dc1458f22836907cfc55fc8ceb1))
Expand Down
2 changes: 1 addition & 1 deletion mogenerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ - (int)application:(DDCliApplication*)app runWithArguments:(NSArray*)arguments {
}

if (_version) {
printf("mogenerator 1.31. By Jonathan 'Wolf' Rentzsch + friends.\n");
printf("mogenerator 1.32. By Jonathan 'Wolf' Rentzsch + friends.\n");
return EXIT_SUCCESS;
}

Expand Down
8 changes: 8 additions & 0 deletions momcom/NSAttributeDescription+momcom.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

static NSDictionary *attributeTypeForString;
const NSString *const kUsesScalarAttributeType = @"mogenerator.usesScalarAttributeType";
const NSString *const kAttributeValueClassName = @"attributeValueClassName";

@implementation NSAttributeDescription (momcom)

Expand Down Expand Up @@ -50,6 +51,13 @@ + (NSAttributeDescription *)baseEntityForXML:(NSXMLElement *)xmlNode
[attributeDescription setAttributeType:[attributeType integerValue]];
}
}

NSXMLNode *customClassNameElement = [xmlNode attributeForName:@"customClassName"];
if (customClassNameElement != nil) {
NSMutableDictionary *userInfo = [[attributeDescription userInfo] mutableCopy];
userInfo[kAttributeValueClassName] = [customClassNameElement stringValue];
[attributeDescription setUserInfo:userInfo.copy];
}

NSXMLNode *userScalarElement = [xmlNode attributeForName:@"usesScalarValueType"];
if (userScalarElement != nil) {
Expand Down

0 comments on commit 0a39417

Please sign in to comment.