top | up | prev | next

ConversionValue Class

Definition at line 218 of Value.hpp

Constructors

ConversionValue(Type* type_, ConstantValue* from_)

Member Functions

void AddDependencies(GlobalVariable* variable, const std::unordered_map<std::string, GlobalVariable*>& nameMap, std::unordered_map<GlobalVariable*, std::set<GlobalVariable*>>& dependencies, Context& context) override
Type* GetType(Context& context) override
std::string Name(Context& context) override

Member Variables

ConstantValue* from
Type* type

Constructor Details

ConversionValue Constructor

cmsxi::ConversionValue::ConversionValue(Type * type_, ConstantValue * from_)

Definition at line 381 of Value.cpp :
381 : ConstantValue()type(type_)from(from_)
382 {
383 }


Declaration at line 221 of Value.hpp


Member Function Details

AddDependencies Member Function

void cmsxi::ConversionValue::AddDependencies(GlobalVariable * variable, const std::unordered_map<std::string, GlobalVariable *>& nameMap, std::unordered_map<GlobalVariable *, std::set<GlobalVariable *>>& dependencies, Context & context) override

Definition at line 397 of Value.cpp :
399 {
400     auto it = nameMap.find(from->Name(context));
401     if (it != nameMap.cend())
402     {
403         dependencies[variable].insert(it->second);
404     }
405 }


Declaration at line 224 of Value.hpp

Base class overridden functions: cmsxi::Value::AddDependencies

Calls: cmsxi::ConstantValue::Name


GetType Member Function

Type * cmsxi::ConversionValue::GetType(Context & context) override

Definition at line 392 of Value.cpp :
393 {
394     return type;
395 }


Declaration at line 223 of Value.hpp

Base class overridden functions: cmsxi::Value::GetType


Name Member Function

std::string cmsxi::ConversionValue::Name(Context & context) override

Definition at line 385 of Value.cpp :
386 {
387     std::string name = "conv(";
388     name.append(from->GetType(context)->Name()).append(1' ').append(from->Name(context)).append(1')');
389     return name;
390 }


Declaration at line 222 of Value.hpp

Base class overridden functions: cmsxi::ConstantValue::Name , cmsxi::Value::Name

Calls: cmsxi::ConstantValue::Name , cmsxi::Type::Name , cmsxi::Value::GetType


top | up | prev | next