mirror of
https://github.com/thes3m/XNI
synced 2024-12-26 13:26:06 +01:00
30 lines
774 B
Mathematica
30 lines
774 B
Mathematica
|
//
|
||
|
// AchievementCollection.m
|
||
|
// XNI
|
||
|
//
|
||
|
// Created by Matej Jan on 18.2.11.
|
||
|
// Copyright 2011 Retronator. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "AchievementCollection.h"
|
||
|
|
||
|
#import "Retronator.Xni.Framework.GamerServices.h"
|
||
|
|
||
|
#define ReadOnlyCollection AchievementCollection
|
||
|
#define T Achievement*
|
||
|
#define Initialization achievements = [[NSMutableDictionary alloc] init]; for (Achievement* achievement in collection) {if (achievement.key) [achievements setObject:achievement forKey:achievement.key];}
|
||
|
#define Disposing [achievements release];
|
||
|
|
||
|
#include "ReadOnlyCollection.m.h"
|
||
|
|
||
|
@implementation AchievementCollection (Custom)
|
||
|
|
||
|
- (Achievement*) itemForKey:(NSString*)key {
|
||
|
return [achievements objectForKey:key];
|
||
|
}
|
||
|
|
||
|
@end
|
||
|
|
||
|
#undef ReadOnlyCollection
|
||
|
#undef T
|
||
|
#undef Initialization
|