top | up | prev | next

ClassTemplateSpecializationSymbol Abstract Class

Definition at line 37 of ClassTemplateSpecializationSymbol.hpp

Constructors

ClassTemplateSpecializationSymbol(const Span& span_, const boost::uuids::uuid& sourceModuleId_, const std::u32string& name_)
ClassTemplateSpecializationSymbol(const Span& span_, const boost::uuids::uuid& sourceModuleId_, std::u32string& name_, ClassTypeSymbol* classTemplate_, const std::vector<TypeSymbol*>& templateArgumentTypes_)

Member Functions

void Check() override
const char* ClassName() const override
void EmplaceType(TypeSymbol* typeSymbol, int index) override
const ContainerScope* GetArrowScope() const override
ContainerScope* GetArrowScope() override
ClassTypeSymbol* GetClassTemplate()
bool GetFlag(ClassTemplateSpecializationFlags flag) const
std::string GetSymbolCategoryDescription() const override
std::string GetSymbolCategoryStr() const override
Node* GlobalNs()
bool HasFullInstantiation() const
std::u32string Id() const override
void* IrType(Emitter& emitter) override
bool IsConstraintChecked()
bool IsPrototype() const
bool IsPrototypeTemplateSpecialization() const override
void Read(SymbolReader& reader) override
FileScope* ReleaseFileScope()
void ResetFlag(ClassTemplateSpecializationFlags flag)
void ResetHasFullInstantiation()
void SetConstraintChecked()
void SetFileScope(FileScope* fileScope_)
void SetFlag(ClassTemplateSpecializationFlags flag)
void SetGlobalNs(std::unique_ptr<Node>&& globalNs_)
void SetHasFullInstantiation()
void SetPrototype()
std::u32string SimpleName() const override
const std::vector<TypeSymbol*>& TemplateArgumentTypes() const
std::vector<TypeSymbol*>& TemplateArgumentTypes()
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

ClassTypeSymbol* classTemplate
std::unique_ptr<FileScope> fileScope
ClassTemplateSpecializationFlags flags
std::unique_ptr<Node> globalNs
std::vector<TypeSymbol*> templateArgumentTypes

Constructor Details

ClassTemplateSpecializationSymbol Constructor

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

Definition at line 37 of ClassTemplateSpecializationSymbol.cpp :
 37 :
 38 ClassTypeSymbol(SymbolType::classTemplateSpecializationSymbolspan_sourceModuleId_name_)classTemplate(nullptr)templateArgumentTypes()flags(ClassTemplateSpecializationFlags::none)
 39 {
 40 }


Declaration at line 40 of ClassTemplateSpecializationSymbol.hpp


ClassTemplateSpecializationSymbol Constructor

cmajor::symbols::ClassTemplateSpecializationSymbol::ClassTemplateSpecializationSymbol(const Span& span_, const boost::uuids::uuid& sourceModuleId_, std::u32string& name_, ClassTypeSymbol * classTemplate_, const std::vector<TypeSymbol *>& templateArgumentTypes_)

Definition at line 42 of ClassTemplateSpecializationSymbol.cpp :
 42 :
 43 ClassTypeSymbol(SymbolType::classTemplateSpecializationSymbolspan_sourceModuleId_name_)classTemplate(classTemplate_)templateArgumentTypes(templateArgumentTypes_)flags(ClassTemplateSpecializationFlags::none)
 44 {
 45 }


Declaration at line 41 of ClassTemplateSpecializationSymbol.hpp


Member Function Details

Check Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::Check() override

Definition at line 213 of ClassTemplateSpecializationSymbol.cpp
Declaration at line 71 of ClassTemplateSpecializationSymbol.hpp

Base class overridden functions: cmajor::symbols::ClassTypeSymbol::Check , cmajor::symbols::ContainerSymbol::Check , cmajor::symbols::Symbol::Check , cmajor::symbols::TypeSymbol::Check

Calls: cmajor::symbols::ClassTypeSymbol::Check , cmajor::symbols::Symbol::GetSpan , cmajor::symbols::Symbol::SourceModuleId


ClassName Member Function

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

Definition at line 70 of ClassTemplateSpecializationSymbol.hpp :
70 { return "ClassTemplateSpecializationSymbol"; }

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


EmplaceType Member Function

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

Definition at line 95 of ClassTemplateSpecializationSymbol.cpp
Declaration at line 46 of ClassTemplateSpecializationSymbol.hpp

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

