LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Generator Struct Referenceabstract

Base class for C API generators. More...

#include <CommonCAPIGen.h>

Inheritance diagram for Generator:
[legend]

Public Member Functions

 Generator (std::string_view recordKind, llvm::raw_ostream &outputStream)
virtual ~Generator ()=default
virtual void setDialectAndClassName (const mlir::tblgen::Dialect *d, mlir::StringRef cppClassName)
 Set the dialect and class name for code generation.
virtual void genExtraMethods (mlir::StringRef extraDecl) const
 Generate code for extra methods from an extraClassDeclaration
virtual void genExtraMethod (const ExtraMethod &method) const =0
 Generate code for an extra method.

Protected Attributes

std::string kind
llvm::raw_ostream & os
std::string dialectNameCapitalized
const mlir::tblgen::Dialect * dialect
mlir::StringRef className

Detailed Description

Base class for C API generators.

Definition at line 323 of file CommonCAPIGen.h.

Constructor & Destructor Documentation

◆ Generator()

Generator::Generator ( std::string_view recordKind,
llvm::raw_ostream & outputStream )
inline

Definition at line 324 of file CommonCAPIGen.h.

◆ ~Generator()

virtual Generator::~Generator ( )
virtualdefault

Member Function Documentation

◆ genExtraMethod()

virtual void Generator::genExtraMethod ( const ExtraMethod & method) const
pure virtual

Generate code for an extra method.

Parameters
methodThe extra method to generate code for

Implemented in HeaderGenerator, ImplementationGenerator, and TestGenerator.

◆ genExtraMethods()

virtual void Generator::genExtraMethods ( mlir::StringRef extraDecl) const
inlinevirtual

Generate code for extra methods from an extraClassDeclaration

Parameters
extraDeclThe extra class declaration string

Definition at line 339 of file CommonCAPIGen.h.

◆ setDialectAndClassName()

virtual void Generator::setDialectAndClassName ( const mlir::tblgen::Dialect * d,
mlir::StringRef cppClassName )
inlinevirtual

Set the dialect and class name for code generation.

Parameters
dPointer to the dialect definition
cppClassNameThe C++ class name of the entity being generated

Definition at line 332 of file CommonCAPIGen.h.

Member Data Documentation

◆ className

mlir::StringRef Generator::className
protected

Definition at line 357 of file CommonCAPIGen.h.

◆ dialect

const mlir::tblgen::Dialect* Generator::dialect
protected

Definition at line 356 of file CommonCAPIGen.h.

◆ dialectNameCapitalized

std::string Generator::dialectNameCapitalized
protected

Definition at line 355 of file CommonCAPIGen.h.

◆ kind

std::string Generator::kind
protected

Definition at line 353 of file CommonCAPIGen.h.

◆ os

llvm::raw_ostream& Generator::os
protected

Definition at line 354 of file CommonCAPIGen.h.


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