Kross::Ruby::RubyInterpreter Class Reference

#include <rubyinterpreter.h>

Inheritance diagram for Kross::Ruby::RubyInterpreter:

Inheritance graph
[legend]
Collaboration diagram for Kross::Ruby::RubyInterpreter:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class is the bridget between Kross and Ruby.
Author:
Cyrille Berger

Definition at line 35 of file rubyinterpreter.h.

Public Member Functions

 RubyInterpreter (Kross::Api::InterpreterInfo *info)
 ~RubyInterpreter ()
virtual Kross::Api::ScriptcreateScript (Kross::Api::ScriptContainer *scriptcontainer)

Protected Attributes

InterpreterInfo * m_interpreterinfo
 The InterpreterInfo instance this interpreter belongs to.


Constructor & Destructor Documentation

Kross::Ruby::RubyInterpreter::RubyInterpreter Kross::Api::InterpreterInfo info  ) 
 

Constructor

Parameters:
info The Kross::Api::InterpreterInfo instance that describes this RubyInterpreter .

Definition at line 73 of file rubyinterpreter.cpp.

References Kross::Api::InterpreterInfo::getOption(), and Kross::Api::InterpreterInfo::hasOption().

00073                                                              : Kross::Api::Interpreter(info)
00074 {
00075 #ifdef KROSS_RUBY_INTERPRETER_DEBUG
00076     kdDebug() << "RubyInterpreter::RubyInterpreter(info)" << endl;
00077 #endif
00078     if(d == 0)
00079     {
00080         initRuby();
00081     }
00082     if(info->hasOption("safelevel") )
00083     {
00084         rb_set_safe_level( info->getOption("safelevel")->value.toInt() );
00085     } else {
00086         rb_set_safe_level(4); // if the safelevel option is undefined, set it to maximum level
00087     }
00088 }

Kross::Ruby::RubyInterpreter::~RubyInterpreter  ) 
 

Destructor.

Definition at line 91 of file rubyinterpreter.cpp.

00092 {
00093     finalizeRuby();
00094 }


Member Function Documentation

Kross::Api::Script * Kross::Ruby::RubyInterpreter::createScript Kross::Api::ScriptContainer scriptcontainer  )  [virtual]
 

Factory method to create and return a new RubyScript instance.

Implements Kross::Api::Interpreter.

Definition at line 97 of file rubyinterpreter.cpp.

00098 {
00099     return new RubyScript(this, scriptcontainer);
00100 }


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 18:01:44 2006 for Kross by  doxygen 1.4.6