Calls: cmajor::symbols::ClassTypeSymbol::EmplaceType , cmajor::symbols::Symbol::GetSymbolType


GetArrowScope Member Function

const ContainerScope * cmajor::symbols::ClassTemplateSpecializationSymbol::GetArrowScope() const override

Definition at line 143 of ClassTemplateSpecializationSymbol.cpp :
144 {
145     if (classTemplate->GroupName() == U"UniquePtr" || classTemplate->GroupName() == U"SharedPtr")
146     {
147         if (templateArgumentTypes.size() == 1)
148         {
149             return templateArgumentTypes[0]->GetContainerScope();
150         }
151     }
152     return Symbol::GetArrowScope();
153 }


Declaration at line 50 of ClassTemplateSpecializationSymbol.hpp

Base class overridden functions: cmajor::symbols::ClassTypeSymbol::GetArrowScope , cmajor::symbols::ClassTypeSymbol::GetArrowScope , cmajor::symbols::Symbol::GetArrowScope , cmajor::symbols::Symbol::GetArrowScope

Calls: cmajor::symbols::ClassTypeSymbol::GroupName , cmajor::symbols::ContainerSymbol::GetContainerScope , cmajor::symbols::Symbol::GetArrowScope


GetArrowScope Member Function

ContainerScope * cmajor::symbols::ClassTemplateSpecializationSymbol::GetArrowScope() override

Definition at line 155 of ClassTemplateSpecializationSymbol.cpp :
156 {
157     if (classTemplate->GroupName() == U"UniquePtr" || classTemplate->GroupName() == U"SharedPtr")
158     {
159         if (templateArgumentTypes.size() == 1)
160         {
161             return templateArgumentTypes[0]->GetContainerScope();
162         }
163     }
164     return Symbol::GetArrowScope();
165 }


Declaration at line 51 of ClassTemplateSpecializationSymbol.hpp

Base class overridden functions: cmajor::symbols::ClassTypeSymbol::GetArrowScope , cmajor::symbols::ClassTypeSymbol::GetArrowScope , cmajor::symbols::Symbol::GetArrowScope , cmajor::symbols::Symbol::GetArrowScope

Calls: cmajor::symbols::ClassTypeSymbol::GroupName , cmajor::symbols::ContainerSymbol::GetContainerScope , cmajor::symbols::Symbol::GetArrowScope


GetClassTemplate Member Function

ClassTypeSymbol * cmajor::symbols::ClassTemplateSpecializationSymbol::GetClassTemplate()

Definition at line 49 of ClassTemplateSpecializationSymbol.hpp :
49 { return classTemplate; }

Called by: cmajor::symbols::ClassTypeSymbol::CreateDIForwardDeclaration , cmajor::symbols::ClassTypeSymbol::CreateDIType , cmajor::symbols::ContainerScope::ParentScope , cmajor::symbols::FunctionSymbol::Id , cmajor::symbols::MemberFunctionSymbol::DocName , cmajor::symbols::SymbolTable::AddClassTemplateSpecializationsToClassTemplateSpecializationMap , cmajor::symbols::SymbolTable::CopyClassTemplateSpecialization , cmajor::symbols::TypeIndex::AddType


GetFlag Member Function

bool cmajor::symbols::ClassTemplateSpecializationSymbol::GetFlag(ClassTemplateSpecializationFlags flag) const

Definition at line 66 of ClassTemplateSpecializationSymbol.hpp :
66 { return (flags & flag) != ClassTemplateSpecializationFlags::none;  }

Called by: cmajor::symbols::ClassTemplateSpecializationSymbol::HasFullInstantiation , cmajor::symbols::ClassTemplateSpecializationSymbol::IsConstraintChecked , cmajor::symbols::ClassTemplateSpecializationSymbol::IsPrototype


GetSymbolCategoryDescription Member Function

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

Definition at line 73 of ClassTemplateSpecializationSymbol.hpp :
73 { return "class"; }

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


GetSymbolCategoryStr Member Function

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

Definition at line 72 of ClassTemplateSpecializationSymbol.hpp :
72 { return "CL"; }

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


GlobalNs Member Function

Node* cmajor::symbols::ClassTemplateSpecializationSymbol::GlobalNs()

Definition at line 55 of ClassTemplateSpecializationSymbol.hpp :
55 { return globalNs.get(); }


HasFullInstantiation Member Function

