aboutsummaryrefslogtreecommitdiffstats
path: root/LispREPL.h
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2008-04-02 19:20:20 -0400
committerBrian Cully <bjc@kublai.com>2008-04-02 19:20:20 -0400
commitab10720260e2c184b319026da89f4dfd338500bb (patch)
treea692a27435da0296972e43b21b2f35762e720bfd /LispREPL.h
downloadmoxie-ab10720260e2c184b319026da89f4dfd338500bb.tar.gz
moxie-ab10720260e2c184b319026da89f4dfd338500bb.zip
Initial commit
Diffstat (limited to 'LispREPL.h')
-rw-r--r--LispREPL.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/LispREPL.h b/LispREPL.h
new file mode 100644
index 0000000..73e53c0
--- /dev/null
+++ b/LispREPL.h
@@ -0,0 +1,47 @@
+//
+// LispREPL.h
+// Moxie
+//
+// Created by Brian Cully on Sat Aug 14 2004.
+// Copyright (c) 2004 Brian Cully. All rights reserved.
+//
+
+#define LispFinishedLoadingNotification @"LispFinishedLoadingNotification"
+
+@interface LispREPL : NSObject
+{
+ NSFileHandle *theStdinWriter;
+ NSFileHandle *theStdoutReader;
+ NSFileHandle *theResultReader;
+
+ NSMutableDictionary *theCommandHandlers;
+
+ NSMutableArray *theREPLResults;
+ NSTimer *theDispatcherTimer;
+ NSLock *theDispatcherLock;
+
+ BOOL theLispIsLoaded;
+}
++ (LispREPL *)sharedREPL;
+
+- (BOOL)isLoaded;
+
+- (void)addCommand: (NSString *)command
+ handler: (id)object
+ selector: (SEL)handler;
+- (void)removeCommand: (NSString *)command;
+- (void)runCommand: (NSString *)command withObjects: (id)objects;
+- (BOOL)commandHasHandler: (NSString *)command;
+- (id)handlerForCommand: (NSString *)command;
+- (SEL)selectorForCommand: (NSString *)command;
+
+- (void)eval: (id)aForm;
+@end
+
+@interface LispREPL (Accessors)
+- (NSMutableDictionary *)commandHandlers;
+
+- (NSFileHandle *)stdinWriter;
+- (NSFileHandle *)stdoutReader;
+- (NSFileHandle *)resultReader;
+@end \ No newline at end of file