top | up | prev | next

CharValue Abstract Class

Definition at line 263 of Value.hpp

Constructors

CharValue(const Span& span_, const boost::uuids::uuid& moduleId_, unsigned char value_)

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
unsigned char GetValue() const
void* IrValue(Emitter& emitter)
void Read(BinaryReader& reader) override
std::string ToString() const override
void Write(BinaryWriter& writer) override

Typedefs

unsigned char OperandType

Member Variables

unsigned char value

Constructor Details

CharValue Constructor

cmajor::symbols::CharValue::CharValue(const Span& span_, const boost::uuids::uuid& moduleId_, unsigned char value_)

Definition at line 2848 of Value.cpp :
2848 : Value(span_moduleId_ValueType::charValue)value(value_)
2849 {
2850 }



Member Function Details

As Member Function

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

Definition at line 2867 of Value.cpp

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


ClassName Member Function

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

Definition at line 276 of Value.hpp :
276 { return "CharValue"; }

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


Clone Member Function

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

Definition at line 268 of Value.hpp :
268 { return new CharValue(GetSpan()ModuleId()value); }

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

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


GetType Member Function

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

Definition at line 3095 of Value.cpp :
3096 {
3097     return symbolTable->GetTypeByName(U"char");
3098 }


Declaration at line 274 of Value.hpp

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

Calls: cmajor::symbols::SymbolTable::GetTypeByName


GetValue Member Function

unsigned char cmajor::symbols::CharValue::GetValue() const

Definition at line 275 of Value.hpp :
275 { return value; }


IrValue Member Function

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

Definition at line 2852 of Value.cpp :
2853 {
2854     return emitter.CreateIrValueForChar(static_cast<uint8_t>(value));
2855 }



Read Member Function

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

Definition at line 2862 of Value.cpp :
2863 {
2864     value = reader.ReadChar();
2865 }


Declaration at line 271 of Value.hpp

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


ToString Member Function

std::string cmajor::symbols::CharValue::ToString() const override

Definition at line 273 of Value.hpp :
273 { return std::to_string(value); }

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


Write Member Function

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

Definition at line 2857 of Value.cpp :
2858 {
2859     writer.Write(value);
2860 }


Declaration at line 270 of Value.hpp

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

Calls: cmajor::symbols::CharValue::Write

Called by: cmajor::symbols::CharValue::Write


top | up | prev | next