f96c10d878adc5dd7a9c6c2ddb73c385d36da911
[enjoyable.git] / JSAction.m
1 //
2 // JSAction.m
3 // Enjoy
4 //
5 // Created by Sam McCall on 4/05/09.
6 //
7
8 #import "JSAction.h"
9
10 @implementation JSAction
11
12 @synthesize cookie;
13 @synthesize index;
14 @synthesize children;
15 @synthesize base;
16 @synthesize name;
17 @synthesize active;
18
19 - (id)initWithName:(NSString *)newName base:(JSAction *)newBase {
20 if ((self = [super init])) {
21 self.name = newName;
22 self.base = newBase;
23 }
24 return self;
25 }
26
27 - (id)findSubActionForValue:(IOHIDValueRef)value {
28 return NULL;
29 }
30
31 - (NSString *)stringify {
32 if (cookie)
33 return [NSString stringWithFormat: @"%@~%p", [base stringify], cookie];
34 else
35 return [NSString stringWithFormat: @"%@~%@", [base stringify], name];
36 }
37
38 - (void)notifyEvent:(IOHIDValueRef)value {
39 [self doesNotRecognizeSelector:_cmd];
40 }
41
42 - (float)magnitude {
43 return 0.f;
44 }
45
46 @end