bool cmajor::symbols::ClassTemplateSpecializationSymbol::HasFullInstantiation() const

Definition at line 62 of ClassTemplateSpecializationSymbol.hpp :
62 { return GetFlag(ClassTemplateSpecializationFlags::hasFullInstantiation); }

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::GetFlag

Called by: cmajor::symbols::ClassTypeSymbol::IrType


Id Member Function

std::u32string cmajor::symbols::ClassTemplateSpecializationSymbol::Id() const override

Definition at line 201 of ClassTemplateSpecializationSymbol.cpp :
202 {
203     if (IsPrototype())
204     {
205         return MangledName();
206     }
207     else
208     {
209         return TypeSymbol::Id();
210     }
211 }


Declaration at line 69 of ClassTemplateSpecializationSymbol.hpp

Base class overridden functions: cmajor::symbols::ClassTypeSymbol::Id , cmajor::symbols::Symbol::Id , cmajor::symbols::TypeSymbol::Id

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::IsPrototype , cmajor::symbols::Symbol::MangledName , cmajor::symbols::TypeSymbol::Id

Called by: cmajor::symbols::ClassTypeSymbol::Id


IrType Member Function

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

Definition at line 125 of ClassTemplateSpecializationSymbol.cpp
Declaration at line 48 of ClassTemplateSpecializationSymbol.hpp

Base class overridden functions: cmajor::symbols::ClassTypeSymbol::IrType

Calls: cmajor::symbols::ClassTypeSymbol::IrType , cmajor::symbols::ClassTypeSymbol::IsRecursive , cmajor::symbols::TypeSymbol::TypeId


IsConstraintChecked Member Function

bool cmajor::symbols::ClassTemplateSpecializationSymbol::IsConstraintChecked()

Definition at line 61 of ClassTemplateSpecializationSymbol.hpp :
61 { return GetFlag(ClassTemplateSpecializationFlags::constraintChecked); }

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::GetFlag


IsPrototype Member Function

bool cmajor::symbols::ClassTemplateSpecializationSymbol::IsPrototype() const

Definition at line 59 of ClassTemplateSpecializationSymbol.hpp :
59 { return GetFlag(ClassTemplateSpecializationFlags::prototype); }

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::GetFlag

Called by: cmajor::symbols::ClassTemplateSpecializationSymbol::Id , cmajor::symbols::ClassTemplateSpecializationSymbol::IsPrototypeTemplateSpecialization , cmajor::symbols::DestructorSymbol::IsExportSymbol , cmajor::symbols::FunctionSymbol::Id


IsPrototypeTemplateSpecialization Member Function

bool cmajor::symbols::ClassTemplateSpecializationSymbol::IsPrototypeTemplateSpecialization() const override

Definition at line 120 of ClassTemplateSpecializationSymbol.cpp :
121 {
122     return IsPrototype();
123 }


Declaration at line 47 of ClassTemplateSpecializationSymbol.hpp

Base class overridden functions: cmajor::symbols::ClassTypeSymbol::IsPrototypeTemplateSpecialization

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::IsPrototype


Read Member Function

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

Definition at line 78 of ClassTemplateSpecializationSymbol.cpp
Declaration at line 45 of ClassTemplateSpecializationSymbol.hpp

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

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


ReleaseFileScope Member Function

FileScope * cmajor::symbols::ClassTemplateSpecializationSymbol::ReleaseFileScope()

Definition at line 177 of ClassTemplateSpecializationSymbol.cpp :
178 {
179     return fileScope.release();
180 }


Declaration at line 57 of ClassTemplateSpecializationSymbol.hpp


ResetFlag Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::ResetFlag(ClassTemplateSpecializationFlags flag)

Definition at line 67 of ClassTemplateSpecializationSymbol.hpp :
67 { flags = flags & ~flag; }

Called by: cmajor::symbols::ClassTemplateSpecializationSymbol::ResetHasFullInstantiation


ResetHasFullInstantiation Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::ResetHasFullInstantiation()

Definition at line 64 of ClassTemplateSpecializationSymbol.hpp :
64 { ResetFlag(ClassTemplateSpecializationFlags::hasFullInstantiation); }

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::ResetFlag


SetConstraintChecked Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::SetConstraintChecked()

Definition at line 60 of ClassTemplateSpecializationSymbol.hpp :
60 { SetFlag(ClassTemplateSpecializationFlags::constraintChecked); }

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::SetFlag


