rubyscript.cpp
66 RubyScriptPrivate::s_krossScript = rb_define_class_under(RubyInterpreter::krossModule(), "Script", rb_cModule);
67 rb_define_method(RubyScriptPrivate::s_krossScript, "method_added", (VALUE (*)(...))Internals::Script::method_added, 1);
83RubyScript::RubyScript(Kross::Api::Interpreter* interpreter, Kross::Api::ScriptContainer* scriptcontainer)
133 setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").arg(STR2CSTR( errorstring )), 0) ); // TODO: get the error
174 setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error
185Kross::Api::Object::Ptr RubyScript::callFunction(const TQString& name, Kross::Api::List::Ptr args)
214 setException( new Kross::Api::Exception(TQString("Failed to call function \"%1\": %2").arg(name).arg(STR2CSTR( errorstring )), 0) ); // TODO: get the error
Common exception class used for representing exceptions in Kross.
Definition exception.h:39
The ScriptContainer class is something like a single standalone scriptfile.
Definition scriptcontainer.h:51
const TQString getName() const
Definition scriptcontainer.cpp:104
TQString getCode() const
Return the scriptcode this ScriptContainer holds.
Definition scriptcontainer.cpp:114
ScriptContainer *const m_scriptcontainer
The ScriptContainer associated with this Script.
Definition script.h:130
static VALUE krossModule()
Definition rubyinterpreter.cpp:117
virtual Kross::Api::Object::Ptr callFunction(const TQString &name, Kross::Api::List::Ptr args)
Call a function.
Definition rubyscript.cpp:185
RubyScript(Kross::Api::Interpreter *interpreter, Kross::Api::ScriptContainer *scriptcontainer)
Constructor.
Definition rubyscript.cpp:83
virtual const TQStringList & getClassNames()
Return a list of class types this script supports.
Definition rubyscript.cpp:236
virtual Kross::Api::Object::Ptr classInstance(const TQString &name)
Create and return a new class instance.
Definition rubyscript.cpp:248
virtual const TQStringList & getFunctionNames()
Return a list of callable functionnames this script spends.
Definition rubyscript.cpp:142
The Kross scripting bridge to embed scripting functionality into an application.
Definition callable.h:31
The RubyType helper classes used to cast between TQVariant and VALUE values.
Definition rubyvariant.h:106
