top | up | prev | next

MemberVariableSymbol Class

Definition at line 72 of VariableSymbol.hpp

Constructors

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

Member Functions

void Accept(SymbolCollector* collector) override
void Check() override
const char* ClassName() const override
std::unique_ptr<Element> CreateDomElement(TypeMap& typeMap) override
void Dump(CodeFormatter& formatter) override
void* GetDIMemberType(Emitter& emitter, uint64_t offsetInBits)
std::string GetSymbolCategoryDescription() const override
std::string GetSymbolCategoryStr() const override
bool IsExportSymbol() const override
int32_t LayoutIndex() const
void Read(SymbolReader& reader) override
void SetLayoutIndex(int32_t layoutIndex_)
void SetSpecifiers(Specifiers specifiers)
std::string Syntax() const override
std::string TypeString() const override
void Write(SymbolWriter& writer) override

Member Variables

int32_t layoutIndex

Constructor Details

MemberVariableSymbol Constructor

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

Definition at line 180 of VariableSymbol.cpp :
180 :
181 VariableSymbol(SymbolType::memberVariableSymbolspan_sourceModuleId_name_)layoutIndex(-1)
182 {
183 }


Declaration at line 75 of VariableSymbol.hpp


Member Function Details

Accept Member Function

void cmajor::symbols::MemberVariableSymbol::Accept(SymbolCollector * collector) override

Definition at line 202 of VariableSymbol.cpp :
203 {
204     if (IsProject() && Access() == SymbolAccess::public_)
205     {
206         collector->AddMemberVariable(this);
207     }
208 }


Declaration at line 79 of VariableSymbol.hpp

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

Calls: cmajor::symbols::Symbol::Access , cmajor::symbols::Symbol::IsProject , cmajor::symbols::SymbolCollector::AddMemberVariable


Check Member Function

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

Definition at line 334 of VariableSymbol.cpp :
335 {
336     VariableSymbol::Check();
337     if (layoutIndex == -1)
338     {
339         throw SymbolCheckException("member variable symbol contains invalid layout index"GetSpan()SourceModuleId());
340     }
341 }


Declaration at line 89 of VariableSymbol.hpp

Base class overridden functions: cmajor::symbols::Symbol::Check , cmajor::symbols::VariableSymbol::Check

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


ClassName Member Function

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

Definition at line 88 of VariableSymbol.hpp :
 88 { return "MemberVariableSymbol"; }

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


CreateDomElement Member Function

std::unique_ptr<Element > cmajor::symbols::MemberVariableSymbol::CreateDomElement(TypeMap & typeMap) override

Definition at line 321 of VariableSymbol.cpp
Declaration at line 87 of VariableSymbol.hpp

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

Calls: cmajor::symbols::TypeMap::GetOrInsertType , cmajor::symbols::VariableSymbol::GetType


Dump Member Function

void cmajor::symbols::MemberVariableSymbol::Dump(CodeFormatter& formatter) override

Definition at line 210 of VariableSymbol.cpp :
211 {
212     formatter.WriteLine(ToUtf8(Name()));
213     formatter.WriteLine("full name: " + ToUtf8(FullNameWithSpecifiers()));
214     formatter.WriteLine("mangled name: " + ToUtf8(MangledName()));
215     formatter.WriteLine("type: " + ToUtf8(GetType()->FullName()));
216     formatter.WriteLine("layout index: " + std::to_string(layoutIndex));
217 }


Declaration at line 80 of VariableSymbol.hpp

Calls: cmajor::symbols::Symbol::FullName , cmajor::symbols::Symbol::FullNameWithSpecifiers , cmajor::symbols::Symbol::MangledName , cmajor::symbols::Symbol::Name , cmajor::symbols::VariableSymbol::GetType

Called by: cmajor::symbols::ClassTypeSymbol::Dump


GetDIMemberType Member Function

void * cmajor::symbols::MemberVariableSymbol::GetDIMemberType(Emitter& emitter, uint64_t offsetInBits)

Definition at line 303 of VariableSymbol.cpp

