Formal protocol for the interface shared between Joysticks and JSActions, use new...
[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 - (id)initWithName:(NSString *)newName base:(id <NJActionPathElement>)newBase {
13 if ((self = [super init])) {
14 self.name = newName;
15 self.base = newBase;
16 }
17 return self;
18 }
19
20 - (id)findSubActionForValue:(IOHIDValueRef)value {
21 return NULL;
22 }
23
24 - (NSString *)uid {
25 return [NSString stringWithFormat:@"%@~%@", [_base uid], _name];
26 }
27
28 - (void)notifyEvent:(IOHIDValueRef)value {
29 [self doesNotRecognizeSelector:_cmd];
30 }
31
32 - (float)magnitude {
33 return 0.f;
34 }
35
36 @end