From ddfc55efcef756e75afb229c0dd8530673a28078 Mon Sep 17 00:00:00 2001 From: rentzsch Date: Thu, 8 Oct 2009 15:16:12 -0500 Subject: [PATCH] [DEV] Bump mogeneratorTestMule to be compatible with 10.6 Snow Leopard (GCC_VERSION = 4.0) and mogenerator 1.14 (switch to +insertInManagedObjectContext:). --- mogeneratorTestMule/MOs/_ChildMO.h | 2 +- mogeneratorTestMule/MOs/_ChildMO.m | 2 +- mogeneratorTestMule/MOs/_HumanMO.h | 18 +- mogeneratorTestMule/MOs/_HumanMO.m | 34 +- mogeneratorTestMule/MOs/_ParentMO.h | 140 ++++---- mogeneratorTestMule/MOs/_ParentMO.m | 300 +++++++++--------- mogeneratorTestMule/MOs/include.m | 8 +- .../mogeneratorTestMule_AppDelegate.m | 2 +- 8 files changed, 253 insertions(+), 253 deletions(-) diff --git a/mogeneratorTestMule/MOs/_ChildMO.h b/mogeneratorTestMule/MOs/_ChildMO.h index e086ae99..2087f6d7 100644 --- a/mogeneratorTestMule/MOs/_ChildMO.h +++ b/mogeneratorTestMule/MOs/_ChildMO.h @@ -10,7 +10,7 @@ @end @interface _ChildMO : HumanMO {} -+ (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_; ++ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_; - (ChildMOID*)objectID; diff --git a/mogeneratorTestMule/MOs/_ChildMO.m b/mogeneratorTestMule/MOs/_ChildMO.m index d3dfa032..a07cbbc4 100644 --- a/mogeneratorTestMule/MOs/_ChildMO.m +++ b/mogeneratorTestMule/MOs/_ChildMO.m @@ -8,7 +8,7 @@ @implementation ChildMOID @implementation _ChildMO -+ (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_ { ++ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ { return [NSEntityDescription insertNewObjectForEntityForName:@"Child" inManagedObjectContext:moc_]; } diff --git a/mogeneratorTestMule/MOs/_HumanMO.h b/mogeneratorTestMule/MOs/_HumanMO.h index 6d6b4247..1042baed 100644 --- a/mogeneratorTestMule/MOs/_HumanMO.h +++ b/mogeneratorTestMule/MOs/_HumanMO.h @@ -10,11 +10,19 @@ @end @interface _HumanMO : MyBaseClass {} -+ (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_; ++ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_; - (HumanMOID*)objectID; +- (NSData*)hairColorStorage; +- (void)setHairColorStorage:(NSData*)value_; +#if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +@property (retain) NSData *hairColorStorage; +#endif + +//- (BOOL)validateHairColorStorage:(id*)value_ error:(NSError**)error_; + - (NSString*)humanName; @@ -27,14 +35,6 @@ -- (NSData*)hairColorStorage; -- (void)setHairColorStorage:(NSData*)value_; -#if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSData *hairColorStorage; -#endif - -//- (BOOL)validateHairColorStorage:(id*)value_ error:(NSError**)error_; - diff --git a/mogeneratorTestMule/MOs/_HumanMO.m b/mogeneratorTestMule/MOs/_HumanMO.m index d0f0d4cb..7126346f 100644 --- a/mogeneratorTestMule/MOs/_HumanMO.m +++ b/mogeneratorTestMule/MOs/_HumanMO.m @@ -8,7 +8,7 @@ @implementation HumanMOID @implementation _HumanMO -+ (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_ { ++ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ { return [NSEntityDescription insertNewObjectForEntityForName:@"Human" inManagedObjectContext:moc_]; } @@ -19,6 +19,22 @@ - (HumanMOID*)objectID { +- (NSData*)hairColorStorage { + [self willAccessValueForKey:@"hairColorStorage"]; + NSData *result = [self primitiveValueForKey:@"hairColorStorage"]; + [self didAccessValueForKey:@"hairColorStorage"]; + return result; +} + +- (void)setHairColorStorage:(NSData*)value_ { + [self willChangeValueForKey:@"hairColorStorage"]; + [self setPrimitiveValue:value_ forKey:@"hairColorStorage"]; + [self didChangeValueForKey:@"hairColorStorage"]; +} + + + + - (NSString*)humanName { @@ -39,22 +55,6 @@ - (void)setHumanName:(NSString*)value_ { -- (NSData*)hairColorStorage { - [self willAccessValueForKey:@"hairColorStorage"]; - NSData *result = [self primitiveValueForKey:@"hairColorStorage"]; - [self didAccessValueForKey:@"hairColorStorage"]; - return result; -} - -- (void)setHairColorStorage:(NSData*)value_ { - [self willChangeValueForKey:@"hairColorStorage"]; - [self setPrimitiveValue:value_ forKey:@"hairColorStorage"]; - [self didChangeValueForKey:@"hairColorStorage"]; -} - - - - diff --git a/mogeneratorTestMule/MOs/_ParentMO.h b/mogeneratorTestMule/MOs/_ParentMO.h index d484bde7..ea7abf56 100644 --- a/mogeneratorTestMule/MOs/_ParentMO.h +++ b/mogeneratorTestMule/MOs/_ParentMO.h @@ -10,51 +10,51 @@ @end @interface _ParentMO : HumanMO {} -+ (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_; ++ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_; - (ParentMOID*)objectID; -- (NSNumber*)myDouble; -- (void)setMyDouble:(NSNumber*)value_; +- (NSNumber*)myInt16Transient; +- (void)setMyInt16Transient:(NSNumber*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSNumber *myDouble; +@property (retain) NSNumber *myInt16Transient; #endif -- (double)myDoubleValue; -- (void)setMyDoubleValue:(double)value_; +- (short)myInt16TransientValue; +- (void)setMyInt16TransientValue:(short)value_; -//- (BOOL)validateMyDouble:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyInt16Transient:(id*)value_ error:(NSError**)error_; -- (NSString*)myString; -- (void)setMyString:(NSString*)value_; +- (NSString*)parentName; +- (void)setParentName:(NSString*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSString *myString; +@property (retain) NSString *parentName; #endif -//- (BOOL)validateMyString:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateParentName:(id*)value_ error:(NSError**)error_; -- (NSDecimalNumber*)myDecimal; -- (void)setMyDecimal:(NSDecimalNumber*)value_; +- (NSObject*)myTransformableSansClassName; +- (void)setMyTransformableSansClassName:(NSObject*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSDecimalNumber *myDecimal; +@property (retain) NSObject *myTransformableSansClassName; #endif -//- (BOOL)validateMyDecimal:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyTransformableSansClassName:(id*)value_ error:(NSError**)error_; -- (NSString*)parentName; -- (void)setParentName:(NSString*)value_; +- (NSDecimalNumber*)myDecimal; +- (void)setMyDecimal:(NSDecimalNumber*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSString *parentName; +@property (retain) NSDecimalNumber *myDecimal; #endif -//- (BOOL)validateParentName:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyDecimal:(id*)value_ error:(NSError**)error_; @@ -68,111 +68,111 @@ -- (NSNumber*)myFloat; -- (void)setMyFloat:(NSNumber*)value_; +- (NSColor*)myTransformableWithClassName; +- (void)setMyTransformableWithClassName:(NSColor*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSNumber *myFloat; +@property (retain) NSColor *myTransformableWithClassName; #endif -- (float)myFloatValue; -- (void)setMyFloatValue:(float)value_; - -//- (BOOL)validateMyFloat:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyTransformableWithClassName:(id*)value_ error:(NSError**)error_; -- (NSNumber*)myInt32; -- (void)setMyInt32:(NSNumber*)value_; +- (NSNumber*)myBoolean; +- (void)setMyBoolean:(NSNumber*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSNumber *myInt32; +@property (retain) NSNumber *myBoolean; #endif -- (int)myInt32Value; -- (void)setMyInt32Value:(int)value_; +- (BOOL)myBooleanValue; +- (void)setMyBooleanValue:(BOOL)value_; -//- (BOOL)validateMyInt32:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyBoolean:(id*)value_ error:(NSError**)error_; -- (NSColor*)myTransformableWithClassName; -- (void)setMyTransformableWithClassName:(NSColor*)value_; +- (NSNumber*)myInt64; +- (void)setMyInt64:(NSNumber*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSColor *myTransformableWithClassName; +@property (retain) NSNumber *myInt64; #endif -//- (BOOL)validateMyTransformableWithClassName:(id*)value_ error:(NSError**)error_; +- (long long)myInt64Value; +- (void)setMyInt64Value:(long long)value_; + +//- (BOOL)validateMyInt64:(id*)value_ error:(NSError**)error_; -- (NSData*)myBinaryData; -- (void)setMyBinaryData:(NSData*)value_; +- (NSNumber*)myDouble; +- (void)setMyDouble:(NSNumber*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSData *myBinaryData; +@property (retain) NSNumber *myDouble; #endif -//- (BOOL)validateMyBinaryData:(id*)value_ error:(NSError**)error_; +- (double)myDoubleValue; +- (void)setMyDoubleValue:(double)value_; +//- (BOOL)validateMyDouble:(id*)value_ error:(NSError**)error_; -- (NSNumber*)myInt16Transient; -- (void)setMyInt16Transient:(NSNumber*)value_; + +- (NSNumber*)myInt16; +- (void)setMyInt16:(NSNumber*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSNumber *myInt16Transient; +@property (retain) NSNumber *myInt16; #endif -- (short)myInt16TransientValue; -- (void)setMyInt16TransientValue:(short)value_; +- (short)myInt16Value; +- (void)setMyInt16Value:(short)value_; -//- (BOOL)validateMyInt16Transient:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyInt16:(id*)value_ error:(NSError**)error_; -- (NSNumber*)myBoolean; -- (void)setMyBoolean:(NSNumber*)value_; +- (NSNumber*)myFloat; +- (void)setMyFloat:(NSNumber*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSNumber *myBoolean; +@property (retain) NSNumber *myFloat; #endif -- (BOOL)myBooleanValue; -- (void)setMyBooleanValue:(BOOL)value_; +- (float)myFloatValue; +- (void)setMyFloatValue:(float)value_; -//- (BOOL)validateMyBoolean:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyFloat:(id*)value_ error:(NSError**)error_; -- (NSNumber*)myInt64; -- (void)setMyInt64:(NSNumber*)value_; +- (NSData*)myBinaryData; +- (void)setMyBinaryData:(NSData*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSNumber *myInt64; +@property (retain) NSData *myBinaryData; #endif -- (long long)myInt64Value; -- (void)setMyInt64Value:(long long)value_; - -//- (BOOL)validateMyInt64:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyBinaryData:(id*)value_ error:(NSError**)error_; -- (NSNumber*)myInt16; -- (void)setMyInt16:(NSNumber*)value_; +- (NSString*)myString; +- (void)setMyString:(NSString*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSNumber *myInt16; +@property (retain) NSString *myString; #endif -- (short)myInt16Value; -- (void)setMyInt16Value:(short)value_; - -//- (BOOL)validateMyInt16:(id*)value_ error:(NSError**)error_; +//- (BOOL)validateMyString:(id*)value_ error:(NSError**)error_; -- (NSObject*)myTransformableSansClassName; -- (void)setMyTransformableSansClassName:(NSObject*)value_; +- (NSNumber*)myInt32; +- (void)setMyInt32:(NSNumber*)value_; #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -@property (retain) NSObject *myTransformableSansClassName; +@property (retain) NSNumber *myInt32; #endif -//- (BOOL)validateMyTransformableSansClassName:(id*)value_ error:(NSError**)error_; +- (int)myInt32Value; +- (void)setMyInt32Value:(int)value_; + +//- (BOOL)validateMyInt32:(id*)value_ error:(NSError**)error_; diff --git a/mogeneratorTestMule/MOs/_ParentMO.m b/mogeneratorTestMule/MOs/_ParentMO.m index 9335d637..1833bc98 100644 --- a/mogeneratorTestMule/MOs/_ParentMO.m +++ b/mogeneratorTestMule/MOs/_ParentMO.m @@ -8,7 +8,7 @@ @implementation ParentMOID @implementation _ParentMO -+ (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_ { ++ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ { return [NSEntityDescription insertNewObjectForEntityForName:@"Parent" inManagedObjectContext:moc_]; } @@ -19,28 +19,28 @@ - (ParentMOID*)objectID { -- (NSNumber*)myDouble { - [self willAccessValueForKey:@"myDouble"]; - NSNumber *result = [self primitiveValueForKey:@"myDouble"]; - [self didAccessValueForKey:@"myDouble"]; +- (NSNumber*)myInt16Transient { + [self willAccessValueForKey:@"myInt16Transient"]; + NSNumber *result = [self primitiveValueForKey:@"myInt16Transient"]; + [self didAccessValueForKey:@"myInt16Transient"]; return result; } -- (void)setMyDouble:(NSNumber*)value_ { - [self willChangeValueForKey:@"myDouble"]; - [self setPrimitiveValue:value_ forKey:@"myDouble"]; - [self didChangeValueForKey:@"myDouble"]; +- (void)setMyInt16Transient:(NSNumber*)value_ { + [self willChangeValueForKey:@"myInt16Transient"]; + [self setPrimitiveValue:value_ forKey:@"myInt16Transient"]; + [self didChangeValueForKey:@"myInt16Transient"]; } -- (double)myDoubleValue { - NSNumber *result = [self myDouble]; - return result ? [result doubleValue] : 0; +- (short)myInt16TransientValue { + NSNumber *result = [self myInt16Transient]; + return result ? [result shortValue] : 0; } -- (void)setMyDoubleValue:(double)value_ { - [self setMyDouble:[NSNumber numberWithDouble:value_]]; +- (void)setMyInt16TransientValue:(short)value_ { + [self setMyInt16Transient:[NSNumber numberWithShort:value_]]; } @@ -48,17 +48,17 @@ - (void)setMyDoubleValue:(double)value_ { -- (NSString*)myString { - [self willAccessValueForKey:@"myString"]; - NSString *result = [self primitiveValueForKey:@"myString"]; - [self didAccessValueForKey:@"myString"]; +- (NSString*)parentName { + [self willAccessValueForKey:@"parentName"]; + NSString *result = [self primitiveValueForKey:@"parentName"]; + [self didAccessValueForKey:@"parentName"]; return result; } -- (void)setMyString:(NSString*)value_ { - [self willChangeValueForKey:@"myString"]; - [self setPrimitiveValue:value_ forKey:@"myString"]; - [self didChangeValueForKey:@"myString"]; +- (void)setParentName:(NSString*)value_ { + [self willChangeValueForKey:@"parentName"]; + [self setPrimitiveValue:value_ forKey:@"parentName"]; + [self didChangeValueForKey:@"parentName"]; } @@ -66,17 +66,17 @@ - (void)setMyString:(NSString*)value_ { -- (NSDecimalNumber*)myDecimal { - [self willAccessValueForKey:@"myDecimal"]; - NSDecimalNumber *result = [self primitiveValueForKey:@"myDecimal"]; - [self didAccessValueForKey:@"myDecimal"]; +- (NSObject*)myTransformableSansClassName { + [self willAccessValueForKey:@"myTransformableSansClassName"]; + NSObject *result = [self primitiveValueForKey:@"myTransformableSansClassName"]; + [self didAccessValueForKey:@"myTransformableSansClassName"]; return result; } -- (void)setMyDecimal:(NSDecimalNumber*)value_ { - [self willChangeValueForKey:@"myDecimal"]; - [self setPrimitiveValue:value_ forKey:@"myDecimal"]; - [self didChangeValueForKey:@"myDecimal"]; +- (void)setMyTransformableSansClassName:(NSObject*)value_ { + [self willChangeValueForKey:@"myTransformableSansClassName"]; + [self setPrimitiveValue:value_ forKey:@"myTransformableSansClassName"]; + [self didChangeValueForKey:@"myTransformableSansClassName"]; } @@ -84,17 +84,17 @@ - (void)setMyDecimal:(NSDecimalNumber*)value_ { -- (NSString*)parentName { - [self willAccessValueForKey:@"parentName"]; - NSString *result = [self primitiveValueForKey:@"parentName"]; - [self didAccessValueForKey:@"parentName"]; +- (NSDecimalNumber*)myDecimal { + [self willAccessValueForKey:@"myDecimal"]; + NSDecimalNumber *result = [self primitiveValueForKey:@"myDecimal"]; + [self didAccessValueForKey:@"myDecimal"]; return result; } -- (void)setParentName:(NSString*)value_ { - [self willChangeValueForKey:@"parentName"]; - [self setPrimitiveValue:value_ forKey:@"parentName"]; - [self didChangeValueForKey:@"parentName"]; +- (void)setMyDecimal:(NSDecimalNumber*)value_ { + [self willChangeValueForKey:@"myDecimal"]; + [self setPrimitiveValue:value_ forKey:@"myDecimal"]; + [self didChangeValueForKey:@"myDecimal"]; } @@ -120,28 +120,17 @@ - (void)setMyDate:(NSDate*)value_ { -- (NSNumber*)myFloat { - [self willAccessValueForKey:@"myFloat"]; - NSNumber *result = [self primitiveValueForKey:@"myFloat"]; - [self didAccessValueForKey:@"myFloat"]; +- (NSColor*)myTransformableWithClassName { + [self willAccessValueForKey:@"myTransformableWithClassName"]; + NSColor *result = [self primitiveValueForKey:@"myTransformableWithClassName"]; + [self didAccessValueForKey:@"myTransformableWithClassName"]; return result; } -- (void)setMyFloat:(NSNumber*)value_ { - [self willChangeValueForKey:@"myFloat"]; - [self setPrimitiveValue:value_ forKey:@"myFloat"]; - [self didChangeValueForKey:@"myFloat"]; -} - - - -- (float)myFloatValue { - NSNumber *result = [self myFloat]; - return result ? [result floatValue] : 0; -} - -- (void)setMyFloatValue:(float)value_ { - [self setMyFloat:[NSNumber numberWithFloat:value_]]; +- (void)setMyTransformableWithClassName:(NSColor*)value_ { + [self willChangeValueForKey:@"myTransformableWithClassName"]; + [self setPrimitiveValue:value_ forKey:@"myTransformableWithClassName"]; + [self didChangeValueForKey:@"myTransformableWithClassName"]; } @@ -149,28 +138,28 @@ - (void)setMyFloatValue:(float)value_ { -- (NSNumber*)myInt32 { - [self willAccessValueForKey:@"myInt32"]; - NSNumber *result = [self primitiveValueForKey:@"myInt32"]; - [self didAccessValueForKey:@"myInt32"]; +- (NSNumber*)myBoolean { + [self willAccessValueForKey:@"myBoolean"]; + NSNumber *result = [self primitiveValueForKey:@"myBoolean"]; + [self didAccessValueForKey:@"myBoolean"]; return result; } -- (void)setMyInt32:(NSNumber*)value_ { - [self willChangeValueForKey:@"myInt32"]; - [self setPrimitiveValue:value_ forKey:@"myInt32"]; - [self didChangeValueForKey:@"myInt32"]; +- (void)setMyBoolean:(NSNumber*)value_ { + [self willChangeValueForKey:@"myBoolean"]; + [self setPrimitiveValue:value_ forKey:@"myBoolean"]; + [self didChangeValueForKey:@"myBoolean"]; } -- (int)myInt32Value { - NSNumber *result = [self myInt32]; - return result ? [result intValue] : 0; +- (BOOL)myBooleanValue { + NSNumber *result = [self myBoolean]; + return result ? [result boolValue] : 0; } -- (void)setMyInt32Value:(int)value_ { - [self setMyInt32:[NSNumber numberWithInt:value_]]; +- (void)setMyBooleanValue:(BOOL)value_ { + [self setMyBoolean:[NSNumber numberWithBool:value_]]; } @@ -178,35 +167,28 @@ - (void)setMyInt32Value:(int)value_ { -- (NSColor*)myTransformableWithClassName { - [self willAccessValueForKey:@"myTransformableWithClassName"]; - NSColor *result = [self primitiveValueForKey:@"myTransformableWithClassName"]; - [self didAccessValueForKey:@"myTransformableWithClassName"]; +- (NSNumber*)myInt64 { + [self willAccessValueForKey:@"myInt64"]; + NSNumber *result = [self primitiveValueForKey:@"myInt64"]; + [self didAccessValueForKey:@"myInt64"]; return result; } -- (void)setMyTransformableWithClassName:(NSColor*)value_ { - [self willChangeValueForKey:@"myTransformableWithClassName"]; - [self setPrimitiveValue:value_ forKey:@"myTransformableWithClassName"]; - [self didChangeValueForKey:@"myTransformableWithClassName"]; +- (void)setMyInt64:(NSNumber*)value_ { + [self willChangeValueForKey:@"myInt64"]; + [self setPrimitiveValue:value_ forKey:@"myInt64"]; + [self didChangeValueForKey:@"myInt64"]; } - - - -- (NSData*)myBinaryData { - [self willAccessValueForKey:@"myBinaryData"]; - NSData *result = [self primitiveValueForKey:@"myBinaryData"]; - [self didAccessValueForKey:@"myBinaryData"]; - return result; +- (long long)myInt64Value { + NSNumber *result = [self myInt64]; + return result ? [result longLongValue] : 0; } -- (void)setMyBinaryData:(NSData*)value_ { - [self willChangeValueForKey:@"myBinaryData"]; - [self setPrimitiveValue:value_ forKey:@"myBinaryData"]; - [self didChangeValueForKey:@"myBinaryData"]; +- (void)setMyInt64Value:(long long)value_ { + [self setMyInt64:[NSNumber numberWithLongLong:value_]]; } @@ -214,28 +196,28 @@ - (void)setMyBinaryData:(NSData*)value_ { -- (NSNumber*)myInt16Transient { - [self willAccessValueForKey:@"myInt16Transient"]; - NSNumber *result = [self primitiveValueForKey:@"myInt16Transient"]; - [self didAccessValueForKey:@"myInt16Transient"]; +- (NSNumber*)myDouble { + [self willAccessValueForKey:@"myDouble"]; + NSNumber *result = [self primitiveValueForKey:@"myDouble"]; + [self didAccessValueForKey:@"myDouble"]; return result; } -- (void)setMyInt16Transient:(NSNumber*)value_ { - [self willChangeValueForKey:@"myInt16Transient"]; - [self setPrimitiveValue:value_ forKey:@"myInt16Transient"]; - [self didChangeValueForKey:@"myInt16Transient"]; +- (void)setMyDouble:(NSNumber*)value_ { + [self willChangeValueForKey:@"myDouble"]; + [self setPrimitiveValue:value_ forKey:@"myDouble"]; + [self didChangeValueForKey:@"myDouble"]; } -- (short)myInt16TransientValue { - NSNumber *result = [self myInt16Transient]; - return result ? [result shortValue] : 0; +- (double)myDoubleValue { + NSNumber *result = [self myDouble]; + return result ? [result doubleValue] : 0; } -- (void)setMyInt16TransientValue:(short)value_ { - [self setMyInt16Transient:[NSNumber numberWithShort:value_]]; +- (void)setMyDoubleValue:(double)value_ { + [self setMyDouble:[NSNumber numberWithDouble:value_]]; } @@ -243,28 +225,28 @@ - (void)setMyInt16TransientValue:(short)value_ { -- (NSNumber*)myBoolean { - [self willAccessValueForKey:@"myBoolean"]; - NSNumber *result = [self primitiveValueForKey:@"myBoolean"]; - [self didAccessValueForKey:@"myBoolean"]; +- (NSNumber*)myInt16 { + [self willAccessValueForKey:@"myInt16"]; + NSNumber *result = [self primitiveValueForKey:@"myInt16"]; + [self didAccessValueForKey:@"myInt16"]; return result; } -- (void)setMyBoolean:(NSNumber*)value_ { - [self willChangeValueForKey:@"myBoolean"]; - [self setPrimitiveValue:value_ forKey:@"myBoolean"]; - [self didChangeValueForKey:@"myBoolean"]; +- (void)setMyInt16:(NSNumber*)value_ { + [self willChangeValueForKey:@"myInt16"]; + [self setPrimitiveValue:value_ forKey:@"myInt16"]; + [self didChangeValueForKey:@"myInt16"]; } -- (BOOL)myBooleanValue { - NSNumber *result = [self myBoolean]; - return result ? [result boolValue] : 0; +- (short)myInt16Value { + NSNumber *result = [self myInt16]; + return result ? [result shortValue] : 0; } -- (void)setMyBooleanValue:(BOOL)value_ { - [self setMyBoolean:[NSNumber numberWithBool:value_]]; +- (void)setMyInt16Value:(short)value_ { + [self setMyInt16:[NSNumber numberWithShort:value_]]; } @@ -272,28 +254,28 @@ - (void)setMyBooleanValue:(BOOL)value_ { -- (NSNumber*)myInt64 { - [self willAccessValueForKey:@"myInt64"]; - NSNumber *result = [self primitiveValueForKey:@"myInt64"]; - [self didAccessValueForKey:@"myInt64"]; +- (NSNumber*)myFloat { + [self willAccessValueForKey:@"myFloat"]; + NSNumber *result = [self primitiveValueForKey:@"myFloat"]; + [self didAccessValueForKey:@"myFloat"]; return result; } -- (void)setMyInt64:(NSNumber*)value_ { - [self willChangeValueForKey:@"myInt64"]; - [self setPrimitiveValue:value_ forKey:@"myInt64"]; - [self didChangeValueForKey:@"myInt64"]; +- (void)setMyFloat:(NSNumber*)value_ { + [self willChangeValueForKey:@"myFloat"]; + [self setPrimitiveValue:value_ forKey:@"myFloat"]; + [self didChangeValueForKey:@"myFloat"]; } -- (long long)myInt64Value { - NSNumber *result = [self myInt64]; - return result ? [result longLongValue] : 0; +- (float)myFloatValue { + NSNumber *result = [self myFloat]; + return result ? [result floatValue] : 0; } -- (void)setMyInt64Value:(long long)value_ { - [self setMyInt64:[NSNumber numberWithLongLong:value_]]; +- (void)setMyFloatValue:(float)value_ { + [self setMyFloat:[NSNumber numberWithFloat:value_]]; } @@ -301,28 +283,35 @@ - (void)setMyInt64Value:(long long)value_ { -- (NSNumber*)myInt16 { - [self willAccessValueForKey:@"myInt16"]; - NSNumber *result = [self primitiveValueForKey:@"myInt16"]; - [self didAccessValueForKey:@"myInt16"]; +- (NSData*)myBinaryData { + [self willAccessValueForKey:@"myBinaryData"]; + NSData *result = [self primitiveValueForKey:@"myBinaryData"]; + [self didAccessValueForKey:@"myBinaryData"]; return result; } -- (void)setMyInt16:(NSNumber*)value_ { - [self willChangeValueForKey:@"myInt16"]; - [self setPrimitiveValue:value_ forKey:@"myInt16"]; - [self didChangeValueForKey:@"myInt16"]; +- (void)setMyBinaryData:(NSData*)value_ { + [self willChangeValueForKey:@"myBinaryData"]; + [self setPrimitiveValue:value_ forKey:@"myBinaryData"]; + [self didChangeValueForKey:@"myBinaryData"]; } -- (short)myInt16Value { - NSNumber *result = [self myInt16]; - return result ? [result shortValue] : 0; + + + +- (NSString*)myString { + [self willAccessValueForKey:@"myString"]; + NSString *result = [self primitiveValueForKey:@"myString"]; + [self didAccessValueForKey:@"myString"]; + return result; } -- (void)setMyInt16Value:(short)value_ { - [self setMyInt16:[NSNumber numberWithShort:value_]]; +- (void)setMyString:(NSString*)value_ { + [self willChangeValueForKey:@"myString"]; + [self setPrimitiveValue:value_ forKey:@"myString"]; + [self didChangeValueForKey:@"myString"]; } @@ -330,17 +319,28 @@ - (void)setMyInt16Value:(short)value_ { -- (NSObject*)myTransformableSansClassName { - [self willAccessValueForKey:@"myTransformableSansClassName"]; - NSObject *result = [self primitiveValueForKey:@"myTransformableSansClassName"]; - [self didAccessValueForKey:@"myTransformableSansClassName"]; +- (NSNumber*)myInt32 { + [self willAccessValueForKey:@"myInt32"]; + NSNumber *result = [self primitiveValueForKey:@"myInt32"]; + [self didAccessValueForKey:@"myInt32"]; return result; } -- (void)setMyTransformableSansClassName:(NSObject*)value_ { - [self willChangeValueForKey:@"myTransformableSansClassName"]; - [self setPrimitiveValue:value_ forKey:@"myTransformableSansClassName"]; - [self didChangeValueForKey:@"myTransformableSansClassName"]; +- (void)setMyInt32:(NSNumber*)value_ { + [self willChangeValueForKey:@"myInt32"]; + [self setPrimitiveValue:value_ forKey:@"myInt32"]; + [self didChangeValueForKey:@"myInt32"]; +} + + + +- (int)myInt32Value { + NSNumber *result = [self myInt32]; + return result ? [result intValue] : 0; +} + +- (void)setMyInt32Value:(int)value_ { + [self setMyInt32:[NSNumber numberWithInt:value_]]; } diff --git a/mogeneratorTestMule/MOs/include.m b/mogeneratorTestMule/MOs/include.m index 0f91b3cd..3372d200 100644 --- a/mogeneratorTestMule/MOs/include.m +++ b/mogeneratorTestMule/MOs/include.m @@ -1,6 +1,6 @@ -#include "ChildMO.m" -#include "_ChildMO.m" -#include "HumanMO.m" -#include "_HumanMO.m" #include "ParentMO.m" #include "_ParentMO.m" +#include "HumanMO.m" +#include "_HumanMO.m" +#include "ChildMO.m" +#include "_ChildMO.m" diff --git a/mogeneratorTestMule/mogeneratorTestMule_AppDelegate.m b/mogeneratorTestMule/mogeneratorTestMule_AppDelegate.m index ccd4caeb..19cf475a 100644 --- a/mogeneratorTestMule/mogeneratorTestMule_AppDelegate.m +++ b/mogeneratorTestMule/mogeneratorTestMule_AppDelegate.m @@ -4,7 +4,7 @@ @implementation mogeneratorTestMule_AppDelegate - (void)applicationDidFinishLaunching:(NSNotification*)notification_ { - ParentMO *parent = [ParentMO newInManagedObjectContext:[self managedObjectContext]]; + ParentMO *parent = [ParentMO insertInManagedObjectContext:[self managedObjectContext]]; [parent setIvar:42.0]; [parent setHairColor:[NSColor brownColor]]; NSLog(@"success");