Adding optional to differentiate between empty sets and unset attributes

Signed-off-by: Ethan Mahintorabi <[email protected]>
This commit is contained in:
Ethan Mahintorabi
2024-03-10 01:56:33 +00:00
parent 36c1bade14
commit 8aef4d549e
8 changed files with 48 additions and 23 deletions
+2 -1
View File
@@ -17,6 +17,7 @@
#pragma once
#include <functional>
#include <optional>
#include "Vector.hh"
#include "Map.hh"
@@ -108,7 +109,7 @@ public:
void setIsLeaf(bool is_leaf);
void setAttribute(const std::string &key,
const std::string &value);
std::string getAttribute(const std::string &key) const;
std::optional<std::string> getAttribute(const std::string &key) const;
// Cell acts as port factory.
ConcretePort *makePort(const char *name);