top | up | prev | next

GlobalVariableGroupSymbol Class

Definition at line 98 of VariableSymbol.hpp

Constructors

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

Member Functions

void AddGlobalVariable(GlobalVariableSymbol* globalVariableSymbol)
const char* ClassName() const override
void CollectGlobalVariables(const std::string& compileUnitFilePath, std::vector<GlobalVariableSymbol*>& globalVariables) const
void ComputeMangledName() override
std::string GetSymbolCategoryDescription() const override
std::string GetSymbolCategoryStr() const override
std::string GetSymbolHelp() const override
const ContainerScope* GetTypeScope() const override
ContainerScope* GetTypeScope() override
std::u32string Info() const override
bool IsEmpty() const
bool IsExportSymbol() const override
void RemoveGlobalVariable(GlobalVariableSymbol* globalVariableSymbol)
std::string TypeString() const override

Member Variables

std::vector<std::pair<GlobalVariableSymbol*, std::string>> globalVariableSymbols

Constructor Details

GlobalVariableGroupSymbol Constructor

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

Definition at line 343 of VariableSymbol.cpp :
343 :
344 Symbol(SymbolType::globalVariableGroupSymbolspan_sourceModuleId_name_)
345 {
346 }


Declaration at line 101 of VariableSymbol.hpp


Member Function Details

AddGlobalVariable Member Function

void cmajor::symbols::GlobalVariableGroupSymbol::AddGlobalVariable(GlobalVariableSymbol * globalVariableSymbol)

Definition at line 355 of VariableSymbol.cpp
Declaration at line 105 of VariableSymbol.hpp

Calls: cmajor::symbols::GlobalVariableSymbol::CompileUnitFilePath , cmajor::symbols::GlobalVariableSymbol::SetGlobalVariableGroup , cmajor::symbols::Symbol::Access , cmajor::symbols::Symbol::GetSpan , cmajor::symbols::Symbol::Name , cmajor::symbols::Symbol::SourceModuleId

Called by: cmajor::symbols::ContainerSymbol::AddMember , cmajor::symbols::ContainerSymbol::AddOwnedMember


ClassName Member Function

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

Definition at line 109 of VariableSymbol.hpp :
109 { return "GlobalVariableGroupSymbol"; }

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


CollectGlobalVariables Member Function

void cmajor::symbols::GlobalVariableGroupSymbol::CollectGlobalVariables(const std::string& compileUnitFilePath, std::vector<GlobalVariableSymbol *>& globalVariables) const

Definition at line 411 of VariableSymbol.cpp
Declaration at line 110 of VariableSymbol.hpp

Calls: cmajor::symbols::Symbol::Access


ComputeMangledName Member Function

void cmajor::symbols::GlobalVariableGroupSymbol::ComputeMangledName() override

Definition at line 348 of VariableSymbol.cpp :
349 {
350     std::u32string mangledName = ToUtf32(TypeString());
351     mangledName.append(1U'_').append(ToUtf32(GetSha1MessageDigest(ToUtf8(FullNameWithSpecifiers()))));
352     SetMangledName(mangledName);
353 }


Declaration at line 104 of VariableSymbol.hpp

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

Calls: cmajor::symbols::GlobalVariableGroupSymbol::TypeString , cmajor::symbols::Symbol::FullNameWithSpecifiers , cmajor::symbols::Symbol::SetMangledName


GetSymbolCategoryDescription Member Function

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

Definition at line 112 of VariableSymbol.hpp :
112 { return "global variable"; }

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

Called by: cmajor::symbols::GlobalVariableGroupSymbol::GetSymbolHelp


GetSymbolCategoryStr Member Function

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

Definition at line 111 of VariableSymbol.hpp :
111 { return "GV"; }

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


GetSymbolHelp Member Function

std::string cmajor::symbols::GlobalVariableGroupSymbol::GetSymbolHelp() const override