Calls: cmajor::symbols::Symbol::GetSpan , cmajor::symbols::Symbol::IsClassTypeSymbol , cmajor::symbols::Symbol::Name , cmajor::symbols::Symbol::Parent , cmajor::symbols::Symbol::SourceModuleId , cmajor::symbols::TypeSymbol::AlignmentInBits , cmajor::symbols::TypeSymbol::GetDIType , cmajor::symbols::TypeSymbol::SizeInBits , cmajor::symbols::TypeSymbol::TypeId , cmajor::symbols::VariableSymbol::GetType

Called by: cmajor::symbols::ClassTypeSymbol::CreateDIType


GetSymbolCategoryDescription Member Function

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

Definition at line 91 of VariableSymbol.hpp :
 91 { return "member variable"; }

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


GetSymbolCategoryStr Member Function

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

Definition at line 90 of VariableSymbol.hpp :
 90 { return "MV"; }

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


IsExportSymbol Member Function

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

Definition at line 197 of VariableSymbol.cpp :
198 {
199     return VariableSymbol::IsExportSymbol();
200 }


Declaration at line 78 of VariableSymbol.hpp

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

Calls: cmajor::symbols::Symbol::IsExportSymbol


LayoutIndex Member Function

int32_t cmajor::symbols::MemberVariableSymbol::LayoutIndex() const

Definition at line 84 of VariableSymbol.hpp :
 84 { return layoutIndex; }

Called by: cmajor::symbols::ClassTypeSymbol::CreateDIType , cmajor::symbols::TypeIndex::AddType


Read Member Function

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

Definition at line 191 of VariableSymbol.cpp :
192 {
193     VariableSymbol::Read(reader);
194     layoutIndex = reader.GetBinaryReader().ReadInt();
195 }


Declaration at line 77 of VariableSymbol.hpp

Base class overridden functions: cmajor::symbols::Symbol::Read , cmajor::symbols::VariableSymbol::Read

Calls: cmajor::symbols::SymbolReader::GetBinaryReader , cmajor::symbols::VariableSymbol::Read


SetLayoutIndex Member Function

void cmajor::symbols::MemberVariableSymbol::SetLayoutIndex(int32_t layoutIndex_)

Definition at line 85 of VariableSymbol.hpp :
 85 { layoutIndex = layoutIndex_; }

Called by: cmajor::symbols::ClassTypeSymbol::CreateLayouts


SetSpecifiers Member Function

void cmajor::symbols::MemberVariableSymbol::SetSpecifiers(Specifiers specifiers)

Definition at line 233 of VariableSymbol.cpp
Declaration at line 83 of VariableSymbol.hpp

Calls: cmajor::symbols::Symbol::GetSpan , cmajor::symbols::Symbol::SetAccess , cmajor::symbols::Symbol::SetStatic , cmajor::symbols::Symbol::SourceModuleId


Syntax Member Function

std::string cmajor::symbols::MemberVariableSymbol::Syntax() const override

Definition at line 219 of VariableSymbol.cpp
Declaration at line 82 of VariableSymbol.hpp

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

Calls: cmajor::symbols::Symbol::DocName , cmajor::symbols::Symbol::GetSpecifierStr , cmajor::symbols::VariableSymbol::GetType


TypeString Member Function

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

Definition at line 81 of VariableSymbol.hpp :
 81 { return "member_variable"; }

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


Write Member Function

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

Definition at line 185 of VariableSymbol.cpp :
186 {
187     VariableSymbol::Write(writer);
188     writer.GetBinaryWriter().Write(layoutIndex);
189 }


Declaration at line 76 of VariableSymbol.hpp

Base class overridden functions: cmajor::symbols::Symbol::Write , cmajor::symbols::VariableSymbol::Write

Calls: cmajor::symbols::MemberVariableSymbol::Write , cmajor::symbols::SymbolWriter::GetBinaryWriter , cmajor::symbols::VariableSymbol::Write

Called by: cmajor::symbols::MemberVariableSymbol::Write


top | up | prev | next