MLIR 23.0.0git
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy > Class Template Reference

CRTP base class for Python classes that subclass Location and should be castable from it (i.e. More...

#include "mlir/Bindings/Python/IRCore.h"

Inheritance diagram for mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >:

Public Types

using ClassTy = nanobind::class_<DerivedTy, BaseTy>
using IsAFunctionTy = bool (*)(MlirLocation)
using GetTypeIDFunctionTy = MlirTypeID (*)()
using Base = PyConcreteLocation

Public Member Functions

 PyConcreteLocation ()=default
 PyConcreteLocation (PyMlirContextRef contextRef, MlirLocation loc)
 PyConcreteLocation (PyLocation &orig)
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation
 PyLocation (PyMlirContextRef contextRef, MlirLocation loc)
 operator MlirLocation () const
MlirLocation get () const
void contextExit (const nanobind::object &excType, const nanobind::object &excVal, const nanobind::object &excTb)
nanobind::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirLocation.
nanobind::typed< nanobind::object, PyLocationmaybeDownCast ()
 Returns the most-derived Location subclass registered for this TypeID, or self.
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject
 BaseContextObject (PyMlirContextRef ref)
PyMlirContextRefgetContext ()
 Accesses the context reference.

Static Public Member Functions

static MlirLocation castFrom (PyLocation &orig)
static void bind (nanobind::module_ &m)
static void bindDerived (ClassTy &m)
 Implemented by derived classes to add methods to the Python subclass.
Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation
static nanobind::object contextEnter (nanobind::object location)
 Enter and exit the context manager.
static PyLocation createFromCapsule (nanobind::object capsule)
 Creates a PyLocation from the MlirLocation wrapped by a capsule.

Static Public Attributes

static constexpr GetTypeIDFunctionTy getTypeIdFunction = nullptr

Detailed Description

template<typename DerivedTy, typename BaseTy = PyLocation>
class mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >

CRTP base class for Python classes that subclass Location and should be castable from it (i.e.

via something like FileLineColLoc(loc)).

Definition at line 1174 of file IRCore.h.

Member Typedef Documentation

◆ Base

template<typename DerivedTy, typename BaseTy = PyLocation>
using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::Base = PyConcreteLocation

Definition at line 1183 of file IRCore.h.

◆ ClassTy

template<typename DerivedTy, typename BaseTy = PyLocation>
using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::ClassTy = nanobind::class_<DerivedTy, BaseTy>

Definition at line 1179 of file IRCore.h.

◆ GetTypeIDFunctionTy

template<typename DerivedTy, typename BaseTy = PyLocation>
using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::GetTypeIDFunctionTy = MlirTypeID (*)()

Definition at line 1181 of file IRCore.h.

◆ IsAFunctionTy

template<typename DerivedTy, typename BaseTy = PyLocation>
using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::IsAFunctionTy = bool (*)(MlirLocation)

Definition at line 1180 of file IRCore.h.

Constructor & Destructor Documentation

◆ PyConcreteLocation() [1/3]

template<typename DerivedTy, typename BaseTy = PyLocation>
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::PyConcreteLocation ( )
default

Referenced by PyConcreteLocation().

◆ PyConcreteLocation() [2/3]

template<typename DerivedTy, typename BaseTy = PyLocation>
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::PyConcreteLocation ( PyMlirContextRef contextRef,
MlirLocation loc )
inline

Definition at line 1186 of file IRCore.h.

◆ PyConcreteLocation() [3/3]

Member Function Documentation

◆ bind()

◆ bindDerived()

template<typename DerivedTy, typename BaseTy = PyLocation>
void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::bindDerived ( ClassTy & m)
inlinestatic

Implemented by derived classes to add methods to the Python subclass.

Definition at line 1233 of file IRCore.h.

◆ castFrom()

template<typename DerivedTy, typename BaseTy = PyLocation>
MlirLocation mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::castFrom ( PyLocation & orig)
inlinestatic

Member Data Documentation

◆ getTypeIdFunction

template<typename DerivedTy, typename BaseTy = PyLocation>
GetTypeIDFunctionTy mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteLocation< DerivedTy, BaseTy >::getTypeIdFunction = nullptr
staticconstexpr

Definition at line 1182 of file IRCore.h.


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