SetFileScope Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::SetFileScope(FileScope * fileScope_)

Definition at line 172 of ClassTemplateSpecializationSymbol.cpp :
173 {
174     fileScope.reset(fileScope_);
175 }


Declaration at line 56 of ClassTemplateSpecializationSymbol.hpp


SetFlag Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::SetFlag(ClassTemplateSpecializationFlags flag)

Definition at line 65 of ClassTemplateSpecializationSymbol.hpp :
65 { flags = flags | flag; }

Called by: cmajor::symbols::ClassTemplateSpecializationSymbol::SetConstraintChecked , cmajor::symbols::ClassTemplateSpecializationSymbol::SetHasFullInstantiation , cmajor::symbols::ClassTemplateSpecializationSymbol::SetPrototype


SetGlobalNs Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::SetGlobalNs(std::unique_ptr<Node>&& globalNs_)

Definition at line 167 of ClassTemplateSpecializationSymbol.cpp :
168 {
169     globalNs = std::move(globalNs_);
170 }


Declaration at line 54 of ClassTemplateSpecializationSymbol.hpp


SetHasFullInstantiation Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::SetHasFullInstantiation()

Definition at line 63 of ClassTemplateSpecializationSymbol.hpp :
63 { SetFlag(ClassTemplateSpecializationFlags::hasFullInstantiation); }

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::SetFlag


SetPrototype Member Function

void cmajor::symbols::ClassTemplateSpecializationSymbol::SetPrototype()

Definition at line 58 of ClassTemplateSpecializationSymbol.hpp :
58 { SetFlag(ClassTemplateSpecializationFlags::prototype); }

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::SetFlag


SimpleName Member Function

std::u32string cmajor::symbols::ClassTemplateSpecializationSymbol::SimpleName() const override

Definition at line 51 of ClassTemplateSpecializationSymbol.cpp :
 52 {
 53     std::u32string simpleName = classTemplate->GroupName();
 54     int n = templateArgumentTypes.size();
 55     for (int i = 0; i < n; ++i)
 56     {
 57         simpleName.append(U"_").append(templateArgumentTypes[i]->SimpleName());
 58     }
 59     return simpleName;
 60 }


Declaration at line 43 of ClassTemplateSpecializationSymbol.hpp

Base class overridden functions: cmajor::symbols::ClassTypeSymbol::SimpleName , cmajor::symbols::Symbol::SimpleName

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::SimpleName , cmajor::symbols::ClassTypeSymbol::GroupName

Called by: cmajor::symbols::ClassTemplateSpecializationSymbol::SimpleName


TemplateArgumentTypes Member Function

const std::vector<TypeSymbol *>& cmajor::symbols::ClassTemplateSpecializationSymbol::TemplateArgumentTypes() const

Definition at line 52 of ClassTemplateSpecializationSymbol.hpp :
52 { return templateArgumentTypes; }


TemplateArgumentTypes Member Function

std::vector<TypeSymbol *>& cmajor::symbols::ClassTemplateSpecializationSymbol::TemplateArgumentTypes()

Definition at line 53 of ClassTemplateSpecializationSymbol.hpp :
53 { return templateArgumentTypes; }

Called by: cmajor::symbols::SymbolTable::AddClassTemplateSpecializationsToClassTemplateSpecializationMap , cmajor::symbols::SymbolTable::CopyClassTemplateSpecialization , cmajor::symbols::TypeIndex::AddType


UnifyTemplateArgumentType Member Function

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

Definition at line 182 of ClassTemplateSpecializationSymbol.cpp
Declaration at line 68 of ClassTemplateSpecializationSymbol.hpp

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

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::UnifyTemplateArgumentType , cmajor::symbols::Module::Id , cmajor::symbols::SymbolTable::MakeClassTemplateSpecialization

Called by: cmajor::symbols::ClassTemplateSpecializationSymbol::UnifyTemplateArgumentType


Write Member Function

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

Definition at line 62 of ClassTemplateSpecializationSymbol.cpp
Declaration at line 44 of ClassTemplateSpecializationSymbol.hpp

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

Calls: cmajor::symbols::ClassTemplateSpecializationSymbol::Write , cmajor::symbols::ClassTypeSymbol::Write , cmajor::symbols::SymbolWriter::GetBinaryWriter , cmajor::symbols::TypeSymbol::TypeId

Called by: cmajor::symbols::ClassTemplateSpecializationSymbol::Write


top | up | prev | next