1 //--------------------------------------------------------------------------------------- 2 // $Id$ 3 // Copyright (c) 2009 by Mulle Kybernetik. See License file for details. 4 //--------------------------------------------------------------------------------------- 5 6 #import "NSMethodSignature+OCMAdditions.h" 7 #import "OCMIndirectReturnValueProvider.h" 8 9 10 @implementation OCMIndirectReturnValueProvider 11 12 - (id)initWithProvider:(id)aProvider andSelector:(SEL)aSelector 13 { 14 self = [super init]; 15 provider = [aProvider retain]; 16 selector = aSelector; 17 return self; 18 } 19 20 - (void)dealloc 21 { 22 [provider release]; 23 [super dealloc]; 24 } 25 26 - (void)handleInvocation:(NSInvocation *)anInvocation 27 { 28 [anInvocation setTarget:provider]; 29 [anInvocation setSelector:selector]; 30 [anInvocation invoke]; 31 } 32 33 @end 34