2002-05-29 21:59:25 +00:00
|
|
|
/**
|
|
|
|
STShell
|
|
|
|
StepTalk Shell
|
|
|
|
|
|
|
|
Copyright (c) 2002 Free Software Foundation
|
|
|
|
|
|
|
|
Written by: Stefan Urbanek <urbanek@host.sk>
|
|
|
|
Date: 2002 May 29
|
|
|
|
|
|
|
|
This file is part of the StepTalk project.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02111, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
2003-11-08 01:02:35 +00:00
|
|
|
@class STConversation;
|
2002-05-29 21:59:25 +00:00
|
|
|
@class STEnvironment;
|
2002-06-21 22:40:59 +00:00
|
|
|
@class STScriptsManager;
|
2002-05-29 21:59:25 +00:00
|
|
|
@class NSMutableArray;
|
2002-09-15 10:22:15 +00:00
|
|
|
@class NSException;
|
2002-05-29 21:59:25 +00:00
|
|
|
|
|
|
|
@interface STShell:NSObject
|
|
|
|
{
|
2002-06-21 22:40:59 +00:00
|
|
|
STScriptsManager *scriptsManager;
|
2003-11-08 01:02:35 +00:00
|
|
|
STConversation *conversation;
|
2002-05-29 21:59:25 +00:00
|
|
|
|
2002-09-15 10:22:15 +00:00
|
|
|
NSString *prompt;
|
|
|
|
NSString *source;
|
2002-05-29 21:59:25 +00:00
|
|
|
|
2002-09-15 10:22:15 +00:00
|
|
|
NSMutableArray *objectStack;
|
2002-05-29 22:32:24 +00:00
|
|
|
|
2002-09-15 10:22:15 +00:00
|
|
|
BOOL exitRequest;
|
2002-06-06 17:14:05 +00:00
|
|
|
|
2002-09-17 12:40:41 +00:00
|
|
|
BOOL updateCompletionList;
|
|
|
|
NSArray *completionList;
|
2005-09-05 20:11:31 +00:00
|
|
|
BOOL completionEnabled;
|
|
|
|
|
2002-05-29 21:59:25 +00:00
|
|
|
}
|
2003-11-08 01:02:35 +00:00
|
|
|
- initWithEnvironment:(STEnvironment *)env;
|
2002-05-29 21:59:25 +00:00
|
|
|
|
|
|
|
- (void)setLanguage:(NSString *)langName;
|
|
|
|
- (void)setEnvironment:(STEnvironment *)newEnv;
|
|
|
|
- (STEnvironment *)environment;
|
|
|
|
|
|
|
|
- (void)run;
|
|
|
|
|
|
|
|
- show:(id)anObject;
|
|
|
|
- showLine:(id)anObject;
|
|
|
|
|
2002-09-15 10:22:15 +00:00
|
|
|
- (id)executeLine:(NSString *)line;
|
|
|
|
|
|
|
|
- showResult:(id)obj;
|
|
|
|
- showException:(NSException *)exception;
|
|
|
|
- (void)showError:(NSString *)errString;
|
2002-05-29 21:59:25 +00:00
|
|
|
@end
|
2002-09-17 12:40:41 +00:00
|
|
|
|
|
|
|
@interface STShell(STShellOutput)
|
|
|
|
|
|
|
|
- show:(id)anObject;
|
|
|
|
- showLine:(id)anObject;
|
|
|
|
- showResult:(id)obj;
|
|
|
|
- (char *)displayCStringForObject:(id)object;
|
|
|
|
- showException:(NSException *)exception;
|
|
|
|
- (id)listObjects;
|
|
|
|
|
|
|
|
@end
|