MLIR  15.0.0git
Public Types | Public Member Functions | List of all members
mlir::python::adaptors::mlir_type_subclass Class Reference

Creates a custom subclass of mlir.ir.Type, implementing a casting constructor and type checking methods. More...

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

+ Inheritance diagram for mlir::python::adaptors::mlir_type_subclass:
+ Collaboration diagram for mlir::python::adaptors::mlir_type_subclass:

Public Types

using IsAFunctionTy = bool(*)(MlirType)
 

Public Member Functions

 mlir_type_subclass (py::handle scope, const char *typeClassName, IsAFunctionTy isaFunction)
 Subclasses by looking up the super-class dynamically. More...
 
 mlir_type_subclass (py::handle scope, const char *typeClassName, IsAFunctionTy isaFunction, const py::object &superCls)
 Subclasses with a provided mlir.ir.Type super-class. More...
 
- Public Member Functions inherited from mlir::python::adaptors::pure_subclass
 pure_subclass (py::handle scope, const char *derivedClassName, const py::object &superClass)
 
template<typename Func , typename... Extra>
pure_subclassdef (const char *name, Func &&f, const Extra &... extra)
 
template<typename Func , typename... Extra>
pure_subclassdef_property_readonly (const char *name, Func &&f, const Extra &... extra)
 
template<typename Func , typename... Extra>
pure_subclassdef_staticmethod (const char *name, Func &&f, const Extra &... extra)
 
template<typename Func , typename... Extra>
pure_subclassdef_classmethod (const char *name, Func &&f, const Extra &... extra)
 
py::object get_class () const
 

Additional Inherited Members

- Protected Attributes inherited from mlir::python::adaptors::pure_subclass
py::object superClass
 
py::object thisClass
 

Detailed Description

Creates a custom subclass of mlir.ir.Type, implementing a casting constructor and type checking methods.

Definition at line 367 of file PybindAdaptors.h.

Member Typedef Documentation

◆ IsAFunctionTy

Definition at line 369 of file PybindAdaptors.h.

Constructor & Destructor Documentation

◆ mlir_type_subclass() [1/2]

mlir::python::adaptors::mlir_type_subclass::mlir_type_subclass ( py::handle  scope,
const char *  typeClassName,
IsAFunctionTy  isaFunction 
)
inline

Subclasses by looking up the super-class dynamically.

Definition at line 372 of file PybindAdaptors.h.

◆ mlir_type_subclass() [2/2]

mlir::python::adaptors::mlir_type_subclass::mlir_type_subclass ( py::handle  scope,
const char *  typeClassName,
IsAFunctionTy  isaFunction,
const py::object &  superCls 
)
inline

Subclasses with a provided mlir.ir.Type super-class.

This must be used if the subclass is being defined in the same extension module as the mlir.ir class (otherwise, it will trigger a recursive initialization).

Definition at line 382 of file PybindAdaptors.h.


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