MLIR
15.0.0git
|
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 (InterfaceMap &&)=default | |
InterfaceMap & | operator= (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... | |
InterfaceMap (MutableArrayRef< std::pair< TypeID, void *>> elements) | |
Create an InterfaceMap given with the implementation of the interfaces. More... | |
template<typename... IfaceModels> | |
void | insert () |
Insert the given models as implementations of the corresponding interfaces for the concrete attribute class. More... | |
Static Public Member Functions | |
template<typename... Types> | |
static InterfaceMap | get () |
Construct an InterfaceMap with the given set of template types. More... | |
This class provides an efficient mapping between a given Interface
type, and a particular implementation of its concept.
Definition at line 161 of file InterfaceSupport.h.
|
default |
|
inline |
Definition at line 178 of file InterfaceSupport.h.
detail::InterfaceMap::InterfaceMap | ( | MutableArrayRef< std::pair< TypeID, void *>> | elements | ) |
Create an InterfaceMap given with the implementation of the interfaces.
The use of this constructor is in general discouraged in favor of 'InterfaceMap::get<InterfaceA, ...>()'.
Definition at line 21 of file InterfaceSupport.cpp.
|
inline |
Returns true if the interface map contains an interface for the given id.
Definition at line 209 of file InterfaceSupport.h.
|
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 188 of file InterfaceSupport.h.
References value.
|
inline |
Insert the given models as implementations of the corresponding interfaces for the concrete attribute class.
Definition at line 219 of file InterfaceSupport.h.
References mlir::presburger::compare(), and value.
|
inline |
Returns an instance of the concept object for the given interface if it was registered to this map, null otherwise.
Definition at line 204 of file InterfaceSupport.h.
|
inline |
Definition at line 172 of file InterfaceSupport.h.