CIRCT  20.0.0git
Public Member Functions | Private Attributes | List of all members
circt::ExportSystemC::InlineEmitter Class Reference

This class is returned to a pattern that requested inlined emission of a value. More...

#include <EmissionPrinter.h>

Collaboration diagram for circt::ExportSystemC::InlineEmitter:
Collaboration graph
[legend]

Public Member Functions

 InlineEmitter (std::function< void()> emitter, Precedence precedence, EmissionPrinter &printer)
 
Precedence getPrecedence () const
 
void emit () const
 
void emitWithParensOnLowerPrecedence (Precedence prec, StringRef lParen="(", StringRef rParen=")") const
 

Private Attributes

Precedence precedence
 
std::function< void()> emitter
 
EmissionPrinterprinter
 

Detailed Description

This class is returned to a pattern that requested inlined emission of a value.

It allows the pattern to emit additional characters before the requested expression depending on the precedence.

Definition at line 127 of file EmissionPrinter.h.

Constructor & Destructor Documentation

◆ InlineEmitter()

circt::ExportSystemC::InlineEmitter::InlineEmitter ( std::function< void()>  emitter,
Precedence  precedence,
EmissionPrinter printer 
)
inline

Definition at line 129 of file EmissionPrinter.h.

Member Function Documentation

◆ emit()

void circt::ExportSystemC::InlineEmitter::emit ( ) const
inline

Definition at line 134 of file EmissionPrinter.h.

References emitter.

Referenced by BindPortEmitter::emitStatement(), and ReturnEmitter::emitStatement().

◆ emitWithParensOnLowerPrecedence()

void InlineEmitter::emitWithParensOnLowerPrecedence ( Precedence  prec,
StringRef  lParen = "(",
StringRef  rParen = ")" 
) const

◆ getPrecedence()

Precedence circt::ExportSystemC::InlineEmitter::getPrecedence ( ) const
inline

Definition at line 133 of file EmissionPrinter.h.

References precedence.

Member Data Documentation

◆ emitter

std::function<void()> circt::ExportSystemC::InlineEmitter::emitter
private

Definition at line 140 of file EmissionPrinter.h.

Referenced by emit(), and emitWithParensOnLowerPrecedence().

◆ precedence

Precedence circt::ExportSystemC::InlineEmitter::precedence
private

Definition at line 139 of file EmissionPrinter.h.

Referenced by emitWithParensOnLowerPrecedence(), and getPrecedence().

◆ printer

EmissionPrinter& circt::ExportSystemC::InlineEmitter::printer
private

Definition at line 141 of file EmissionPrinter.h.

Referenced by emitWithParensOnLowerPrecedence().


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