top | up | prev | next

ShortValue Abstract Class

Definition at line 119 of Value.hpp

Constructors

ShortValue(const Span& span_, const boost::uuids::uuid& moduleId_, int16_t 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
int16_t GetValue() const
void* IrValue(Emitter& emitter)
void Read(BinaryReader& reader) override
std::string ToString() const override
void Write(BinaryWriter& writer) override

Typedefs

int16_t OperandType

Member Variables

int16_t value

Constructor Details

ShortValue Constructor

cmajor::symbols::ShortValue::ShortValue(const Span& span_, const boost::uuids::uuid& moduleId_, int16_t value_)

Definition at line 916 of Value.cpp :
 916 : Value(span_moduleId_ValueType::shortValue)value(value_)
 917 {
 918 }



Member Function Details

As Member Function

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

Definition at line 935 of Value.cpp

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


ClassName Member Function

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

Definition at line 132 of Value.hpp :
132 { return "ShortValue"; }

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


Clone Member Function

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

Definition at line 124 of Value.hpp :
124 { return new ShortValue(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::ShortValue::GetType(SymbolTable * symbolTable) override

Definition at line 1135 of Value.cpp :
1136 {
1137     return symbolTable->GetTypeByName(U"short");
1138 }


Declaration at line 130 of Value.hpp

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

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


GetValue Member Function

int16_t cmajor::symbols::ShortValue::GetValue() const

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


IrValue Member Function

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

Definition at line 920 of Value.cpp :
 921 {
 922     return emitter.CreateIrValueForShort(value);
 923 }



Read Member Function

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

Definition at line 930 of Value.cpp :
 931 {
 932     value = reader.ReadShort();
 933 }


Declaration at line 127 of Value.hpp

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


ToString Member Function

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

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

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


Write Member Function

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

Definition at line 925 of Value.cpp :
 926 {
 927     writer.Write(value);
 928 }


Declaration at line 126 of Value.hpp

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

Calls: cmajor::symbols::ShortValue::Write

Called by: cmajor::symbols::ShortValue::Write


top | up | prev | next