2005/5/9

     
 

class APerlInterpreter

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

acdk::perl::APerlInterpreter Class Reference

#include <PerlInterpreter.h>

Inheritance diagram for acdk::perl::APerlInterpreter:

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

Detailed Description

Representing the Perl interpreter.

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


Public Member Functions

 APerlInterpreter ()
virtual ~APerlInterpreter ()
virtual void parse (IN(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 parse (IN(RStringArray) args)
int run ()

Protected Types

typedef void * Perl5Interpreter

Protected Attributes

Perl5Interpreter _pi


Member Typedef Documentation

typedef void* acdk::perl::APerlInterpreter::Perl5Interpreter [protected]
 


Constructor & Destructor Documentation

acdk::perl::APerlInterpreter::APerlInterpreter (   ) 
 

virtual acdk::perl::APerlInterpreter::~APerlInterpreter (   )  [virtual]
 


Member Function Documentation

virtual acdk::lang::dmi::ScriptVar acdk::perl::APerlInterpreter::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::perl::APerlInterpreter::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
Bug:
does't seem to work

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

virtual void acdk::perl::APerlInterpreter::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::perl::APerlInterpreter::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.

void acdk::perl::APerlInterpreter::parse (  IN(RStringArray)  args  ) 
 

virtual void acdk::perl::APerlInterpreter::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::perl::APerlInterpreter::parse (  IN(RFile)  file  )  [virtual]
 

Parse a file.

On some interpreter also execute the script.

Parameters:
file the file to parse

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

int acdk::perl::APerlInterpreter::run (   ) 
 


Member Data Documentation

Perl5Interpreter acdk::perl::APerlInterpreter::_pi [protected]