Added movement storing
This commit is contained in:
1 parent
e2e0506041
commit
281926cb8b
5 files changed
+48
-14
No files matched your search
@@ -946,7 +946,7 @@ vector<Enumeration> SchemaCreator::createWireEnumeration(vector<Value> wireValue
|
||||
}
|
||||
|
||||
std::optional<Attribute> SchemaCreator::createMemoryAttribute() {
|
||||
return Attribute("_memory", Value::fromMemoryReference(nullopt), createMemoryPopup());
|
||||
return Attribute("_memory", Value::fromMemoryReference(std::nullopt), createMemoryPopup());
|
||||
}
|
||||
|
||||
std::optional<Popup> SchemaCreator::createMemoryPopup() {
|
||||
|
||||
@@ -162,10 +162,10 @@ std::string Value::stringify() {
|
||||
case ATTRIBUTE_REFERENCE:
|
||||
return reference;
|
||||
case MEMORY_REFERENCE:
|
||||
if(memoryReference->empty()) {
|
||||
return "null";
|
||||
} else {
|
||||
if(memoryReference.has_value()) {
|
||||
return memoryReference.value();
|
||||
} else {
|
||||
return "null";
|
||||
}
|
||||
default:
|
||||
throw std::exception();
|
||||
|
||||
@@ -29,22 +29,20 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
long long intValue;
|
||||
long long intValue = 0;
|
||||
std::string stringValue;
|
||||
bool boolValue;
|
||||
std::optional<AddressSpace> addressSpace;
|
||||
bool boolValue = false;
|
||||
std::optional<AddressSpace> addressSpace = std::nullopt;
|
||||
std::string reference;
|
||||
domain::ComponentInstance *memory;
|
||||
domain::ComponentInstance *memory = nullptr;
|
||||
|
||||
std::optional<std::string> memoryReference;
|
||||
std::optional<std::string> memoryReference = std::nullopt;
|
||||
|
||||
ValueType type;
|
||||
ValueType type = UNDEFINED;
|
||||
|
||||
public:
|
||||
|
||||
Value() {
|
||||
this->type = UNDEFINED;
|
||||
}
|
||||
Value() {}
|
||||
|
||||
bool equals(Value value) {
|
||||
if(value.getType() == type) {
|
||||
|
||||
Reference in new issue
Block a user