Clean-up of Joystick class. Refactor constructor to avoid mandatory 'post-constructor...
[enjoyable.git] / Config.m
1 //
2 // Config.m
3 // Enjoy
4 //
5 // Created by Sam McCall on 4/05/09.
6 //
7
8 @implementation Config
9
10 -(id) init {
11 if(self=[super init]) {
12 entries = [[NSMutableDictionary alloc] init];
13 }
14 return self;
15 }
16
17 @synthesize protect, name, entries;
18
19 -(void) setTarget:(Target*)target forAction:(id)jsa {
20 [entries setValue:target forKey: [jsa stringify]];
21 }
22 -(Target*) getTargetForAction: (id) jsa {
23 return entries[[jsa stringify]];
24 }
25
26 @end