2 // CHOMPEnumeratorTrampoline.h
5 // Created by Michael Ash on 12/15/04.
8 #import <Foundation/Foundation.h>
10 #import "CHOMPTrampoline.h"
13 // This class provides a framework for HOM enumeration constructs.
15 @interface CHOMPEnumeratorTrampoline
: CHOMPTrampoline
{
19 + trampolineWithSelector
:(SEL
)sel collection
:cln iterate
:(BOOL
)iter
;
21 - initWithSelector
:(SEL
)sel collection
:cln iterate
:(BOOL
)iter
;
23 - (void)iterateWithInvocation
:(NSInvocation
*)invocation
;
25 // the following methods allow subclasses to add additional behavior
27 // allows subclasses to perform setup for an iteration session
28 // the default implementation does nothing
29 - (void)prepareWithInvocation
:(NSInvocation
*)invocation
;
31 // send the invocation to the given target
32 // the default implementation simply invokes the invocation; if a subclass
33 // overrides this, it must either invoke the invocation itself, or call
35 - (void)sendInvocation
:(NSInvocation
*)invocation toTarget
:obj
;
37 // allows subclasses to do something with the return values from the method calls
38 // this will only be called if the method actually returns an object
39 // the default implementation does nothing
40 - (void)processReturnValue
:retVal
;
42 // allows subclasses to provide a custom return value for the entire HOM
43 // this will only be called if the method actually returns an object
44 // the default implementation returns nil
47 // allows subclasses to perform a takedown for an iteration session
48 // the default implementation does nothing
49 - (void)finalizeWithInvocation
:(NSInvocation
*)invocation
;