1 /***************************************************************************
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
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 ***************************************************************************/
20 #ifndef KROSS_RUBY_OBJECT_H
21 #define KROSS_RUBY_OBJECT_H
23 #include "rubyconfig.h"
24 #include <kross/core/object.h>
27 #include <QStringList>
32 * The RubyObject class is used for Instances of Ruby
33 * Classes by the \a RubyExtension class.
35 class RubyObject
: public Kross::Object
40 * Default constructor.
42 explicit RubyObject();
47 * \param object The Py::Object this \a RubyObject
50 explicit RubyObject(const VALUE
& object
);
55 virtual ~RubyObject();
58 * Pass a call to the object. Objects like \a Class
59 * are able to handle call's by just implementating
62 * \param name Each call has a name that says what
63 * should be called. In the case of a \a Class
64 * the name is the functionname.
65 * \param args The list of arguments passed to
67 * \return The call-result as QVariant
69 virtual QVariant
callMethod(const QString
& name
,
70 const QVariantList
& args
= QVariantList());
73 * Return a list of supported callable objects.
75 * \return List of supported calls.
77 virtual QStringList
methodNames();
80 * Return ruby object used in this object.
82 * \return ruby object.
87 /// Private d-pointer class.