home *** CD-ROM | disk | FTP | other *** search
- /*
- Copyright (C) 1994 Sean Luke
-
- COWSProtocols.h
- Version 1.0
- Sean Luke
-
- */
-
-
-
- #import "COWSStringNode.h"
- #import "COWSArgumentList.h"
-
-
-
- @protocol LibraryControl
- // The interpreter adheres to this protocol.
- // Used to load libraries, and to allow libraries to
- // top the interpreter, if need be, until they get an answer
- // back to give to it.
-
- - addLibrary:this_library;
- - addLibraryFunction:(const char*) this_name
- selector: (SEL) this_selector
- target: this_target;
- - clearLibraryFunctions;
- - pauseInterpreting:calling_library;
- - resumeInterpretingWithValue:(COWSStringNode*)this_value;
- @end
-
-
-
- @protocol InterpreterToLibrary
- // Libraries adhere to this protocol.
- // Used to load libraries.
-
- - loadLibrary:sender;
- - pauseCancelled:sender;
- @end
-
-
-
- @protocol InterpreterToAppDelegate
- // Delegates of the interpreter adhere to this protocol.
- // This protocol consists of delegate messages from the interpreter.
-
- - finishedInterpreting:(const char*)returnValue:(int)thisMessage:sender;
- - errorInterpreting:(int) thisError:(const char*)thisFunction:
- (int)thisPosition:(const char*)thisString:sender;
- @end
-
-
-
- @protocol InterpreterControl
- // The interpreter adheres to this protocol.
- // This protocol gives the application control over the interpreter itself.
-
- - (int) setProgram:(const char*) this_string;
- - setDelegate:this_delegate;
- - delegate;
- - interpretFunction:(const char*) this_name
- arguments:(COWSArgumentList*)these_arguments;
- - stopInterpreting;
- @end
-
-
- @protocol InterpreterIPC
- // The interpreter adheres to this protocol.
- // This protocol gives one app's interpreter control over
- // another app's interpreter.
-
- - sendFunction:(const char*) this_name:reply;
- // synchronous communication
- // this function does not currently work when sending to background process
- // reply is a COWSStringNode.
- - addArgument:(const char*)this_argument; // returns NULL
- - (oneway void) sendOutFunction:(const char*) this_name;
- // asynchronous communication
- // this function works in all cases, as opposed to sendFunction.
- - (BOOL) isForeground;
- @end