CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
00001 00007 #import "ScoreData.h" 00008 00009 00010 @implementation ScoreData 00011 @synthesize pdf; 00012 @synthesize fullMetaData; 00013 @synthesize metaDataDict; 00014 @synthesize description; 00015 00016 -(id)init 00017 { 00018 self = [super init]; 00019 if (self) 00020 { 00021 self.description = @""; 00022 self.fullMetaData = @""; 00023 self.pdf = @""; 00024 [self.metaDataDict init]; 00025 } 00026 return self; 00027 } 00028 00029 -(void)dealloc 00030 { 00031 [self.metaDataDict release]; 00032 [self.fullMetaData release]; 00033 [self.description release]; 00034 [self.pdf release]; 00035 [super dealloc]; 00036 } 00037 00038 #pragma mark - NSCoding protocol 00039 - (id)initWithCoder:(NSCoder *)decoder 00040 { 00041 [super init]; 00042 [self setDescription:[decoder decodeObjectForKey:@"description"]]; 00043 [self setFullMetaData:[decoder decodeObjectForKey:@"fullMetaData"]]; 00044 [self setMetaDataDict:[decoder decodeObjectForKey:@"metaDataDict"]]; 00045 [self setPdf:[decoder decodeObjectForKey:@"pdf"]]; 00046 return self; 00047 } 00048 00049 - (void)encodeWithCoder:(NSCoder *)encoder 00050 { 00051 [encoder encodeObject:description forKey:@"description"]; 00052 [encoder encodeObject:fullMetaData forKey:@"fullMetaData"]; 00053 [encoder encodeObject:metaDataDict forKey:@"metaDataDict"]; 00054 [encoder encodeObject:pdf forKey:@"pdf"]; 00055 } 00056 00057 00058 @end