top | up | prev | next

WStringValue Abstract Class

Definition at line 335 of Value.hpp

Constructors

WStringValue(const Span& span_, const boost::uuids::uuid& moduleId_, int stringId_, const std::u16string& str_)

Member Functions

Value* As(TypeSymbol* targetType, bool cast, const Span& span, const boost::uuids::uuid& moduleId, bool dontThrow) const
const char* ClassName() const override
Value* Clone() const override
TypeSymbol* GetType(SymbolTable* symbolTable) override
void* IrValue(Emitter& emitter)
void Read(BinaryReader& reader) override
const std::u16string& Str() const
int StringId() const
void Write(BinaryWriter& writer) override

Member Variables

std::u16string str
int stringId

Constructor Details

WStringValue Constructor

cmajor::symbols::WStringValue::WStringValue(const Span& span_, const boost::uuids::uuid& moduleId_, int stringId_, const std::u16string& str_)

Definition at line 3696 of Value.cpp :
3696 : Value(span_moduleId_ValueType::wstringValue)stringId(stringId_)str(str_)
3697 {
3698 }



Member Function Details

As Member Function

Value * cmajor::symbols::WStringValue::As(TypeSymbol * targetType, bool cast, const Span& span, const boost::uuids::uuid& moduleId, bool dontThrow) const

Definition at line 3718 of Value.cpp

Calls: cmajor::symbols::TypeSymbol::GetValueType , cmajor::symbols::Value::GetValueType


ClassName Member Function

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

Definition at line 347 of Value.hpp :
347 { return "WStringValue"; }

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


Clone Member Function

Value * cmajor::symbols::WStringValue::Clone() const override

Definition at line 339 of Value.hpp :
339 { return new WStringValue(GetSpan()ModuleId()stringIdstr); }

Base class overridden functions: cmajor::symbols::Value::Clone

Calls: cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId


GetType Member Function

TypeSymbol * cmajor::symbols::WStringValue::GetType(SymbolTable * symbolTable) override

Definition at line 3740 of Value.cpp :
3741 {
3742     return symbolTable->GetTypeByName(U"wchar")->AddConst(GetSpan()ModuleId())->AddPointer(GetSpan()ModuleId());
3743 }


Declaration at line 344 of Value.hpp

Base class overridden functions: cmajor::symbols::Value::GetType

Calls: cmajor::symbols::SymbolTable::GetTypeByName , cmajor::symbols::TypeSymbol::AddConst , cmajor::symbols::TypeSymbol::AddPointer , cmajor::symbols::Value::GetSpan , cmajor::symbols::Value::ModuleId


IrValue Member Function

void * cmajor::symbols::WStringValue::IrValue(Emitter& emitter)

Definition at line 3700 of Value.cpp :
3701 {
3702     if (stringId == -1)
3703     {
3704         stringId = emitter.Install(str);
3705     }
3706     void* wstringConstant = emitter.GetGlobalWStringConstant(stringId);
3707     return emitter.CreateIrValueForWString(wstringConstant);
3708 }



Read Member Function

void cmajor::symbols::WStringValue::Read(BinaryReader& reader) override

Definition at line 3714 of Value.cpp :
3715 {
3716 }


Declaration at line 342 of Value.hpp

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


Str Member Function

const std::u16string& cmajor::symbols::WStringValue::Str() const

Definition at line 346 of Value.hpp :
346 { return str; }

Called by: cmajor::symbols::StringLengthFunction::ConstructValue


StringId Member Function

int cmajor::symbols::WStringValue::StringId() const

Definition at line 345 of Value.hpp :
345 { return stringId; }


Write Member Function

void cmajor::symbols::WStringValue::Write(BinaryWriter& writer) override

Definition at line 3710 of Value.cpp :
3711 {
3712 }


Declaration at line 341 of Value.hpp

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


top | up | prev | next