artefaktur
software engineer &        architecture

 
 
 
 

class TclInterpreter

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

acdk::tcl::TclInterpreter Class Reference

#include <TclInterpreter.h>

Inheritance diagram for acdk::tcl::TclInterpreter:

acdk::lang::Object acdk::lang::dmi::ScriptInterpreter acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

Interface to a script interpreter Tcl, Java, etc.

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


Public Member Functions

 TclInterpreter (void *interp=0)
virtual ~TclInterpreter ()
virtual void parse (IN(acdk::io::RFile) file)
 Parse a file.

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

virtual acdk::lang::Object eval (IN(RString) code)
 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(acdk::lang::Object) obj, IN(RString) func, acdk::lang::dmi::ScriptVarArray &args)
 Calls a script method of given object.

virtual void interactive (IN(acdk::io::RCharReader) in, IN(acdk::io::RCharWriter) out, IN(acdk::io::RCharWriter) err)
 Do debug the given Script.

void * interpreter ()

Static Public Member Functions

RTclInterpreter getInstance ()

Private Attributes

void * _interpreter
 The underlying Tcl_Interp*.


Constructor & Destructor Documentation

acdk::tcl::TclInterpreter::TclInterpreter void *  interp = 0  ) 
 

virtual acdk::tcl::TclInterpreter::~TclInterpreter  )  [virtual]
 


Member Function Documentation

virtual acdk::lang::dmi::ScriptVar acdk::tcl::TclInterpreter::call IN(RString func,
acdk::lang::dmi::ScriptVarArray args
[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 Not implemented yet

Reimplemented from acdk::lang::dmi::ScriptInterpreter.

virtual acdk::lang::Object acdk::tcl::TclInterpreter::eval IN(RString code  )  [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 Not implemented yet

Implements acdk::lang::dmi::ScriptInterpreter.

RTclInterpreter acdk::tcl::TclInterpreter::getInstance  )  [static]
 

virtual void acdk::tcl::TclInterpreter::interactive IN(acdk::io::RCharReader in,
IN(acdk::io::RCharWriter out,
IN(acdk::io::RCharWriter err
[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 Not implemented yet

void* acdk::tcl::TclInterpreter::interpreter  )  [inline]
 

virtual acdk::lang::dmi::ScriptVar acdk::tcl::TclInterpreter::invoke IN(acdk::lang::Object obj,
IN(RString func,
acdk::lang::dmi::ScriptVarArray args
[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 Not implemented yet

Reimplemented from acdk::lang::dmi::ScriptInterpreter.

virtual void acdk::tcl::TclInterpreter::parse IN(RString script  )  [virtual]
 

Parse a file.

On some interpreter also execute the script.

Parameters:
script the script to parse

Implements acdk::lang::dmi::ScriptInterpreter.

virtual void acdk::tcl::TclInterpreter::parse IN(acdk::io::RFile file  )  [virtual]
 

Parse a file.

On some interpreter also execute the script.

Parameters:
file the file to parse

Member Data Documentation

void* acdk::tcl::TclInterpreter::_interpreter [private]
 

The underlying Tcl_Interp*.

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