MLIR  19.0.0git
Classes | Public Member Functions | Protected Member Functions | List of all members
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. More...
 
const DialectInterfacegetInterfaceFor (Dialect *dialect) const
 Get the interface for the given dialect. More...
 
template<typename InterfaceT >
iterator< InterfaceT > interface_begin () const
 Iterator access to the held interfaces. More...
 
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 78 of file DialectInterface.h.

Constructor & Destructor Documentation

◆ DialectInterfaceCollectionBase()

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

Definition at line 124 of file Dialect.cpp.

References mlir::MLIRContext::getLoadedDialects().

◆ ~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 110 of file DialectInterface.h.

◆ 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 143 of file Dialect.cpp.

Referenced by 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 134 of file DialectInterface.h.

◆ interface_end()

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

Definition at line 138 of file DialectInterface.h.


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