summaryrefslogtreecommitdiff
path: root/MLKDynamicContext.h
blob: 8dc1a2f8a612ed7a3bbc0018aa00a0b4b63f1a36 (plain)
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
/* -*- mode: objc; coding: utf-8 -*- */
/* Copyright 2008, Matthias Benkard. */

@class MLKClosure, MLKEnvironment, NSLinkedList, NSMutableDictionary, NSString;


@interface MLKDynamicContext : NSObject
{
  MLKEnvironment *_conditionHandlers;
  MLKEnvironment *_restarts;
  MLKEnvironment *_catchTags;
  MLKClosure *_currentConditionHandler;  // needed for the Condition Firewall
  MLKEnvironment *_environment;
  MLKDynamicContext *_parent;
}

-(MLKDynamicContext *) initWithParent:(MLKDynamicContext *)aContext
                            variables:(NSDictionary *)vars
                             handlers:(NSDictionary *)handlers
                             restarts:(NSDictionary *)restarts
                            catchTags:(NSDictionary *)catchTags
                       currentHandler:(MLKClosure *)handler;

-(MLKDynamicContext *) pushContext;

+(MLKDynamicContext *) currentContext;
+(MLKDynamicContext *) popContext;

-(void) dealloc;
@end