Changeset 294
- Timestamp:
- 02/27/08 08:53:31 (11 months ago)
- Files:
-
- trunk/cocoa/mogenerator/mogenerator.m (modified) (3 diffs)
- trunk/cocoa/mogenerator/mogenerator.xcodeproj/wolf.mode1v3 (modified) (13 diffs)
- trunk/cocoa/mogenerator/mogenerator.xcodeproj/wolf.pbxuser (modified) (2 diffs)
- trunk/cocoa/mogenerator/templates/machine.h.motemplate (modified) (1 diff)
- trunk/cocoa/mogenerator/templates/machine.m.motemplate (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cocoa/mogenerator/mogenerator.m
r283 r294 67 67 - (NSString*)scalarAttributeType; 68 68 - (BOOL)hasDefinedAttributeType; 69 - (NSString*)objectAttributeType; 69 70 @end 70 71 @implementation NSAttributeDescription (scalarAttributeType) … … 109 110 - (BOOL)hasDefinedAttributeType { 110 111 return [self attributeType] != NSUndefinedAttributeType; 112 } 113 - (NSString*)objectAttributeType { 114 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 115 #define NSTransformableAttributeType 1800 116 #endif 117 if ([self attributeType] == NSTransformableAttributeType) { 118 NSString *result = [[self userInfo] objectForKey:@"attributeValueClassName"]; 119 return result ? result : @"NSObject"; 120 } else { 121 return [self attributeValueClassName]; 122 } 111 123 } 112 124 @end … … 271 283 if (_version) 272 284 { 273 printf("mogenerator 1. 7. By Jonathan 'Wolf' Rentzsch + friends.\n");285 printf("mogenerator 1.8. By Jonathan 'Wolf' Rentzsch + friends.\n"); 274 286 return EXIT_SUCCESS; 275 287 } trunk/cocoa/mogenerator/mogenerator.xcodeproj/wolf.mode1v3
r289 r294 198 198 <array/> 199 199 <key>OpenEditors</key> 200 <array/> 200 <array> 201 <dict> 202 <key>Content</key> 203 <dict> 204 <key>PBXProjectModuleGUID</key> 205 <string>7942A4AF0D7603A40097D2DE</string> 206 <key>PBXProjectModuleLabel</key> 207 <string>mogenerator.m</string> 208 <key>PBXSplitModuleInNavigatorKey</key> 209 <dict> 210 <key>Split0</key> 211 <dict> 212 <key>PBXProjectModuleGUID</key> 213 <string>7942A4B00D7603A40097D2DE</string> 214 <key>PBXProjectModuleLabel</key> 215 <string>mogenerator.m</string> 216 <key>_historyCapacity</key> 217 <integer>0</integer> 218 <key>bookmark</key> 219 <string>7942A4B20D7603A40097D2DE</string> 220 <key>history</key> 221 <array> 222 <string>7942A4B10D7603A40097D2DE</string> 223 </array> 224 </dict> 225 <key>SplitCount</key> 226 <string>1</string> 227 </dict> 228 <key>StatusBarVisibility</key> 229 <true/> 230 </dict> 231 <key>Geometry</key> 232 <dict> 233 <key>Frame</key> 234 <string>{{0, 20}, {1096, 762}}</string> 235 <key>PBXModuleWindowStatusBarHidden2</key> 236 <false/> 237 <key>RubberWindowFrame</key> 238 <string>542 210 1096 803 0 0 2560 1578 </string> 239 </dict> 240 </dict> 241 <dict> 242 <key>Content</key> 243 <dict> 244 <key>PBXProjectModuleGUID</key> 245 <string>7942A4B30D7603A40097D2DE</string> 246 <key>PBXProjectModuleLabel</key> 247 <string>NSAttributeDescription.h</string> 248 <key>PBXSplitModuleInNavigatorKey</key> 249 <dict> 250 <key>Split0</key> 251 <dict> 252 <key>PBXProjectModuleGUID</key> 253 <string>7942A4B40D7603A40097D2DE</string> 254 <key>PBXProjectModuleLabel</key> 255 <string>NSAttributeDescription.h</string> 256 <key>_historyCapacity</key> 257 <integer>0</integer> 258 <key>bookmark</key> 259 <string>7942A4B70D7603A40097D2DE</string> 260 <key>history</key> 261 <array> 262 <string>7942A4B50D7603A40097D2DE</string> 263 </array> 264 </dict> 265 <key>SplitCount</key> 266 <string>1</string> 267 </dict> 268 <key>StatusBarVisibility</key> 269 <true/> 270 </dict> 271 <key>Geometry</key> 272 <dict> 273 <key>Frame</key> 274 <string>{{0, 20}, {1035, 824}}</string> 275 <key>PBXModuleWindowStatusBarHidden2</key> 276 <false/> 277 <key>RubberWindowFrame</key> 278 <string>107 624 1035 865 0 0 2560 1578 </string> 279 </dict> 280 </dict> 281 </array> 201 282 <key>PerspectiveWidths</key> 202 283 <array> … … 232 313 <array> 233 314 <dict> 234 <key>BecomeActive</key>235 <true/>236 315 <key>ContentConfiguration</key> 237 316 <dict> … … 270 349 <array> 271 350 <string>08FB7794FE84155DC02AAC07</string> 351 <string>1AB674ADFE9D54B511CA2CBB</string> 272 352 <string>1C37FABC05509CD000000102</string> 273 353 </array> … … 299 379 </array> 300 380 <key>RubberWindowFrame</key> 301 <string> 495 496 690 397 0 0 1680 1028 </string>381 <string>935 922 690 397 0 0 2560 1578 </string> 302 382 </dict> 303 383 <key>Module</key> … … 336 416 <string>{{0, 0}, {482, 0}}</string> 337 417 <key>RubberWindowFrame</key> 338 <string> 495 496 690 397 0 0 1680 1028 </string>418 <string>935 922 690 397 0 0 2560 1578 </string> 339 419 </dict> 340 420 <key>Module</key> … … 344 424 </dict> 345 425 <dict> 426 <key>BecomeActive</key> 427 <true/> 346 428 <key>ContentConfiguration</key> 347 429 <dict> … … 356 438 <string>{{0, 5}, {482, 351}}</string> 357 439 <key>RubberWindowFrame</key> 358 <string> 495 496 690 397 0 0 1680 1028 </string>440 <string>935 922 690 397 0 0 2560 1578 </string> 359 441 </dict> 360 442 <key>Module</key> … … 380 462 <key>TableOfContents</key> 381 463 <array> 382 <string>79 3A85750D53DDA5004463D4</string>464 <string>7942A4AD0D7603A40097D2DE</string> 383 465 <string>1CE0B1FE06471DED0097A5F4</string> 384 <string>79 3A85760D53DDA5004463D4</string>466 <string>7942A4AE0D7603A40097D2DE</string> 385 467 <string>1CE0B20306471E060097A5F4</string> 386 468 <string>1CE0B20506471E060097A5F4</string> … … 516 598 <key>WindowOrderList</key> 517 599 <array> 600 <string>79AC5C650D3FEA19008AE93A</string> 601 <string>7942A4B30D7603A40097D2DE</string> 602 <string>7942A4AF0D7603A40097D2DE</string> 518 603 <string>/Users/wolf/code/trac/cocoa/mogenerator/mogenerator.xcodeproj</string> 519 604 </array> 520 605 <key>WindowString</key> 521 <string> 495 496 690 397 0 0 1680 1028 </string>606 <string>935 922 690 397 0 0 2560 1578 </string> 522 607 <key>WindowToolsV3</key> 523 608 <array> … … 549 634 <string>{{0, 0}, {500, 218}}</string> 550 635 <key>RubberWindowFrame</key> 551 <string> 516 370 500 500 0 0 1680 1028 </string>636 <string>901 745 500 500 0 0 2560 1578 </string> 552 637 </dict> 553 638 <key>Module</key> … … 573 658 <string>{{0, 223}, {500, 236}}</string> 574 659 <key>RubberWindowFrame</key> 575 <string> 516 370 500 500 0 0 1680 1028 </string>660 <string>901 745 500 500 0 0 2560 1578 </string> 576 661 </dict> 577 662 <key>Module</key> … … 596 681 <array> 597 682 <string>79AC5C650D3FEA19008AE93A</string> 598 <string>79 AC5C660D3FEA19008AE93A</string>683 <string>7942A4B90D7603A40097D2DE</string> 599 684 <string>1CD0528F0623707200166675</string> 600 685 <string>XCMainBuildResultsModuleGUID</string> … … 603 688 <string>xcode.toolbar.config.buildV3</string> 604 689 <key>WindowString</key> 605 <string> 516 370 500 500 0 0 1680 1028 </string>690 <string>901 745 500 500 0 0 2560 1578 </string> 606 691 <key>WindowToolGUID</key> 607 692 <string>79AC5C650D3FEA19008AE93A</string> trunk/cocoa/mogenerator/mogenerator.xcodeproj/wolf.pbxuser
r289 r294 74 74 ); 75 75 }; 76 PBXPerProjectTemplateStateSaveDate = 223599997; 77 PBXWorkspaceStateSaveDate = 223599997; 76 PBXPerProjectTemplateStateSaveDate = 225834547; 77 PBXWorkspaceStateSaveDate = 225834547; 78 }; 79 perUserProjectItems = { 80 7942A4B10D7603A40097D2DE /* PBXTextBookmark */ = 7942A4B10D7603A40097D2DE /* PBXTextBookmark */; 81 7942A4B20D7603A40097D2DE /* PBXTextBookmark */ = 7942A4B20D7603A40097D2DE /* PBXTextBookmark */; 82 7942A4B50D7603A40097D2DE /* PBXTextBookmark */ = 7942A4B50D7603A40097D2DE /* PBXTextBookmark */; 83 7942A4B70D7603A40097D2DE /* PBXTextBookmark */ = 7942A4B70D7603A40097D2DE /* PBXTextBookmark */; 78 84 }; 79 85 sourceControlManager = 79D2BF0B0ACFAE0700F3F141 /* Source Control */; … … 83 89 08FB7796FE84155DC02AAC07 /* mogenerator.m */ = { 84 90 uiCtxt = { 85 sepNavIntBoundsRect = "{{0, 0}, {1 274, 5670}}";86 sepNavSelRange = "{ 0, 0}";87 sepNavVisRange = "{ 0, 1657}";91 sepNavIntBoundsRect = "{{0, 0}, {1037, 6048}}"; 92 sepNavSelRange = "{3485, 0}"; 93 sepNavVisRange = "{2598, 1676}"; 88 94 sepNavVisRect = "{{0, 0}, {1057, 777}}"; 89 95 sepNavWindowFrame = "{{542, 178}, {1096, 835}}"; 96 }; 97 }; 98 7942A4B10D7603A40097D2DE /* PBXTextBookmark */ = { 99 isa = PBXTextBookmark; 100 fRef = 08FB7796FE84155DC02AAC07 /* mogenerator.m */; 101 name = "mogenerator.m: 78"; 102 rLen = 22; 103 rLoc = 2519; 104 rType = 0; 105 vrLen = 1391; 106 vrLoc = 2155; 107 }; 108 7942A4B20D7603A40097D2DE /* PBXTextBookmark */ = { 109 isa = PBXTextBookmark; 110 fRef = 08FB7796FE84155DC02AAC07 /* mogenerator.m */; 111 name = "mogenerator.m: 119"; 112 rLen = 0; 113 rLoc = 3485; 114 rType = 0; 115 vrLen = 1676; 116 vrLoc = 2598; 117 }; 118 7942A4B50D7603A40097D2DE /* PBXTextBookmark */ = { 119 isa = PBXTextBookmark; 120 fRef = 7942A4B60D7603A40097D2DE /* NSAttributeDescription.h */; 121 rLen = 0; 122 rLoc = 9223372036854775807; 123 rType = 0; 124 }; 125 7942A4B60D7603A40097D2DE /* NSAttributeDescription.h */ = { 126 isa = PBXFileReference; 127 lastKnownFileType = sourcecode.c.h; 128 name = NSAttributeDescription.h; 129 path = /System/Library/Frameworks/CoreData.framework/Versions/A/Headers/NSAttributeDescription.h; 130 sourceTree = "<absolute>"; 131 }; 132 7942A4B70D7603A40097D2DE /* PBXTextBookmark */ = { 133 isa = PBXTextBookmark; 134 fRef = 7942A4B80D7603A40097D2DE /* NSAttributeDescription.h */; 135 name = "NSAttributeDescription.h: 31"; 136 rLen = 28; 137 rLoc = 989; 138 rType = 0; 139 vrLen = 1912; 140 vrLoc = 0; 141 }; 142 7942A4B80D7603A40097D2DE /* NSAttributeDescription.h */ = { 143 isa = PBXFileReference; 144 name = NSAttributeDescription.h; 145 path = /System/Library/Frameworks/CoreData.framework/Versions/A/Headers/NSAttributeDescription.h; 146 sourceTree = "<absolute>"; 147 uiCtxt = { 148 sepNavIntBoundsRect = "{{0, 0}, {1334, 1176}}"; 149 sepNavSelRange = "{989, 28}"; 150 sepNavVisRange = "{0, 1912}"; 151 sepNavWindowFrame = "{{107, 592}, {1035, 897}}"; 90 152 }; 91 153 }; trunk/cocoa/mogenerator/templates/machine.h.motemplate
r282 r294 14 14 <$foreach Attribute noninheritedAttributes do$> 15 15 <$if Attribute.hasDefinedAttributeType$> 16 - (<$Attribute. attributeValueClassName$>*)<$Attribute.name$>;17 - (void)set<$Attribute.name.initialCapitalString$>:(<$Attribute. attributeValueClassName$>*)value_;16 - (<$Attribute.objectAttributeType$>*)<$Attribute.name$>; 17 - (void)set<$Attribute.name.initialCapitalString$>:(<$Attribute.objectAttributeType$>*)value_; 18 18 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 19 @property (retain) <$Attribute. attributeValueClassName$> *<$Attribute.name$>;19 @property (retain) <$Attribute.objectAttributeType$> *<$Attribute.name$>; 20 20 #endif 21 21 <$if Attribute.hasScalarAttributeType$> trunk/cocoa/mogenerator/templates/machine.m.motemplate
r282 r294 13 13 <$if Attribute.hasDefinedAttributeType$> 14 14 15 - (<$Attribute. attributeValueClassName$>*)<$Attribute.name$> {15 - (<$Attribute.objectAttributeType$>*)<$Attribute.name$> { 16 16 [self willAccessValueForKey:@"<$Attribute.name$>"]; 17 <$Attribute. attributeValueClassName$> *result = [self primitiveValueForKey:@"<$Attribute.name$>"];17 <$Attribute.objectAttributeType$> *result = [self primitiveValueForKey:@"<$Attribute.name$>"]; 18 18 [self didAccessValueForKey:@"<$Attribute.name$>"]; 19 19 return result; 20 20 } 21 21 22 - (void)set<$Attribute.name.initialCapitalString$>:(<$Attribute. attributeValueClassName$>*)value_ {22 - (void)set<$Attribute.name.initialCapitalString$>:(<$Attribute.objectAttributeType$>*)value_ { 23 23 [self willChangeValueForKey:@"<$Attribute.name$>"]; 24 24 [self setPrimitiveValue:value_ forKey:@"<$Attribute.name$>"];
