MLIR 22.0.0git
mlir::AttrTypeBytecodeReader< T > Class Template Referenceabstract

A class to interact with the attributes and types parser when parsing MLIR bytecode. More...

#include "mlir/Bytecode/BytecodeReaderConfig.h"

Public Member Functions

 AttrTypeBytecodeReader ()=default
virtual ~AttrTypeBytecodeReader ()=default
virtual LogicalResult read (DialectBytecodeReader &reader, StringRef dialectName, T &entry)=0

Static Public Member Functions

template<typename CallableT, std::enable_if_t< std::is_convertible_v< CallableT, std::function< LogicalResult(DialectBytecodeReader &, StringRef, T &)> >, bool > = true>
static std::unique_ptr< AttrTypeBytecodeReader< T > > fromCallable (CallableT &&readFn)
 Return an Attribute/Type printer implemented via the given callable, whose form should match that of the parse function above.

Detailed Description

template<class T>
class mlir::AttrTypeBytecodeReader< T >

A class to interact with the attributes and types parser when parsing MLIR bytecode.

Definition at line 29 of file BytecodeReaderConfig.h.

Constructor & Destructor Documentation

◆ AttrTypeBytecodeReader()

template<class T>
mlir::AttrTypeBytecodeReader< T >::AttrTypeBytecodeReader ( )
default

Referenced by fromCallable().

◆ ~AttrTypeBytecodeReader()

template<class T>
virtual mlir::AttrTypeBytecodeReader< T >::~AttrTypeBytecodeReader ( )
virtualdefault

Member Function Documentation

◆ fromCallable()

template<class T>
template<typename CallableT, std::enable_if_t< std::is_convertible_v< CallableT, std::function< LogicalResult(DialectBytecodeReader &, StringRef, T &)> >, bool > = true>
std::unique_ptr< AttrTypeBytecodeReader< T > > mlir::AttrTypeBytecodeReader< T >::fromCallable ( CallableT && readFn)
inlinestatic

Return an Attribute/Type printer implemented via the given callable, whose form should match that of the parse function above.

Definition at line 46 of file BytecodeReaderConfig.h.

References AttrTypeBytecodeReader(), and read().

Referenced by mlir::BytecodeReaderConfig::attachAttributeCallback(), and mlir::BytecodeReaderConfig::attachTypeCallback().

◆ read()

template<class T>
virtual LogicalResult mlir::AttrTypeBytecodeReader< T >::read ( DialectBytecodeReader & reader,
StringRef dialectName,
T & entry )
pure virtual

Referenced by fromCallable().


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