slang::ClassType class

Represents a class definition type.

Base classes

class Type
class Scope

Public functions

auto getBaseClass() const -> const Type*
If this class derives from a base class, returns that type. Otherwise returns null.
auto getImplementedInterfaces() const -> span<const Type*const >
void checkForwardDecls() const

Public variables

const GenericClassDefSymbol* genericClass
bool isAbstract
bool isInterface
Set to true if the class is an interface class.

Function documentation

span<const Type*const > slang::ClassType::getImplementedInterfaces() const

Gets the list of interface classes that this class implements. If this class is itself an interface class, this is instead the list of interface classes that it extends from, if any.

Note that this list is flattened from the full set of all interfaces implemented by any base classes or interface class parents, up the inheritance hierarchy.

void slang::ClassType::checkForwardDecls() const

Checks all forward declarations for validity when considering the target type of this alias. Any inconsistencies will issue diagnostics.

Variable documentation

const GenericClassDefSymbol* slang::ClassType::genericClass

If the class type was specialized from a generic class, this is a pointer to that generic class definition.

bool slang::ClassType::isAbstract

Set to true if the class is an abstract class (declared with the "virtual" keyword).