File tree 10 files changed +43
-21
lines changed
10 files changed +43
-21
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ - (MiscMergeCommandExitType)executeCommandBlock:(MiscMergeCommandBlock *)block
584
584
}
585
585
586
586
[commandStack removeLastObject ];
587
- [localPool release ];
587
+ [localPool drain ];
588
588
return exitCode;
589
589
}
590
590
Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ - (void)parseString:(NSString *)string
548
548
[self _addBetweenString: [[accumString copy ] autorelease ]];
549
549
}
550
550
551
- [localPool release ];
551
+ [localPool drain ];
552
552
}
553
553
554
554
@end
Original file line number Diff line number Diff line change 26
26
@interface NSCharacterSet (MiscAdditions)
27
27
28
28
+ (NSCharacterSet *)allWhitespaceCharacterSet ;
29
- + (NSCharacterSet *)newlineCharacterSet ;
30
29
31
30
@end
32
31
Original file line number Diff line number Diff line change @@ -38,16 +38,6 @@ + (NSCharacterSet *)allWhitespaceCharacterSet
38
38
return whiteSet;
39
39
}
40
40
41
- + (NSCharacterSet *)newlineCharacterSet
42
- {
43
- static NSCharacterSet *newlineSet = nil ;
44
-
45
- if (newlineSet == nil )
46
- newlineSet = [[NSCharacterSet characterSetWithCharactersInString: @" \n\r " ] retain ];
47
-
48
- return newlineSet;
49
- }
50
-
51
41
@end
52
42
53
43
Original file line number Diff line number Diff line change @@ -111,6 +111,6 @@ int DDCliAppRunWithClass(Class delegateClass)
111
111
// Initialize singleton/global
112
112
DDCliApplication * app = [DDCliApplication sharedApplication ];
113
113
int result = [app runWithClass: delegateClass];
114
- [pool release ];
114
+ [pool drain ];
115
115
return result;
116
116
}
Original file line number Diff line number Diff line change 33
33
- (NSString *)scalarAttributeType ;
34
34
- (BOOL )hasDefinedAttributeType ;
35
35
- (NSString *)objectAttributeType ;
36
+ - (BOOL )hasTransformableAttributeType ;
36
37
@end
37
38
38
39
@interface NSString (camelCaseString)
Original file line number Diff line number Diff line change @@ -242,16 +242,18 @@ - (BOOL)hasDefinedAttributeType {
242
242
return [self attributeType ] != NSUndefinedAttributeType;
243
243
}
244
244
- (NSString *)objectAttributeType {
245
- #if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
246
- #define NSTransformableAttributeType 1800
247
- #endif
248
- if ([self attributeType ] == NSTransformableAttributeType) {
245
+ if ([self hasTransformableAttributeType ]) {
249
246
NSString *result = [[self userInfo ] objectForKey: @" attributeValueClassName" ];
250
247
return result ? result : @" NSObject" ;
251
248
} else {
252
249
return [self attributeValueClassName ];
253
250
}
254
251
}
252
+
253
+ - (BOOL )hasTransformableAttributeType {
254
+ return ([self attributeType ] == NSTransformableAttributeType);
255
+ }
256
+
255
257
@end
256
258
257
259
@implementation NSString (camelCaseString)
Original file line number Diff line number Diff line change 460
460
GCC_WARN_ABOUT_RETURN_TYPE = YES;
461
461
GCC_WARN_UNUSED_VARIABLE = YES;
462
462
PREBINDING = NO;
463
- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk ;
463
+ SDKROOT = "" ;
464
464
};
465
465
name = Debug;
466
466
};
473
473
GCC_WARN_ABOUT_RETURN_TYPE = YES;
474
474
GCC_WARN_UNUSED_VARIABLE = YES;
475
475
PREBINDING = NO;
476
- SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk ;
476
+ SDKROOT = "" ;
477
477
};
478
478
name = Release;
479
479
};
Original file line number Diff line number Diff line change 6
6
7
7
<$foreach Relationship noninheritedRelationships do$>@class <$Relationship.destinationEntity.managedObjectClassName$>;
8
8
<$endforeach do$>
9
+ <$foreach Attribute noninheritedAttributes do$><$if Attribute.hasTransformableAttributeType$>@class <$Attribute.objectAttributeType$>;<$endif$>
10
+ <$endforeach do$>
9
11
@interface <$managedObjectClassName$>ID : NSManagedObjectID {}
10
12
@end
11
13
54
56
- (void)remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_;
55
57
<$endif$><$endforeach do$>
56
58
@end
59
+
60
+ @interface _<$managedObjectClassName$> (CoreDataGeneratedPrimitiveAccessors)
61
+ <$foreach Attribute noninheritedAttributes do$>
62
+ - (<$Attribute.objectAttributeType$>*)primitive<$Attribute.name.initialCapitalString$>;
63
+ - (void)setPrimitive<$Attribute.name.initialCapitalString$>:(<$Attribute.objectAttributeType$>*)value;
64
+ <$if Attribute.hasScalarAttributeType$>
65
+ - (<$Attribute.scalarAttributeType$>)primitive<$Attribute.name.initialCapitalString$>Value;
66
+ - (void)setPrimitive<$Attribute.name.initialCapitalString$>Value:(<$Attribute.scalarAttributeType$>)value_;
67
+ <$endif$>
68
+ <$endforeach do$>
69
+ <$foreach Relationship noninheritedRelationships do$>
70
+ <$if Relationship.isToMany$>
71
+ - (NSMutableSet*)primitive<$Relationship.name.initialCapitalString$>;
72
+ - (void)setPrimitive<$Relationship.name.initialCapitalString$>:(NSMutableSet*)value;
73
+ <$else$>
74
+ - (<$Relationship.destinationEntity.managedObjectClassName$>*)primitive<$Relationship.name.initialCapitalString$>;
75
+ - (void)setPrimitive<$Relationship.name.initialCapitalString$>:(<$Relationship.destinationEntity.managedObjectClassName$>*)value;
76
+ <$endif$>
77
+ <$endforeach do$>
78
+ @end
Original file line number Diff line number Diff line change 35
35
36
36
- (<$Attribute.scalarAttributeType$>)<$Attribute.name$>Value {
37
37
NSNumber *result = [self <$Attribute.name$>];
38
- return result ? [result <$Attribute.scalarAttributeType.camelCaseString$>Value] : 0 ;
38
+ return [result <$Attribute.scalarAttributeType.camelCaseString$>Value];
39
39
}
40
40
41
41
- (void)set<$Attribute.name.initialCapitalString$>Value:(<$Attribute.scalarAttributeType$>)value_ {
42
42
[self set<$Attribute.name.initialCapitalString$>:[NSNumber numberWith<$Attribute.scalarAttributeType.camelCaseString.initialCapitalString$>:value_]];
43
43
}
44
44
45
+ - (<$Attribute.scalarAttributeType$>)primitive<$Attribute.name.initialCapitalString$>Value {
46
+ NSNumber *result = [self primitive<$Attribute.name.initialCapitalString$>];
47
+ return [result <$Attribute.scalarAttributeType.camelCaseString$>Value];
48
+ }
49
+
50
+ - (void)setPrimitive<$Attribute.name.initialCapitalString$>Value:(<$Attribute.scalarAttributeType$>)value_ {
51
+ [self setPrimitive<$Attribute.name.initialCapitalString$>:[NSNumber numberWith<$Attribute.scalarAttributeType.camelCaseString.initialCapitalString$>:value_]];
52
+ }
45
53
<$endif$>
46
54
<$endif$>
47
55
<$endforeach do$>
You can’t perform that action at this time.
0 commit comments