top | up | prev | next

EnumConstantSymbol Class

Definition at line 51 of EnumSymbol.hpp

Constructors

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

Member Functions

void Accept(SymbolCollector* collector) override
const char* ClassName() const override
SymbolAccess DeclaredAccess() const override
void Dump(CodeFormatter& formatter) override
bool Evaluating() const
std::string GetSymbolCategoryDescription() const override
std::string GetSymbolCategoryStr() const override
const TypeSymbol* GetType() const
TypeSymbol* GetType()
const Value* GetValue() const
Value* GetValue()
std::u32string Info() const override
void Read(SymbolReader& reader) override
void ResetEvaluating()
void SetEvaluating()
void SetStrValue(const std::u32string& strValue_)
void SetValue(Value* value_)
const std::u32string& StrValue() const
std::string TypeString() const override
void Write(SymbolWriter& writer) override

Member Variables

bool evaluating
std::u32string strValue
std::unique_ptr<Value> value

Constructor Details

EnumConstantSymbol Constructor

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

Definition at line 222 of EnumSymbol.cpp :
222 :
223 Symbol(SymbolType::enumConstantSymbolspan_sourceModuleId_name_)evaluating(false)
224 {
225 }


Declaration at line 54 of EnumSymbol.hpp


Member Function Details

Accept Member Function

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

Definition at line 232 of EnumSymbol.cpp :
233 {
234     if (IsProject())
235     {
236         collector->AddEnumerationConstant(this);
237     }
238 }


Declaration at line 57 of EnumSymbol.hpp

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

Calls: cmajor::symbols::Symbol::IsProject , cmajor::symbols::SymbolCollector::AddEnumerationConstant


ClassName Member Function

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

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

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


DeclaredAccess Member Function

SymbolAccess cmajor::symbols::EnumConstantSymbol::DeclaredAccess() const override

Definition at line 55 of EnumSymbol.hpp :
 55 { return SymbolAccess::public_; }

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


Dump Member Function

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

Definition at line 240 of EnumSymbol.cpp :
241 {
242     formatter.WriteLine(ToUtf8(Name()));
243     formatter.WriteLine("value: " + value->ToString());
244 }


Declaration at line 58 of EnumSymbol.hpp

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

Called by: cmajor::symbols::EnumTypeSymbol::Dump


Evaluating Member Function

bool cmajor::symbols::EnumConstantSymbol::Evaluating() const

Definition at line 61 of EnumSymbol.hpp :
 61 { return evaluating; }


GetSymbolCategoryDescription Member Function

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

Definition at line 74 of EnumSymbol.hpp :
 74 { return "enumeration constant"; }

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


GetSymbolCategoryStr Member Function

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

Definition at line 73 of EnumSymbol.hpp :
 73 { return "EC"; }

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


GetType Member Function

const TypeSymbol * cmajor::symbols::EnumConstantSymbol::GetType() const

Definition at line 64 of EnumSymbol.hpp :
 64 { return static_cast<const EnumTypeSymbol*>(Parent()); }

Calls: cmajor::symbols::Symbol::Parent


GetType Member Function

TypeSymbol * cmajor::symbols::EnumConstantSymbol::GetType()

Definition at line 65 of EnumSymbol.hpp :
 65 { return static_cast<EnumTypeSymbol*>(Parent()); }

Calls: cmajor::symbols::Symbol::Parent


GetValue Member Function

const Value * cmajor::symbols::EnumConstantSymbol::GetValue() const

Definition at line 67 of EnumSymbol.hpp :
 67 { return value.get(); }


GetValue Member Function

Value * cmajor::symbols::EnumConstantSymbol::GetValue()

Definition at line 68 of EnumSymbol.hpp :
 68 { return value.get(); }

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


Info Member Function

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

Definition at line 69 of EnumSymbol.hpp :
 69 { return Name(); }

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

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


Read Member Function

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

Definition at line 253 of EnumSymbol.cpp :
254 {
255     Symbol::Read(reader);
256     value = ReadValue(reader.GetBinaryReader()GetSpan()SourceModuleId());
257     strValue = reader.GetBinaryReader().ReadUtf32String();
258 }


Declaration at line 60 of EnumSymbol.hpp

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

Calls: cmajor::symbols::Symbol::GetSpan , cmajor::symbols::Symbol::Read , cmajor::symbols::Symbol::SourceModuleId , cmajor::symbols::SymbolReader::GetBinaryReader


ResetEvaluating Member Function

void cmajor::symbols::EnumConstantSymbol::ResetEvaluating()

Definition at line 63 of EnumSymbol.hpp :
 63 { evaluating = false; }


SetEvaluating Member Function

void cmajor::symbols::EnumConstantSymbol::SetEvaluating()

Definition at line 62 of EnumSymbol.hpp :
 62 { evaluating = true; }


SetStrValue Member Function

void cmajor::symbols::EnumConstantSymbol::SetStrValue(const std::u32string& strValue_)

Definition at line 71 of EnumSymbol.hpp :
 71 { strValue = strValue_; }

Called by: cmajor::symbols::SymbolTable::AddEnumConstant


SetValue Member Function

void cmajor::symbols::EnumConstantSymbol::SetValue(Value * value_)

Definition at line 227 of EnumSymbol.cpp :
228 {
229     value.reset(value_);
230 }


Declaration at line 66 of EnumSymbol.hpp


StrValue Member Function

const std::u32string& cmajor::symbols::EnumConstantSymbol::StrValue() const

Definition at line 72 of EnumSymbol.hpp :
 72 { return strValue; }

Called by: cmajor::symbols::TypeIndex::AddType


TypeString Member Function

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

Definition at line 56 of EnumSymbol.hpp :
 56 { return "enumeration_constant"; }

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


Write Member Function

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

Definition at line 246 of EnumSymbol.cpp :
247 {
248     Symbol::Write(writer);
249     WriteValue(value.get()writer.GetBinaryWriter());
250     writer.GetBinaryWriter().Write(strValue);
251 }


Declaration at line 59 of EnumSymbol.hpp

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

Calls: cmajor::symbols::EnumConstantSymbol::Write , cmajor::symbols::Symbol::Write , cmajor::symbols::SymbolWriter::GetBinaryWriter

Called by: cmajor::symbols::EnumConstantSymbol::Write


top | up | prev | next