MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::detail::InterfaceMap Class Reference

This class provides an efficient mapping between a given Interface type, and a particular implementation of its concept. More...

#include "mlir/Support/InterfaceSupport.h"

Public Member Functions

 InterfaceMap ()=default
 
 InterfaceMap (InterfaceMap &&)=default
 
InterfaceMapoperator= (InterfaceMap &&rhs)
 
 ~InterfaceMap ()
 
template<typename T >
T::Concept * lookup () const
 Returns an instance of the concept object for the given interface if it was registered to this map, null otherwise. More...
 
bool contains (TypeID interfaceID) const
 Returns true if the interface map contains an interface for the given id. More...
 
template<typename... IfaceModels>
void insertModels ()
 Insert the given interface models. More...
 

Static Public Member Functions

template<typename... Types>
static InterfaceMap get ()
 Construct an InterfaceMap with the given set of template types. More...
 

Detailed Description

This class provides an efficient mapping between a given Interface type, and a particular implementation of its concept.

Definition at line 157 of file InterfaceSupport.h.

Constructor & Destructor Documentation

◆ InterfaceMap() [1/2]

mlir::detail::InterfaceMap::InterfaceMap ( )
default

Referenced by get().

◆ InterfaceMap() [2/2]

mlir::detail::InterfaceMap::InterfaceMap ( InterfaceMap &&  )
default

◆ ~InterfaceMap()

mlir::detail::InterfaceMap::~InterfaceMap ( )
inline

Definition at line 183 of file InterfaceSupport.h.

Member Function Documentation

◆ contains()

bool mlir::detail::InterfaceMap::contains ( TypeID  interfaceID) const
inline

Returns true if the interface map contains an interface for the given id.

Definition at line 211 of file InterfaceSupport.h.

References lookup().

Referenced by mlir::AbstractAttribute::hasInterface(), mlir::OperationName::hasInterface(), and mlir::AbstractType::hasInterface().

◆ get()

template<typename... Types>
static InterfaceMap mlir::detail::InterfaceMap::get ( )
inlinestatic

Construct an InterfaceMap with the given set of template types.

For convenience given that object trait lists may contain other non-interface types, not all of the types need to be interfaces. The provided types that do not represent interfaces are not added to the interface map.

Definition at line 193 of file InterfaceSupport.h.

References InterfaceMap().

◆ insertModels()

template<typename... IfaceModels>
void mlir::detail::InterfaceMap::insertModels ( )
inline

Insert the given interface models.

Definition at line 215 of file InterfaceSupport.h.

Referenced by mlir::OperationName::attachInterface().

◆ lookup()

template<typename T >
T::Concept* mlir::detail::InterfaceMap::lookup ( ) const
inline

Returns an instance of the concept object for the given interface if it was registered to this map, null otherwise.

Definition at line 206 of file InterfaceSupport.h.

Referenced by contains(), mlir::AbstractAttribute::getInterface(), mlir::OperationName::getInterface(), and mlir::AbstractType::getInterface().

◆ operator=()

InterfaceMap& mlir::detail::InterfaceMap::operator= ( InterfaceMap &&  rhs)
inline

Definition at line 177 of file InterfaceSupport.h.


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