lib

Kross::Python::PythonExtension Class Reference

#include <pythonextension.h>

Public Member Functions

 PythonExtension (Kross::Api::Object::Ptr object)
virtual ~PythonExtension ()
virtual Py::Object getattr (const char *name)

Friends

class PythonScript
class PythonObject
class PythonModule

Detailed Description

The PythonExtension is a wrapper-object to let C++ and Python interact together.

Instances of this class are used everytime if we send or got something to/from python.

Definition at line 48 of file pythonextension.h.

Constructor & Destructor Documentation

◆ PythonExtension()

PythonExtension::PythonExtension ( Kross::Api::Object::Ptr object)
explicit

Constructor.

Parameters
objectThe Kross::Api::Object object this instance is the wrapper for.

Definition at line 29 of file pythonextension.cpp.

◆ ~PythonExtension()

PythonExtension::~PythonExtension ( )
virtual

Destructor.

Definition at line 55 of file pythonextension.cpp.

Member Function Documentation

◆ getattr()

Py::Object PythonExtension::getattr ( const char * name)
virtual

Overloaded method to handle attribute calls from within python.

Parameters
nameThe name of the attribute that should be handled.
Returns
An Py::Object that could be a value or a callable object. Python will decide what to do with the returnvalue.

Definition at line 77 of file pythonextension.cpp.

◆ PythonModule

friend class PythonModule
friend

Definition at line 52 of file pythonextension.h.

◆ PythonObject

friend class PythonObject
friend

Definition at line 51 of file pythonextension.h.

◆ PythonScript

friend class PythonScript
friend

Definition at line 50 of file pythonextension.h.


The documentation for this class was generated from the following files: