Mantid
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions
MantidQt::Widgets::Common::Python Namespace Reference

Namespaces

namespace  Detail
 

Classes

class  CodeExecution
 The CodeExecution class support execution of arbitrary Python code with the option to install a trace handler to track lines executed and tell an editor to mark them appropriately. More...
 
class  InstanceHolder
 Holds a Python instance of an object with a method to access it. More...
 

Typedefs

using Dict = boost::python::dict
 
using ErrorAlreadySet = boost::python::error_already_set
 
template<typename T = PyObject>
using Handle = boost::python::handle< T >
 
using KwArgs = QHash< QString, QVariant >
 
using List = boost::python::list
 
using Object = boost::python::object
 
template<typename T >
using ToPythonValue = boost::python::to_python_value< T >
 

Functions

Python::Object BorrowedRef (PyObject *obj)
 
template<typename T >
T * extract (const Object &obj)
 Extract a C++ object of type T from the Python object. More...
 
ssize_t Len (const Python::Object &obj)
 
Python::Object NewRef (PyObject *obj)
 
EXPORT_OPT_MANTIDQT_COMMON Python::Dict qHashToDict (const KwArgs &hash)
 

Typedef Documentation

◆ Dict

using MantidQt::Widgets::Common::Python::Dict = typedef boost::python::dict

Definition at line 30 of file Object.h.

◆ ErrorAlreadySet

using MantidQt::Widgets::Common::Python::ErrorAlreadySet = typedef boost::python::error_already_set

Definition at line 59 of file Object.h.

◆ Handle

template<typename T = PyObject>
using MantidQt::Widgets::Common::Python::Handle = typedef boost::python::handle<T>

Definition at line 34 of file Object.h.

◆ KwArgs

using MantidQt::Widgets::Common::Python::KwArgs = typedef QHash<QString, QVariant>

Definition at line 19 of file QHashToDict.h.

◆ List

using MantidQt::Widgets::Common::Python::List = typedef boost::python::list

Definition at line 31 of file Object.h.

◆ Object

using MantidQt::Widgets::Common::Python::Object = typedef boost::python::object

Definition at line 29 of file Object.h.

◆ ToPythonValue

template<typename T >
using MantidQt::Widgets::Common::Python::ToPythonValue = typedef boost::python::to_python_value<T>

Definition at line 37 of file Object.h.

Function Documentation

◆ BorrowedRef()

Python::Object MantidQt::Widgets::Common::Python::BorrowedRef ( PyObject *  obj)
inline

Definition at line 51 of file Object.h.

References obj.

◆ extract()

template<typename T >
T * MantidQt::Widgets::Common::Python::extract ( const Object obj)

Extract a C++ object of type T from the Python object.

Parameters
objA sip-wrapped Python object

Definition at line 27 of file Sip.h.

References extract(), obj, and MantidQt::Widgets::Common::Python::Detail::sipAPI().

Referenced by extract().

◆ Len()

ssize_t MantidQt::Widgets::Common::Python::Len ( const Python::Object obj)
inline

Definition at line 40 of file Object.h.

References obj.

◆ NewRef()

Python::Object MantidQt::Widgets::Common::Python::NewRef ( PyObject *  obj)
inline

Definition at line 43 of file Object.h.

References obj.

◆ qHashToDict()

Python::Dict MantidQt::Widgets::Common::Python::qHashToDict ( const KwArgs hash)