artefaktur
software engineer &        architecture

 
 
 
 

class ScriptInterpreter

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::dmi::ScriptInterpreter Class Reference

#include <ScriptInterpreter.h>

Inheritance diagram for acdk::lang::dmi::ScriptInterpreter:

acdk::lisp::LispInterpreter acdk::perl::APerlInterpreter acdk::python::PythonInterpreter acdk::tcl::TclInterpreter List of all members.

Detailed Description

Interface to a script interpreter like Lisp, Perl, PHP, tcl, Java, etc.

Author:
Roger Rene Kommer (kommer@artefaktur.com)
Version:
Revision
1.12
Date:
Date
2005/04/08 10:53:19


Public Member Functions

virtual void parse (IN(RFile) file)=0
 Parse a file.

virtual void parse (IN(RString) script)=0
 Parse a file.

virtual RObject eval (IN(RString) code)=0
 Evaluate the code .

virtual acdk::lang::dmi::ScriptVar call (IN(RString) func, acdk::lang::dmi::ScriptVarArray &args)
 Calls a script function.

virtual acdk::lang::dmi::ScriptVar invoke (IN(RObject) obj, IN(RString) func, acdk::lang::dmi::ScriptVarArray &args)
 Calls a script method of given object.

virtual void interactive (IN(RCharReader) in, IN(RCharWriter) out, IN(RCharWriter) err)=0
 Do debug the given Script.


Member Function Documentation

virtual acdk::lang::dmi::ScriptVar acdk::lang::dmi::ScriptInterpreter::call IN(RString func,
acdk::lang::dmi::ScriptVarArray args
[inline, virtual]
 

Calls a script function.

Note: may not all script interpreter support this function

Parameters:
func the name of the function
args the arguments for the function
Returns:
result of the call

Reimplemented in acdk::lisp::LispInterpreter, acdk::perl::APerlInterpreter, acdk::python::PythonInterpreter, and acdk::tcl::TclInterpreter.

virtual RObject acdk::lang::dmi::ScriptInterpreter::eval IN(RString code  )  [pure virtual]
 

Evaluate the code .

On some interpreter it is equal to parse.

Parameters:
script the script to eval
Returns:
the output or result of the script fragment

Implemented in acdk::lisp::LispInterpreter, acdk::perl::APerlInterpreter, acdk::python::PythonInterpreter, and acdk::tcl::TclInterpreter.

virtual void acdk::lang::dmi::ScriptInterpreter::interactive IN(RCharReader in,
IN(RCharWriter out,
IN(RCharWriter err
[pure virtual]
 

Do debug the given Script.

May not work on all scripting languages

Parameters:
in Inputstream for users input and script
out Scripts output and users Echo output
err Error stream

Implemented in acdk::lisp::LispInterpreter.

virtual acdk::lang::dmi::ScriptVar acdk::lang::dmi::ScriptInterpreter::invoke IN(RObject obj,
IN(RString func,
acdk::lang::dmi::ScriptVarArray args
[inline, virtual]
 

Calls a script method of given object.

Parameters:
obj the 'this' object of the script, which is a wrapper to the scripting
func the name of the function
args the arguments for the function
Returns:
result of the call

Reimplemented in acdk::lisp::LispInterpreter, acdk::perl::APerlInterpreter, acdk::python::PythonInterpreter, and acdk::tcl::TclInterpreter.

virtual void acdk::lang::dmi::ScriptInterpreter::parse IN(RString script  )  [pure virtual]
 

Parse a file.

On some interpreter also execute the script.

Parameters:
script the script to parse

Implemented in acdk::lisp::LispInterpreter, acdk::perl::APerlInterpreter, acdk::python::PythonInterpreter, and acdk::tcl::TclInterpreter.

virtual void acdk::lang::dmi::ScriptInterpreter::parse IN(RFile file  )  [pure virtual]
 

Parse a file.

On some interpreter also execute the script.

Parameters:
file the file to parse

Implemented in acdk::lisp::LispInterpreter, and acdk::perl::APerlInterpreter.

 
Last modified 2005-05-08 18:32 by SYSTEM By Artefaktur, Ing. Bureau Kommer