lib

pythonobject.h
1/***************************************************************************
2 * pythonobject.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
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_PYTHON_OBJECT_H
21#define KROSS_PYTHON_OBJECT_H
22
23#include "pythonconfig.h"
24#include "../api/object.h"
25#include "../api/list.h"
26#include "pythonextension.h"
27
28#include <tqstring.h>
29#include <tqstringlist.h>
30
31namespace Kross { namespace Python {
32
38 {
39 public:
40
47 explicit PythonObject(const Py::Object& object);
48
52 virtual ~PythonObject();
53
62 virtual const TQString getClassName() const;
63
79 virtual Kross::Api::Object::Ptr call(const TQString& name, Kross::Api::List::Ptr arguments);
80
86 virtual TQStringList getCalls();
87
88 private:
89 const Py::Object m_pyobject;
90 TQStringList m_calls;
91 };
92
93}}
94
95#endif
TDESharedPtr< List > Ptr
Shared pointer to implement reference-counting.
Definition list.h:44
The common Object class all other object-classes are inheritated from.
Definition object.h:51
TDESharedPtr< Object > Ptr
Shared pointer to implement reference-counting.
Definition object.h:57
virtual const TQString getClassName() const
Return the class name.
virtual TQStringList getCalls()
Return a list of supported callable objects.
virtual ~PythonObject()
Destructor.
virtual Kross::Api::Object::Ptr call(const TQString &name, Kross::Api::List::Ptr arguments)
Pass a call to the object.
PythonObject(const Py::Object &object)
Constructor.
The Python plugin for the Kross scripting framework.
The Kross scripting bridge to embed scripting functionality into an application.
Definition callable.h:31