// Created by Sam McCall on 4/05/09.
//
+#import "JSAction.h"
+
@implementation JSAction
-@synthesize usage, cookie, index, subActions, base, name;
+- (id)initWithName:(NSString *)newName base:(JSAction *)newBase {
+ if ((self = [super init])) {
+ self.name = newName;
+ self.base = newBase;
+ }
+ return self;
+}
--(id) findSubActionForValue: (IOHIDValueRef) value {
- return NULL;
+- (id)findSubActionForValue:(IOHIDValueRef)value {
+ return NULL;
}
--(NSString*) stringify {
- return [[NSString alloc] initWithFormat: @"%@~%d",[base stringify],(int)cookie];
+- (NSString *)uid {
+ return [NSString stringWithFormat:@"%@~%@", [_base uid], _name];
}
--(void) notifyEvent: (IOHIDValueRef) value {
- [self doesNotRecognizeSelector:_cmd];
+
+- (void)notifyEvent:(IOHIDValueRef)value {
+ [self doesNotRecognizeSelector:_cmd];
}
--(BOOL) active {
- [self doesNotRecognizeSelector:_cmd];
- return NO;
+
+- (float)magnitude {
+ return 0.f;
}
@end