Changeset 313
- Timestamp:
- 07/07/08 07:26:45 (6 months ago)
- Files:
-
- trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ChildMO.h (modified) (2 diffs)
- trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ChildMO.m (modified) (2 diffs)
- trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_HumanMO.h (modified) (4 diffs)
- trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_HumanMO.m (modified) (3 diffs)
- trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ParentMO.h (modified) (6 diffs)
- trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ParentMO.m (modified) (12 diffs)
- trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/include.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ChildMO.h
r166 r313 5 5 #import "HumanMO.h" 6 6 7 8 7 @class ParentMO; 9 8 9 @interface ChildMOID : NSManagedObjectID {} 10 @end 10 11 11 12 @interface _ChildMO : HumanMO {} 13 + (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_; 14 - (ChildMOID*)objectID; 15 12 16 13 17 14 18 - (NSString*)childName; 15 19 - (void)setChildName:(NSString*)value_; 20 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 21 @property (retain) NSString *childName; 22 #endif 16 23 17 24 //- (BOOL)validateChildName:(id*)value_ error:(NSError**)error_; … … 23 30 - (void)setParent:(ParentMO*)value_; 24 31 //- (BOOL)validateParent:(id*)value_ error:(NSError**)error_; 32 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 33 @property (retain) ParentMO* parent; 34 #endif 25 35 26 36 trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ChildMO.m
r166 r313 4 4 #import "_ChildMO.h" 5 5 6 @implementation ChildMOID 7 @end 8 6 9 @implementation _ChildMO 10 11 + (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_ { 12 return [NSEntityDescription insertNewObjectForEntityForName:@"Child" inManagedObjectContext:moc_]; 13 } 14 15 - (ChildMOID*)objectID { 16 return (ChildMOID*)[super objectID]; 17 } 18 7 19 8 20 … … 16 28 17 29 - (void)setChildName:(NSString*)value_ { 18 [self willChangeValueForKey:@"childName"];19 [self setPrimitiveValue:value_ forKey:@"childName"];20 [self didChangeValueForKey:@"childName"];30 [self willChangeValueForKey:@"childName"]; 31 [self setPrimitiveValue:value_ forKey:@"childName"]; 32 [self didChangeValueForKey:@"childName"]; 21 33 } 22 34 trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_HumanMO.h
r167 r313 5 5 #import "MyBaseClass.h" 6 6 7 8 7 @class NSManagedObject; 9 8 9 @interface HumanMOID : NSManagedObjectID {} 10 @end 10 11 11 12 @interface _HumanMO : MyBaseClass {} 13 + (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_; 14 - (HumanMOID*)objectID; 15 12 16 13 17 … … 16 20 - (NSString*)humanName; 17 21 - (void)setHumanName:(NSString*)value_; 22 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 23 @property (retain) NSString *humanName; 24 #endif 18 25 19 26 //- (BOOL)validateHumanName:(id*)value_ error:(NSError**)error_; … … 23 30 - (NSData*)hairColorStorage; 24 31 - (void)setHairColorStorage:(NSData*)value_; 32 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 33 @property (retain) NSData *hairColorStorage; 34 #endif 25 35 26 36 //- (BOOL)validateHairColorStorage:(id*)value_ error:(NSError**)error_; … … 32 42 - (void)setMeaninglessRelationship:(NSManagedObject*)value_; 33 43 //- (BOOL)validateMeaninglessRelationship:(id*)value_ error:(NSError**)error_; 44 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 45 @property (retain) NSManagedObject* meaninglessRelationship; 46 #endif 34 47 35 48 trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_HumanMO.m
r167 r313 4 4 #import "_HumanMO.h" 5 5 6 @implementation HumanMOID 7 @end 8 6 9 @implementation _HumanMO 10 11 + (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_ { 12 return [NSEntityDescription insertNewObjectForEntityForName:@"Human" inManagedObjectContext:moc_]; 13 } 14 15 - (HumanMOID*)objectID { 16 return (HumanMOID*)[super objectID]; 17 } 18 7 19 8 20 … … 18 30 19 31 - (void)setHumanName:(NSString*)value_ { 20 [self willChangeValueForKey:@"humanName"];21 [self setPrimitiveValue:value_ forKey:@"humanName"];22 [self didChangeValueForKey:@"humanName"];32 [self willChangeValueForKey:@"humanName"]; 33 [self setPrimitiveValue:value_ forKey:@"humanName"]; 34 [self didChangeValueForKey:@"humanName"]; 23 35 } 24 36 … … 36 48 37 49 - (void)setHairColorStorage:(NSData*)value_ { 38 [self willChangeValueForKey:@"hairColorStorage"];39 [self setPrimitiveValue:value_ forKey:@"hairColorStorage"];40 [self didChangeValueForKey:@"hairColorStorage"];50 [self willChangeValueForKey:@"hairColorStorage"]; 51 [self setPrimitiveValue:value_ forKey:@"hairColorStorage"]; 52 [self didChangeValueForKey:@"hairColorStorage"]; 41 53 } 42 54 trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ParentMO.h
r228 r313 5 5 #import "HumanMO.h" 6 6 7 8 7 @class ChildMO; 9 8 9 @interface ParentMOID : NSManagedObjectID {} 10 @end 10 11 11 12 @interface _ParentMO : HumanMO {} 13 + (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_; 14 - (ParentMOID*)objectID; 15 16 17 18 - (NSNumber*)myDouble; 19 - (void)setMyDouble:(NSNumber*)value_; 20 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 21 @property (retain) NSNumber *myDouble; 22 #endif 23 24 - (double)myDoubleValue; 25 - (void)setMyDoubleValue:(double)value_; 26 27 //- (BOOL)validateMyDouble:(id*)value_ error:(NSError**)error_; 28 29 30 31 - (NSString*)myString; 32 - (void)setMyString:(NSString*)value_; 33 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 34 @property (retain) NSString *myString; 35 #endif 36 37 //- (BOOL)validateMyString:(id*)value_ error:(NSError**)error_; 38 39 40 41 - (NSDecimalNumber*)myDecimal; 42 - (void)setMyDecimal:(NSDecimalNumber*)value_; 43 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 44 @property (retain) NSDecimalNumber *myDecimal; 45 #endif 46 47 //- (BOOL)validateMyDecimal:(id*)value_ error:(NSError**)error_; 48 49 50 51 - (NSString*)parentName; 52 - (void)setParentName:(NSString*)value_; 53 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 54 @property (retain) NSString *parentName; 55 #endif 56 57 //- (BOOL)validateParentName:(id*)value_ error:(NSError**)error_; 58 59 60 61 - (NSDate*)myDate; 62 - (void)setMyDate:(NSDate*)value_; 63 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 64 @property (retain) NSDate *myDate; 65 #endif 66 67 //- (BOOL)validateMyDate:(id*)value_ error:(NSError**)error_; 68 69 70 71 - (NSNumber*)myFloat; 72 - (void)setMyFloat:(NSNumber*)value_; 73 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 74 @property (retain) NSNumber *myFloat; 75 #endif 76 77 - (float)myFloatValue; 78 - (void)setMyFloatValue:(float)value_; 79 80 //- (BOOL)validateMyFloat:(id*)value_ error:(NSError**)error_; 81 82 83 84 - (NSNumber*)myInt32; 85 - (void)setMyInt32:(NSNumber*)value_; 86 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 87 @property (retain) NSNumber *myInt32; 88 #endif 89 90 - (int)myInt32Value; 91 - (void)setMyInt32Value:(int)value_; 92 93 //- (BOOL)validateMyInt32:(id*)value_ error:(NSError**)error_; 94 95 96 97 - (NSData*)myBinaryData; 98 - (void)setMyBinaryData:(NSData*)value_; 99 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 100 @property (retain) NSData *myBinaryData; 101 #endif 102 103 //- (BOOL)validateMyBinaryData:(id*)value_ error:(NSError**)error_; 104 12 105 13 106 14 107 - (NSNumber*)myInt16Transient; 15 108 - (void)setMyInt16Transient:(NSNumber*)value_; 109 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 110 @property (retain) NSNumber *myInt16Transient; 111 #endif 16 112 17 113 - (short)myInt16TransientValue; … … 22 118 23 119 24 - (NSString*)parentName;25 - (void)setParentName:(NSString*)value_;26 27 //- (BOOL)validateParentName:(id*)value_ error:(NSError**)error_;28 29 30 31 - (NSDecimalNumber*)myDecimal;32 - (void)setMyDecimal:(NSDecimalNumber*)value_;33 34 //- (BOOL)validateMyDecimal:(id*)value_ error:(NSError**)error_;35 36 37 38 - (NSDate*)myDate;39 - (void)setMyDate:(NSDate*)value_;40 41 //- (BOOL)validateMyDate:(id*)value_ error:(NSError**)error_;42 43 44 45 120 - (NSNumber*)myBoolean; 46 121 - (void)setMyBoolean:(NSNumber*)value_; 122 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 123 @property (retain) NSNumber *myBoolean; 124 #endif 47 125 48 126 - (BOOL)myBooleanValue; … … 55 133 - (NSNumber*)myInt64; 56 134 - (void)setMyInt64:(NSNumber*)value_; 135 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 136 @property (retain) NSNumber *myInt64; 137 #endif 57 138 58 139 - (long long)myInt64Value; … … 63 144 64 145 65 - (NSNumber*)myDouble;66 - (void)setMyDouble:(NSNumber*)value_;67 68 - (double)myDoubleValue;69 - (void)setMyDoubleValue:(double)value_;70 71 //- (BOOL)validateMyDouble:(id*)value_ error:(NSError**)error_;72 73 74 75 146 - (NSNumber*)myInt16; 76 147 - (void)setMyInt16:(NSNumber*)value_; 148 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 149 @property (retain) NSNumber *myInt16; 150 #endif 77 151 78 152 - (short)myInt16Value; … … 83 157 84 158 85 - (NSNumber*)myFloat;86 - (void)setMyFloat:(NSNumber*)value_;87 159 88 - (float)myFloatValue; 89 - (void)setMyFloatValue:(float)value_; 90 91 //- (BOOL)validateMyFloat:(id*)value_ error:(NSError**)error_; 92 93 94 95 - (NSData*)myBinaryData; 96 - (void)setMyBinaryData:(NSData*)value_; 97 98 //- (BOOL)validateMyBinaryData:(id*)value_ error:(NSError**)error_; 99 100 101 102 - (NSString*)myString; 103 - (void)setMyString:(NSString*)value_; 104 105 //- (BOOL)validateMyString:(id*)value_ error:(NSError**)error_; 106 107 108 109 - (NSNumber*)myInt32; 110 - (void)setMyInt32:(NSNumber*)value_; 111 112 - (int)myInt32Value; 113 - (void)setMyInt32Value:(int)value_; 114 115 //- (BOOL)validateMyInt32:(id*)value_ error:(NSError**)error_; 116 117 118 119 160 - (NSSet*)children; 120 161 - (void)addChildren:(NSSet*)value_; 121 162 - (void)removeChildren:(NSSet*)value_; … … 123 164 - (void)removeChildrenObject:(ChildMO*)value_; 124 165 - (NSMutableSet*)childrenSet; 166 #if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 167 @property (retain) NSSet* children; 168 #endif 125 169 126 170 trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ParentMO.m
r228 r313 4 4 #import "_ParentMO.h" 5 5 6 @implementation ParentMOID 7 @end 8 6 9 @implementation _ParentMO 10 11 + (id)newInManagedObjectContext:(NSManagedObjectContext*)moc_ { 12 return [NSEntityDescription insertNewObjectForEntityForName:@"Parent" inManagedObjectContext:moc_]; 13 } 14 15 - (ParentMOID*)objectID { 16 return (ParentMOID*)[super objectID]; 17 } 18 19 20 21 22 - (NSNumber*)myDouble { 23 [self willAccessValueForKey:@"myDouble"]; 24 NSNumber *result = [self primitiveValueForKey:@"myDouble"]; 25 [self didAccessValueForKey:@"myDouble"]; 26 return result; 27 } 28 29 - (void)setMyDouble:(NSNumber*)value_ { 30 [self willChangeValueForKey:@"myDouble"]; 31 [self setPrimitiveValue:value_ forKey:@"myDouble"]; 32 [self didChangeValueForKey:@"myDouble"]; 33 } 34 35 36 37 - (double)myDoubleValue { 38 NSNumber *result = [self myDouble]; 39 return result ? [result doubleValue] : 0; 40 } 41 42 - (void)setMyDoubleValue:(double)value_ { 43 [self setMyDouble:[NSNumber numberWithDouble:value_]]; 44 } 45 46 47 48 49 50 51 - (NSString*)myString { 52 [self willAccessValueForKey:@"myString"]; 53 NSString *result = [self primitiveValueForKey:@"myString"]; 54 [self didAccessValueForKey:@"myString"]; 55 return result; 56 } 57 58 - (void)setMyString:(NSString*)value_ { 59 [self willChangeValueForKey:@"myString"]; 60 [self setPrimitiveValue:value_ forKey:@"myString"]; 61 [self didChangeValueForKey:@"myString"]; 62 } 63 64 65 66 67 68 69 - (NSDecimalNumber*)myDecimal { 70 [self willAccessValueForKey:@"myDecimal"]; 71 NSDecimalNumber *result = [self primitiveValueForKey:@"myDecimal"]; 72 [self didAccessValueForKey:@"myDecimal"]; 73 return result; 74 } 75 76 - (void)setMyDecimal:(NSDecimalNumber*)value_ { 77 [self willChangeValueForKey:@"myDecimal"]; 78 [self setPrimitiveValue:value_ forKey:@"myDecimal"]; 79 [self didChangeValueForKey:@"myDecimal"]; 80 } 81 82 83 84 85 86 87 - (NSString*)parentName { 88 [self willAccessValueForKey:@"parentName"]; 89 NSString *result = [self primitiveValueForKey:@"parentName"]; 90 [self didAccessValueForKey:@"parentName"]; 91 return result; 92 } 93 94 - (void)setParentName:(NSString*)value_ { 95 [self willChangeValueForKey:@"parentName"]; 96 [self setPrimitiveValue:value_ forKey:@"parentName"]; 97 [self didChangeValueForKey:@"parentName"]; 98 } 99 100 101 102 103 104 105 - (NSDate*)myDate { 106 [self willAccessValueForKey:@"myDate"]; 107 NSDate *result = [self primitiveValueForKey:@"myDate"]; 108 [self didAccessValueForKey:@"myDate"]; 109 return result; 110 } 111 112 - (void)setMyDate:(NSDate*)value_ { 113 [self willChangeValueForKey:@"myDate"]; 114 [self setPrimitiveValue:value_ forKey:@"myDate"]; 115 [self didChangeValueForKey:@"myDate"]; 116 } 117 118 119 120 121 122 123 - (NSNumber*)myFloat { 124 [self willAccessValueForKey:@"myFloat"]; 125 NSNumber *result = [self primitiveValueForKey:@"myFloat"]; 126 [self didAccessValueForKey:@"myFloat"]; 127 return result; 128 } 129 130 - (void)setMyFloat:(NSNumber*)value_ { 131 [self willChangeValueForKey:@"myFloat"]; 132 [self setPrimitiveValue:value_ forKey:@"myFloat"]; 133 [self didChangeValueForKey:@"myFloat"]; 134 } 135 136 137 138 - (float)myFloatValue { 139 NSNumber *result = [self myFloat]; 140 return result ? [result floatValue] : 0; 141 } 142 143 - (void)setMyFloatValue:(float)value_ { 144 [self setMyFloat:[NSNumber numberWithFloat:value_]]; 145 } 146 147 148 149 150 151 152 - (NSNumber*)myInt32 { 153 [self willAccessValueForKey:@"myInt32"]; 154 NSNumber *result = [self primitiveValueForKey:@"myInt32"]; 155 [self didAccessValueForKey:@"myInt32"]; 156 return result; 157 } 158 159 - (void)setMyInt32:(NSNumber*)value_ { 160 [self willChangeValueForKey:@"myInt32"]; 161 [self setPrimitiveValue:value_ forKey:@"myInt32"]; 162 [self didChangeValueForKey:@"myInt32"]; 163 } 164 165 166 167 - (int)myInt32Value { 168 NSNumber *result = [self myInt32]; 169 return result ? [result intValue] : 0; 170 } 171 172 - (void)setMyInt32Value:(int)value_ { 173 [self setMyInt32:[NSNumber numberWithInt:value_]]; 174 } 175 176 177 178 179 180 181 - (NSData*)myBinaryData { 182 [self willAccessValueForKey:@"myBinaryData"]; 183 NSData *result = [self primitiveValueForKey:@"myBinaryData"]; 184 [self didAccessValueForKey:@"myBinaryData"]; 185 return result; 186 } 187 188 - (void)setMyBinaryData:(NSData*)value_ { 189 [self willChangeValueForKey:@"myBinaryData"]; 190 [self setPrimitiveValue:value_ forKey:@"myBinaryData"]; 191 [self didChangeValueForKey:@"myBinaryData"]; 192 } 193 194 195 7 196 8 197 … … 16 205 17 206 - (void)setMyInt16Transient:(NSNumber*)value_ { 18 [self willChangeValueForKey:@"myInt16Transient"];19 [self setPrimitiveValue:value_ forKey:@"myInt16Transient"];20 [self didChangeValueForKey:@"myInt16Transient"];207 [self willChangeValueForKey:@"myInt16Transient"]; 208 [self setPrimitiveValue:value_ forKey:@"myInt16Transient"]; 209 [self didChangeValueForKey:@"myInt16Transient"]; 21 210 } 22 211 … … 24 213 25 214 - (short)myInt16TransientValue { 26 return [[self myInt16Transient] shortValue]; 215 NSNumber *result = [self myInt16Transient]; 216 return result ? [result shortValue] : 0; 27 217 } 28 218 29 219 - (void)setMyInt16TransientValue:(short)value_ { 30 220 [self setMyInt16Transient:[NSNumber numberWithShort:value_]]; 31 }32 33 34 35 36 37 38 - (NSString*)parentName {39 [self willAccessValueForKey:@"parentName"];40 NSString *result = [self primitiveValueForKey:@"parentName"];41 [self didAccessValueForKey:@"parentName"];42 return result;43 }44 45 - (void)setParentName:(NSString*)value_ {46 [self willChangeValueForKey:@"parentName"];47 [self setPrimitiveValue:value_ forKey:@"parentName"];48 [self didChangeValueForKey:@"parentName"];49 }50 51 52 53 54 55 56 - (NSDecimalNumber*)myDecimal {57 [self willAccessValueForKey:@"myDecimal"];58 NSDecimalNumber *result = [self primitiveValueForKey:@"myDecimal"];59 [self didAccessValueForKey:@"myDecimal"];60 return result;61 }62 63 - (void)setMyDecimal:(NSDecimalNumber*)value_ {64 [self willChangeValueForKey:@"myDecimal"];65 [self setPrimitiveValue:value_ forKey:@"myDecimal"];66 [self didChangeValueForKey:@"myDecimal"];67 }68 69 70 71 72 73 74 - (NSDate*)myDate {75 [self willAccessValueForKey:@"myDate"];76 NSDate *result = [self primitiveValueForKey:@"myDate"];77 [self didAccessValueForKey:@"myDate"];78 return result;79 }80 81 - (void)setMyDate:(NSDate*)value_ {82 [self willChangeValueForKey:@"myDate"];83 [self setPrimitiveValue:value_ forKey:@"myDate"];84 [self didChangeValueForKey:@"myDate"];85 221 } 86 222 … … 98 234 99 235 - (void)setMyBoolean:(NSNumber*)value_ { 100 [self willChangeValueForKey:@"myBoolean"];101 [self setPrimitiveValue:value_ forKey:@"myBoolean"];102 [self didChangeValueForKey:@"myBoolean"];236 [self willChangeValueForKey:@"myBoolean"]; 237 [self setPrimitiveValue:value_ forKey:@"myBoolean"]; 238 [self didChangeValueForKey:@"myBoolean"]; 103 239 } 104 240 … … 106 242 107 243 - (BOOL)myBooleanValue { 108 return [[self myBoolean] boolValue]; 244 NSNumber *result = [self myBoolean]; 245 return result ? [result boolValue] : 0; 109 246 } 110 247 … … 126 263 127 264 - (void)setMyInt64:(NSNumber*)value_ { 128 [self willChangeValueForKey:@"myInt64"];129 [self setPrimitiveValue:value_ forKey:@"myInt64"];130 [self didChangeValueForKey:@"myInt64"];265 [self willChangeValueForKey:@"myInt64"]; 266 [self setPrimitiveValue:value_ forKey:@"myInt64"]; 267 [self didChangeValueForKey:@"myInt64"]; 131 268 } 132 269 … … 134 271 135 272 - (long long)myInt64Value { 136 return [[self myInt64] longLongValue]; 273 NSNumber *result = [self myInt64]; 274 return result ? [result longLongValue] : 0; 137 275 } 138 276 139 277 - (void)setMyInt64Value:(long long)value_ { 140 278 [self setMyInt64:[NSNumber numberWithLongLong:value_]]; 141 }142 143 144 145 146 147 148 - (NSNumber*)myDouble {149 [self willAccessValueForKey:@"myDouble"];150 NSNumber *result = [self primitiveValueForKey:@"myDouble"];151 [self didAccessValueForKey:@"myDouble"];152 return result;153 }154 155 - (void)setMyDouble:(NSNumber*)value_ {156 [self willChangeValueForKey:@"myDouble"];157 [self setPrimitiveValue:value_ forKey:@"myDouble"];158 [self didChangeValueForKey:@"myDouble"];159 }160 161 162 163 - (double)myDoubleValue {164 return [[self myDouble] doubleValue];165 }166 167 - (void)setMyDoubleValue:(double)value_ {168 [self setMyDouble:[NSNumber numberWithDouble:value_]];169 279 } 170 280 … … 182 292 183 293 - (void)setMyInt16:(NSNumber*)value_ { 184 [self willChangeValueForKey:@"myInt16"];185 [self setPrimitiveValue:value_ forKey:@"myInt16"];186 [self didChangeValueForKey:@"myInt16"];294 [self willChangeValueForKey:@"myInt16"]; 295 [self setPrimitiveValue:value_ forKey:@"myInt16"]; 296 [self didChangeValueForKey:@"myInt16"]; 187 297 } 188 298 … … 190 300 191 301 - (short)myInt16Value { 192 return [[self myInt16] shortValue]; 302 NSNumber *result = [self myInt16]; 303 return result ? [result shortValue] : 0; 193 304 } 194 305 … … 202 313 203 314 204 - (NSNumber*)myFloat {205 [self willAccessValueForKey:@"myFloat"];206 NSNumber *result = [self primitiveValueForKey:@"myFloat"];207 [self didAccessValueForKey:@"myFloat"];208 return result;209 }210 211 - (void)setMyFloat:(NSNumber*)value_ {212 [self willChangeValueForKey:@"myFloat"];213 [self setPrimitiveValue:value_ forKey:@"myFloat"];214 [self didChangeValueForKey:@"myFloat"];215 }216 217 218 219 - (float)myFloatValue {220 return [[self myFloat] floatValue];221 }222 223 - (void)setMyFloatValue:(float)value_ {224 [self setMyFloat:[NSNumber numberWithFloat:value_]];225 }226 227 228 229 230 231 232 - (NSData*)myBinaryData {233 [self willAccessValueForKey:@"myBinaryData"];234 NSData *result = [self primitiveValueForKey:@"myBinaryData"];235 [self didAccessValueForKey:@"myBinaryData"];236 return result;237 }238 239 - (void)setMyBinaryData:(NSData*)value_ {240 [self willChangeValueForKey:@"myBinaryData"];241 [self setPrimitiveValue:value_ forKey:@"myBinaryData"];242 [self didChangeValueForKey:@"myBinaryData"];243 }244 245 246 247 248 249 250 - (NSString*)myString {251 [self willAccessValueForKey:@"myString"];252 NSString *result = [self primitiveValueForKey:@"myString"];253 [self didAccessValueForKey:@"myString"];254 return result;255 }256 257 - (void)setMyString:(NSString*)value_ {258 [self willChangeValueForKey:@"myString"];259 [self setPrimitiveValue:value_ forKey:@"myString"];260 [self didChangeValueForKey:@"myString"];261 }262 263 264 265 266 267 268 - (NSNumber*)myInt32 {269 [self willAccessValueForKey:@"myInt32"];270 NSNumber *result = [self primitiveValueForKey:@"myInt32"];271 [self didAccessValueForKey:@"myInt32"];272 return result;273 }274 275 - (void)setMyInt32:(NSNumber*)value_ {276 [self willChangeValueForKey:@"myInt32"];277 [self setPrimitiveValue:value_ forKey:@"myInt32"];278 [self didChangeValueForKey:@"myInt32"];279 }280 281 282 283 - (int)myInt32Value {284 return [[self myInt32] intValue];285 }286 287 - (void)setMyInt32Value:(int)value_ {288 [self setMyInt32:[NSNumber numberWithInt:value_]];289 }290 291 292 293 294 295 296 315 316 317 - (NSSet*)children { 318 [self willAccessValueForKey:@"children"]; 319 NSSet *result = [self primitiveValueForKey:@"children"]; 320 [self didAccessValueForKey:@"children"]; 321 return result; 322 } 323 324 - (void)setChildren:(NSSet*)value_ { 325 [self willChangeValueForKey:@"children"]; 326 [self setPrimitiveValue:value_ forKey:@"children"]; 327 [self didChangeValueForKey:@"children"]; 328 } 329 297 330 - (void)addChildren:(NSSet*)value_ { 298 331 [self willChangeValueForKey:@"children" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value_]; 299 [[self primitiveValueForKey:@"children"] unionSet:value_];300 [self didChangeValueForKey:@"children" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value_];332 [[self primitiveValueForKey:@"children"] unionSet:value_]; 333 [self didChangeValueForKey:@"children" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value_]; 301 334 } 302 335 … … 310 343 NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value_ count:1]; 311 344 [self willChangeValueForKey:@"children" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects]; 312 [[self primitiveValueForKey:@"children"] addObject:value_];313 [self didChangeValueForKey:@"children" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];314 [changedObjects release];345 [[self primitiveValueForKey:@"children"] addObject:value_]; 346 [self didChangeValueForKey:@"children" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects]; 347 [changedObjects release]; 315 348 } 316 349 … … 324 357 325 358 - (NSMutableSet*)childrenSet { 326 return [self mutableSetValueForKey:@"children"]; 359 [self willChangeValueForKey:@"children"]; 360 NSMutableSet *result = [self mutableSetValueForKey:@"children"]; 361 [self didChangeValueForKey:@"children"]; 362 return result; 327 363 } 328 364 trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/include.m
r162 r313 1 1 #include "ChildMO.m" 2 2 #include "_ChildMO.m" 3 #include "HumanMO.m" 4 #include "_HumanMO.m" 3 5 #include "ParentMO.m" 4 6 #include "_ParentMO.m" 5 #include "HumanMO.m"6 #include "_HumanMO.m"
