lib
Kross::Python::PythonObject Class Reference
#include <pythonobject.h>
Inheritance diagram for Kross::Python::PythonObject:

Detailed Description
The PythonObject class is used for Instances of Python Classes by the PythonExtension class.
Definition at line 37 of file pythonobject.h.
Public Member Functions | |
PythonObject (const Py::Object &object) | |
virtual | ~PythonObject () |
virtual const QString | getClassName () const |
virtual Kross::Api::Object::Ptr | call (const QString &name, Kross::Api::List::Ptr arguments) |
virtual QStringList | getCalls () |
Constructor & Destructor Documentation
PythonObject::PythonObject | ( | const Py::Object & | object | ) | [explicit] |
Constructor.
- Parameters:
-
object The Py::Object this PythonObject provides access to.
Definition at line 27 of file pythonobject.cpp.
PythonObject::~PythonObject | ( | ) | [virtual] |
Member Function Documentation
Kross::Api::Object::Ptr PythonObject::call | ( | const QString & | name, | |
Kross::Api::List::Ptr | arguments | |||
) | [virtual] |
Pass a call to the object.
Objects like Class are able to handle call's by just implementating this function.
- Exceptions:
-
TypeException if the object or the name is not callable.
- Parameters:
-
name Each call has a name that says what should be called. In the case of a Class the name is the functionname. arguments The list of arguments passed to the call.
- Returns:
- The call-result as Object* instance or NULL if the call has no result.
Definition at line 67 of file pythonobject.cpp.
QStringList PythonObject::getCalls | ( | ) | [virtual] |
Return a list of supported callable objects.
- Returns:
- List of supported calls.
Reimplemented from Kross::Api::Object.
Definition at line 92 of file pythonobject.cpp.
const QString PythonObject::getClassName | ( | ) | const [virtual] |
Return the class name.
This could be something like "Kross::Python::PythonObject" for this object. The value is mainly used for display purposes.
- Returns:
- The name of this class.
Implements Kross::Api::Object.
Definition at line 62 of file pythonobject.cpp.
The documentation for this class was generated from the following files: