slang::ClassBuilder class

A helper class for constructing class types programmatically.

Contents

Public functions

auto addMethod(string_view name, const Type& returnType, SubroutineKind kind = SubroutineKind::Function) -> MethodBuilder

Public variables

Compilation& compilation
The compilation used to construct symbols.
ClassType& type
The class type being constructed.

Function documentation

MethodBuilder slang::ClassBuilder::addMethod(string_view name, const Type& returnType, SubroutineKind kind = SubroutineKind::Function)

Adds a method to the class with the given properties. The returned builder object can be used to modify the method further.