top | up | prev | next

TemplateParameterSymbol Abstract Class

Definition at line 12 of TemplateSymbol.hpp

Constructors

TemplateParameterSymbol(const Span& span_, const boost::uuids::uuid& sourceModuleId_, const std::u32string& name_)

Member Functions

const char* ClassName() const override
bool ContainsTemplateParameter() const override
void* CreateDefaultIrValue(Emitter& emitter) override
TypeSymbol* DefaultType()
void EmplaceType(TypeSymbol* typeSymbol, int index) override
std::u32string FullName() const override
std::string GetSymbolCategoryDescription() const override
std::string GetSymbolCategoryStr() const override
bool HasDefault() const
std::u32string Info() const override
void* IrType(Emitter& emitter) override
void Read(SymbolReader& reader) override
void SetDefaultType(TypeSymbol* defaultType_)
void SetHasDefault()
TypeSymbol* Unify(TypeSymbol* type, const Span& span, const boost::uuids::uuid& moduleId) override
TypeSymbol* UnifyTemplateArgumentType(SymbolTable& symbolTable, const std::unordered_map<TemplateParameterSymbol*, TypeSymbol*>& templateParameterMap, const Span& span, const boost::uuids::uuid& moduleId) override
void Write(SymbolWriter& writer) override

Member Variables

TypeSymbol* defaultType
bool hasDefault

Constructor Details

TemplateParameterSymbol Constructor

cmajor::symbols::TemplateParameterSymbol::TemplateParameterSymbol(const Span& span_, const boost::uuids::uuid& sourceModuleId_, const std::u32string& name_)

Definition at line 20 of TemplateSymbol.cpp :
 20 :
 21 TypeSymbol(SymbolType::templateParameterSymbolspan_sourceModuleId_name_)hasDefault(false)defaultType(nullptr)
 22 {
 23 }


Declaration at line 15 of TemplateSymbol.hpp


Member Function Details

ClassName Member Function

const char * cmajor::symbols::TemplateParameterSymbol::ClassName() const override

Definition at line 30 of TemplateSymbol.hpp :
30 { return "TemplateParameterSymbol"; }

Base class overridden functions: cmajor::symbols::ContainerSymbol::ClassName , cmajor::symbols::Symbol::ClassName , cmajor::symbols::TypeSymbol::ClassName


ContainsTemplateParameter Member Function

bool cmajor::symbols::TemplateParameterSymbol::ContainsTemplateParameter() const override

Definition at line 23 of TemplateSymbol.hpp :
23 { return true; }

Base class overridden functions: cmajor::symbols::TypeSymbol::ContainsTemplateParameter


CreateDefaultIrValue Member Function

void * cmajor::symbols::TemplateParameterSymbol::CreateDefaultIrValue(Emitter& emitter) override

Definition at line 21 of TemplateSymbol.hpp :
21 { Assert(false"tried to create defualt ir value of template parameter"); return nullptr; }


DefaultType Member Function

TypeSymbol * cmajor::symbols::TemplateParameterSymbol::DefaultType()

Definition at line 27 of TemplateSymbol.hpp :
27 { return defaultType; }


EmplaceType Member Function

void cmajor::symbols::TemplateParameterSymbol::EmplaceType(TypeSymbol * typeSymbol, int index) override

Definition at line 55 of TemplateSymbol.cpp :
 56 {
 57     Assert(index == 0"invalid emplace type index");
 58     defaultType = typeSymbol;
 59 }


Declaration at line 19 of TemplateSymbol.hpp

Base class overridden functions: cmajor::symbols::Symbol::EmplaceType


FullName Member Function

std::u32string cmajor::symbols::TemplateParameterSymbol::FullName() const override

Definition at line 16 of TemplateSymbol.hpp :
16 { return Name(); }

Base class overridden functions: cmajor::symbols::Symbol::FullName

Calls: cmajor::symbols::Symbol::Name


GetSymbolCategoryDescription Member Function

std::string cmajor::symbols::TemplateParameterSymbol::GetSymbolCategoryDescription() const override

Definition at line 32 of TemplateSymbol.hpp :
32 { return "template parameter"; }

