top | up | prev | next

BoolValue Abstract Class

Definition at line 65 of Value.hpp

Constructors

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

Typedefs

bool OperandType

Member Variables

bool value

Constructor Details

BoolValue Constructor

cmajor::symbols::BoolValue::BoolValue(const Span& span_, const boost::uuids::uuid& moduleId_, bool value_)

Definition at line 258 of Value.cpp :
 258 : Value(span_moduleId_ValueType::boolValue)value(value_)
 259 {
 260 }



Member Function Details

As Member Function

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

Definition at line 277 of Value.cpp

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


ClassName Member Function

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

Definition at line 78 of Value.hpp :
 78 { return "BoolValue"; }

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


Clone Member Function

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

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

Definition at line 533 of Value.cpp :
 534 {
 535     return symbolTable->GetTypeByName(U"bool");
 536 }


Declaration at line 76 of Value.hpp

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

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


GetValue Member Function

bool cmajor::symbols::BoolValue::GetValue() const

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


IrValue Member Function

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

Definition at line 262 of Value.cpp :
 263 {
 264     return emitter.CreateIrValueForBool(value);
 265 }



Read Member Function

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

Definition at line 272 of Value.cpp :
 273 {
 274     reader.ReadBool();
 275 }


Declaration at line 73 of Value.hpp

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


ToString Member Function

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

Definition at line 75 of Value.hpp :
 75 { return value ? "true" : "false"; }

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


Write Member Function

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

Definition at line 267 of Value.cpp :
 268 {
 269     writer.Write(value);
 270 }


Declaration at line 72 of Value.hpp

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

Calls: cmajor::symbols::BoolValue::Write

Called by: cmajor::symbols::BoolValue::Write


top | up | prev | next