Definition at line 453 of VariableSymbol.cpp :
454 {
455     if (globalVariableSymbols.size() == 1)
456     {
457         return globalVariableSymbols.front().first->GetSymbolHelp();
458     }
459     std::string help = "(";
460     help.append(GetSymbolCategoryDescription()).append(") ");
461     help.append(ToUtf8(FullName())).append(" (").append(std::to_string(globalVariableSymbols.size())).append(" global variables)");
462     return help;
463 }


Declaration at line 115 of VariableSymbol.hpp

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

Calls: cmajor::symbols::GlobalVariableGroupSymbol::GetSymbolCategoryDescription , cmajor::symbols::GlobalVariableGroupSymbol::GetSymbolHelp , cmajor::symbols::Symbol::FullName

Called by: cmajor::symbols::GlobalVariableGroupSymbol::GetSymbolHelp


GetTypeScope Member Function

const ContainerScope * cmajor::symbols::GlobalVariableGroupSymbol::GetTypeScope() const override

Definition at line 435 of VariableSymbol.cpp :
436 {
437     for (const std::std::pair<GlobalVariableSymbol*std::string>&p : globalVariableSymbols)
438     {
439         return p.first->GetTypeScope();
440     }
441     return nullptr;
442 }


Declaration at line 113 of VariableSymbol.hpp

Base class overridden functions: cmajor::symbols::Symbol::GetTypeScope , cmajor::symbols::Symbol::GetTypeScope

Calls: cmajor::symbols::GlobalVariableGroupSymbol::GetTypeScope


GetTypeScope Member Function

ContainerScope * cmajor::symbols::GlobalVariableGroupSymbol::GetTypeScope() override

Definition at line 444 of VariableSymbol.cpp :
445 {
446     for (const std::std::pair<GlobalVariableSymbol*std::string>&p : globalVariableSymbols)
447     {
448         return p.first->GetTypeScope();
449     }
450     return nullptr;
451 }


Declaration at line 114 of VariableSymbol.hpp

Base class overridden functions: cmajor::symbols::Symbol::GetTypeScope , cmajor::symbols::Symbol::GetTypeScope

Calls: cmajor::symbols::GlobalVariableGroupSymbol::GetTypeScope

Called by: cmajor::symbols::GlobalVariableGroupSymbol::GetTypeScope , cmajor::symbols::GlobalVariableGroupSymbol::GetTypeScope


Info Member Function

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

Definition at line 108 of VariableSymbol.hpp :
108 { return Name(); }

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

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


IsEmpty Member Function

bool cmajor::symbols::GlobalVariableGroupSymbol::IsEmpty() const

Definition at line 406 of VariableSymbol.cpp :
407 {
408     return globalVariableSymbols.empty();
409 }


Declaration at line 107 of VariableSymbol.hpp

Called by: cmajor::symbols::GlobalVariableSymbol::RemoveFromParent


IsExportSymbol Member Function

bool cmajor::symbols::GlobalVariableGroupSymbol::IsExportSymbol() const override

Definition at line 102 of VariableSymbol.hpp :
102 { return false; }

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


RemoveGlobalVariable Member Function

void cmajor::symbols::GlobalVariableGroupSymbol::RemoveGlobalVariable(GlobalVariableSymbol * globalVariableSymbol)

Definition at line 399 of VariableSymbol.cpp :
400 {
401     std::pair<GlobalVariableSymbol*std::string> key(globalVariableSymbolglobalVariableSymbol->CompileUnitFilePath());
402     auto end = std::remove(globalVariableSymbols.begin()globalVariableSymbols.end()key);
403     globalVariableSymbols.erase(endglobalVariableSymbols.end());
404 }


Declaration at line 106 of VariableSymbol.hpp

Calls: cmajor::symbols::GlobalVariableSymbol::CompileUnitFilePath

Called by: cmajor::symbols::GlobalVariableSymbol::RemoveFromParent


TypeString Member Function

std::string cmajor::symbols::GlobalVariableGroupSymbol::TypeString() const override

Definition at line 103 of VariableSymbol.hpp :
103 { return "global_variable_group"; }

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

Called by: cmajor::symbols::GlobalVariableGroupSymbol::ComputeMangledName


top | up | prev | next