lib

rubyscript.h
1/***************************************************************************
2 * rubyscript.h
3 * This file is part of the KDE project
4 * copyright (C)2005 by Cyrille Berger (cberger@cberger.net)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_RUBYRUBYSCRIPT_H
21#define KROSS_RUBYRUBYSCRIPT_H
22
23#include <api/script.h>
24
25namespace Kross {
26
27namespace Ruby {
28
29class RubyScriptPrivate;
30
37{
38 public:
39
50
55
60 virtual const TQStringList& getFunctionNames();
61
66
70 virtual Kross::Api::Object::Ptr callFunction(const TQString& name, Kross::Api::List::Ptr args);
71
75 virtual const TQStringList& getClassNames();
76
80 virtual Kross::Api::Object::Ptr classInstance(const TQString& name);
81
82 private:
83
87 void compile();
88
89 private:
91 RubyScriptPrivate* d;
92};
93
94}
95
96}
97
98#endif
Base class for interpreters.
TDESharedPtr< List > Ptr
Shared pointer to implement reference-counting.
Definition list.h:44
TDESharedPtr< Object > Ptr
Shared pointer to implement reference-counting.
Definition object.h:57
The ScriptContainer class is something like a single standalone scriptfile.
Base class for interpreter dependend functionality each script provides.
Definition script.h:46
virtual Kross::Api::Object::Ptr callFunction(const TQString &name, Kross::Api::List::Ptr args)
Call a function.
RubyScript(Kross::Api::Interpreter *interpreter, Kross::Api::ScriptContainer *scriptcontainer)
Constructor.
virtual const TQStringList & getClassNames()
Return a list of class types this script supports.
virtual Kross::Api::Object::Ptr execute()
Execute the script.
virtual Kross::Api::Object::Ptr classInstance(const TQString &name)
Create and return a new class instance.
virtual const TQStringList & getFunctionNames()
Return a list of callable functionnames this script spends.
The Ruby plugin for the Kross scripting framework.
Definition rubyconfig.h:33
The Kross scripting bridge to embed scripting functionality into an application.
Definition callable.h:31