top | up | prev | next

IntValue Abstract Class

Definition at line 155 of Value.hpp

Constructors

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

Typedefs

int32_t OperandType

Member Variables

int32_t value

Constructor Details

IntValue Constructor

cmajor::symbols::IntValue::IntValue(const Span& span_, const boost::uuids::uuid& moduleId_, int32_t value_)

Definition at line 1336 of Value.cpp :
1336 : Value(span_moduleId_ValueType::intValue)value(value_)
1337 {
1338 }



Member Function Details

As Member Function

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

Definition at line 1355 of Value.cpp

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


ClassName Member Function

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

Definition at line 168 of Value.hpp :
168 { return "IntValue"; }

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


Clone Member Function

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

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

Definition at line 1569 of Value.cpp :
1570 {
1571     return symbolTable->GetTypeByName(U"int");
1572 }


Declaration at line 166 of Value.hpp

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

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


GetValue Member Function

int32_t cmajor::symbols::IntValue::GetValue() const

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


IrValue Member Function

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

Definition at line 1340 of Value.cpp :
1341 {
1342     return emitter.CreateIrValueForInt(value);
1343 }



Read Member Function

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

Definition at line 1350 of Value.cpp :
1351 {
1352     value = reader.ReadInt();
1353 }


Declaration at line 163 of Value.hpp

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


ToString Member Function

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

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

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


Write Member Function

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

Definition at line 1345 of Value.cpp :
1346 {
1347     writer.Write(value);
1348 }


Declaration at line 162 of Value.hpp

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

Calls: cmajor::symbols::IntValue::Write

Called by: cmajor::symbols::IntValue::Write


top | up | prev | next