2005/5/9

     
 

class PythonInterpreter

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

acdk::python::PythonInterpreter Class Reference

#include <PythonInterpreter.h>

Inheritance diagram for acdk::python::PythonInterpreter:

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

Public Member Functions

 PythonInterpreter ()
 ~PythonInterpreter ()
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.

int getLastReturnCode ()

Protected Attributes

int _lastReturnCode

Static Protected Attributes

bool _initilized

Constructor & Destructor Documentation

acdk::python::PythonInterpreter::PythonInterpreter  ) 
 

acdk::python::PythonInterpreter::~PythonInterpreter  ) 
 


Member Function Documentation

virtual acdk::lang::dmi::ScriptVar acdk::python::PythonInterpreter::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

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

virtual acdk::lang::Object acdk::python::PythonInterpreter::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

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

int acdk::python::PythonInterpreter::getLastReturnCode  )  [inline]
 

virtual void acdk::python::PythonInterpreter::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

virtual acdk::lang::dmi::ScriptVar acdk::python::PythonInterpreter::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

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

virtual void acdk::python::PythonInterpreter::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::python::PythonInterpreter::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

bool acdk::python::PythonInterpreter::_initilized [static, protected]
 

int acdk::python::PythonInterpreter::_lastReturnCode [protected]