MLIR 22.0.0git
mlir::detail::DialectInterfaceCollectionBase Class Reference

This class is the base class for a collection of instances for a specific interface kind. More...

#include "mlir/IR/DialectInterface.h"

Inheritance diagram for mlir::detail::DialectInterfaceCollectionBase:

Classes

struct  iterator
 An iterator class that iterates the held interface objects of the given derived interface type. More...

Public Member Functions

 DialectInterfaceCollectionBase (MLIRContext *ctx, TypeID interfaceKind, StringRef interfaceName)
virtual ~DialectInterfaceCollectionBase ()

Protected Member Functions

const DialectInterfacegetInterfaceFor (Operation *op) const
 Get the interface for the dialect of given operation, or null if one is not registered.
const DialectInterfacegetInterfaceFor (Dialect *dialect) const
 Get the interface for the given dialect.
template<typename InterfaceT>
iterator< InterfaceT > interface_begin () const
 Iterator access to the held interfaces.
template<typename InterfaceT>
iterator< InterfaceT > interface_end () const

Detailed Description

This class is the base class for a collection of instances for a specific interface kind.

Definition at line 79 of file DialectInterface.h.

Constructor & Destructor Documentation

◆ DialectInterfaceCollectionBase()

DialectInterfaceCollectionBase::DialectInterfaceCollectionBase ( MLIRContext * ctx,
TypeID interfaceKind,
StringRef interfaceName )

◆ ~DialectInterfaceCollectionBase()

DialectInterfaceCollectionBase::~DialectInterfaceCollectionBase ( )
virtualdefault

Member Function Documentation

◆ getInterfaceFor() [1/2]

const DialectInterface * mlir::detail::DialectInterfaceCollectionBase::getInterfaceFor ( Dialect * dialect) const
inlineprotected

Get the interface for the given dialect.

Definition at line 111 of file DialectInterface.h.

References nullptr.

◆ getInterfaceFor() [2/2]

const DialectInterface * DialectInterfaceCollectionBase::getInterfaceFor ( Operation * op) const
protected

Get the interface for the dialect of given operation, or null if one is not registered.

Definition at line 140 of file Dialect.cpp.

References mlir::Operation::getDialect(), and getInterfaceFor().

Referenced by getInterfaceFor(), and mlir::DialectInterfaceCollection< InterfaceType >::getInterfaceFor().

◆ interface_begin()

template<typename InterfaceT>
iterator< InterfaceT > mlir::detail::DialectInterfaceCollectionBase::interface_begin ( ) const
inlineprotected

Iterator access to the held interfaces.

Definition at line 135 of file DialectInterface.h.

Referenced by mlir::DialectInterfaceCollection< InterfaceType >::begin().

◆ interface_end()

template<typename InterfaceT>
iterator< InterfaceT > mlir::detail::DialectInterfaceCollectionBase::interface_end ( ) const
inlineprotected

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