top | up | prev | next

DoubleValue Abstract Class

Definition at line 245 of Value.hpp

Constructors

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

Typedefs

double OperandType

Member Variables

double value

Constructor Details

DoubleValue Constructor

cmajor::symbols::DoubleValue::DoubleValue(const Span& span_, const boost::uuids::uuid& moduleId_, double value_)

Definition at line 2568 of Value.cpp :
2568 : Value(span_moduleId_ValueType::doubleValue)value(value_)
2569 {
2570 }



Member Function Details

As Member Function

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

Definition at line 2587 of Value.cpp

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


ClassName Member Function

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

Definition at line 258 of Value.hpp :
258 { return "DoubleValue"; }

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


Clone Member Function

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

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

Definition at line 2843 of Value.cpp :
2844 {
2845     return symbolTable->GetTypeByName(U"double");
2846 }


Declaration at line 256 of Value.hpp

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

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


GetValue Member Function

double cmajor::symbols::DoubleValue::GetValue() const

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


IrValue Member Function

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

Definition at line 2572 of Value.cpp :
2573 {
2574     return emitter.CreateIrValueForDouble(value);
2575 }



Read Member Function

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

Definition at line 2582 of Value.cpp :
2583 {
2584     value = reader.ReadDouble();
2585 }


Declaration at line 253 of Value.hpp

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


ToString Member Function

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

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

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


Write Member Function

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

Definition at line 2577 of Value.cpp :
2578 {
2579     writer.Write(value);
2580 }


Declaration at line 252 of Value.hpp

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

Calls: cmajor::symbols::DoubleValue::Write

Called by: cmajor::symbols::DoubleValue::Write


top | up | prev | next