Base class overridden functions: cmajor::symbols::Symbol::GetSymbolCategoryDescription


GetSymbolCategoryStr Member Function

std::string cmajor::symbols::TemplateParameterSymbol::GetSymbolCategoryStr() const override

Definition at line 31 of TemplateSymbol.hpp :
31 { return "TP"; }

Base class overridden functions: cmajor::symbols::Symbol::GetSymbolCategoryStr


HasDefault Member Function

bool cmajor::symbols::TemplateParameterSymbol::HasDefault() const

Definition at line 24 of TemplateSymbol.hpp :
24 { return hasDefault; }

Called by: cmajor::symbols::ClassTypeSymbol::ComputeMinArity


Info Member Function

std::u32string cmajor::symbols::TemplateParameterSymbol::Info() const override

Definition at line 29 of TemplateSymbol.hpp :
29 { return Name(); }

Base class overridden functions: cmajor::symbols::Symbol::Info

Calls: cmajor::symbols::Symbol::Name


IrType Member Function

void * cmajor::symbols::TemplateParameterSymbol::IrType(Emitter& emitter) override

Definition at line 20 of TemplateSymbol.hpp :
20 { Assert(false"tried to get ir type of template parameter"); return nullptr; }


Read Member Function

void cmajor::symbols::TemplateParameterSymbol::Read(SymbolReader & reader) override

Definition at line 40 of TemplateSymbol.cpp
Declaration at line 18 of TemplateSymbol.hpp

Base class overridden functions: cmajor::symbols::ContainerSymbol::Read , cmajor::symbols::Symbol::Read , cmajor::symbols::TypeSymbol::Read

Calls: cmajor::symbols::SymbolReader::GetBinaryReader , cmajor::symbols::SymbolReader::GetSymbolTable , cmajor::symbols::SymbolTable::EmplaceTypeRequest , cmajor::symbols::TypeSymbol::Read


SetDefaultType Member Function

void cmajor::symbols::TemplateParameterSymbol::SetDefaultType(TypeSymbol * defaultType_)

Definition at line 26 of TemplateSymbol.hpp :
26 { defaultType = defaultType_; }


SetHasDefault Member Function

void cmajor::symbols::TemplateParameterSymbol::SetHasDefault()

Definition at line 25 of TemplateSymbol.hpp :
25 { hasDefault = true; }

Called by: cmajor::symbols::SymbolTable::AddTemplateParameter


Unify Member Function

TypeSymbol * cmajor::symbols::TemplateParameterSymbol::Unify(TypeSymbol * type, const Span& span, const boost::uuids::uuid& moduleId) override

Definition at line 61 of TemplateSymbol.cpp :
 62 {
 63     return type;
 64 }


Declaration at line 22 of TemplateSymbol.hpp

Base class overridden functions: cmajor::symbols::TypeSymbol::Unify


UnifyTemplateArgumentType Member Function

TypeSymbol * cmajor::symbols::TemplateParameterSymbol::UnifyTemplateArgumentType(SymbolTable & symbolTable, const std::unordered_map<TemplateParameterSymbol *, TypeSymbol *>& templateParameterMap, const Span& span, const boost::uuids::uuid& moduleId) override

Definition at line 66 of TemplateSymbol.cpp
Declaration at line 28 of TemplateSymbol.hpp

Base class overridden functions: cmajor::symbols::TypeSymbol::UnifyTemplateArgumentType


Write Member Function

void cmajor::symbols::TemplateParameterSymbol::Write(SymbolWriter & writer) override

Definition at line 25 of TemplateSymbol.cpp
Declaration at line 17 of TemplateSymbol.hpp

Base class overridden functions: cmajor::symbols::ContainerSymbol::Write , cmajor::symbols::Symbol::Write , cmajor::symbols::TypeSymbol::Write

Calls: cmajor::symbols::SymbolWriter::GetBinaryWriter , cmajor::symbols::TemplateParameterSymbol::Write , cmajor::symbols::TypeSymbol::TypeId , cmajor::symbols::TypeSymbol::Write

Called by: cmajor::symbols::TemplateParameterSymbol::Write


top | up | prev | next