Kross::Python::PythonScript Class Reference

#include <pythonscript.h>

Inheritance diagram for Kross::Python::PythonScript:
Kross::Api::Script

Public Member Functions

 PythonScript (Kross::Api::Interpreter *interpreter, Kross::Api::ScriptContainer *scriptcontainer)
 
virtual ~PythonScript ()
 
virtual const TQStringList & getFunctionNames ()
 
virtual Kross::Api::Object::Ptr execute ()
 
virtual Kross::Api::Object::Ptr callFunction (const TQString &name, Kross::Api::List::Ptr args)
 
virtual const TQStringList & getClassNames ()
 
virtual Kross::Api::Object::Ptr classInstance (const TQString &name)
 
- Public Member Functions inherited from Kross::Api::Script
 Script (Interpreter *const interpreter, ScriptContainer *const scriptcontainer)
 
virtual ~Script ()
 
bool hadException ()
 
Exception::Ptr getException ()
 
void setException (Exception::Ptr e)
 
void clearException ()
 

Additional Inherited Members

- Protected Attributes inherited from Kross::Api::Script
Interpreter *const m_interpreter
 
ScriptContainer *const m_scriptcontainer
 

Detailed Description

Handle python scripts.

This class implements Kross::Api::Script for python.

Definition at line 36 of file pythonscript.h.

Constructor & Destructor Documentation

◆ PythonScript()

PythonScript::PythonScript ( Kross::Api::Interpreter *  interpreter,
Kross::Api::ScriptContainer *  scriptcontainer 
)
explicit

Constructor.

Parameters
interpreterThe Kross::Python::PythonInterpreter used to create this PythonScript instance.
scriptcontainerThe with this PythonScript associated Kross::Api::ScriptContainer instance that spends us e.g. the python scripting code.

Definition at line 64 of file pythonscript.cpp.

◆ ~PythonScript()

PythonScript::~PythonScript ( )
virtual

Destructor.

Definition at line 75 of file pythonscript.cpp.

Member Function Documentation

◆ callFunction()

Kross::Api::Object::Ptr PythonScript::callFunction ( const TQString &  name,
Kross::Api::List::Ptr  args 
)
virtual

Call a function.

Implements Kross::Api::Script.

Definition at line 368 of file pythonscript.cpp.

◆ classInstance()

Kross::Api::Object::Ptr PythonScript::classInstance ( const TQString &  name)
virtual

Create and return a new class instance.

Implements Kross::Api::Script.

Definition at line 421 of file pythonscript.cpp.

◆ execute()

Kross::Api::Object::Ptr PythonScript::execute ( )
virtual

Execute the script.

Implements Kross::Api::Script.

Definition at line 272 of file pythonscript.cpp.

◆ getClassNames()

const TQStringList & PythonScript::getClassNames ( )
virtual

Return a list of class types this script supports.

Implements Kross::Api::Script.

Definition at line 414 of file pythonscript.cpp.

◆ getFunctionNames()

const TQStringList & PythonScript::getFunctionNames ( )
virtual

Return a list of callable functionnames this script spends.

Implements Kross::Api::Script.

Definition at line 257 of file pythonscript.cpp.


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