-
Notifications
You must be signed in to change notification settings - Fork 1
/
OEEvaluation.h
38 lines (28 loc) · 1.02 KB
/
OEEvaluation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// OEEvaluation.h
// objc-eval
//
// Created by Eric Entin on 2/21/10.
// Copyright 2010 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@class OEEvaluation, OEEvaluator;
@protocol OEEvaluationDelegate
// Called when the OEEvaluator finishes evaluating, returning absolutely
// anything from the objective-c code represented by code.
// Could be a long time before you recieve this.
- (void)evaluation:(OEEvaluation*)evaluator
evaluatedWithResult:(id)absolutelyAnything;
@end
@interface OEEvaluation : NSObject {
NSString *_code;
id<OEEvaluationDelegate> _delegate;
OEEvaluator *_evaluator;
}
// Create a new, autoreleased, evaluation with a code string.
+ (OEEvaluation*)evaluationWithCode:(NSString*)code delegate:(id<OEEvaluationDelegate>)delegate;
// Evaluate with delegate callback. This could do anything. You are warned.
- (void)startEvaluation;
// Evaluate synchronously. Will block until result is delivered. This could do anything. You are warned.
- (id)evaluateSynchronously;
@end