diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-17 12:38:40 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-17 12:38:40 +0100 |
commit | 927eb99e75325164a541c2638e1e607294019381 (patch) | |
tree | 5b5476456f0f957fc7492465ff08ace54e1a9e48 /flowgraph/storage.h | |
parent | c9cb051fae190acfc36813e4a23759fb9b9c3df3 (diff) |
Complete hierarchical evaluation (unittest and systemtest fixed)
Diffstat (limited to 'flowgraph/storage.h')
-rw-r--r-- | flowgraph/storage.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/flowgraph/storage.h b/flowgraph/storage.h index 27c201e..7b5c53b 100644 --- a/flowgraph/storage.h +++ b/flowgraph/storage.h @@ -5,6 +5,7 @@ #include "scope.h" #include <cstdint> +#include <memory> #include <string> #include <vector> @@ -23,7 +24,7 @@ namespace FlowGraph { class Constant: public Storage { public: - Constant(std::vector<uint8_t>& value): m_value(value) {} // little endian data + Constant(const std::vector<uint8_t>& value): m_value(value) {} // little endian data const std::vector<uint8_t>& value() const { return m_value; } private: std::vector<uint8_t> m_value; @@ -42,12 +43,10 @@ namespace FlowGraph { class LocalStorage : public Storage { public: - LocalStorage(LocalScope& scope, const std::string& name): m_name(name), m_scope(scope) {} + LocalStorage(const std::string& name); const std::string& name() const { return m_name; } - index_t indexOfStorage() const; private: std::string m_name; - LocalScope& m_scope; }; // intermediate results, anonymous values @@ -55,11 +54,7 @@ namespace FlowGraph { class TemporaryStorage : public Storage { public: - TemporaryStorage(LocalScope& scope); - std::string name() const; - index_t indexOfStorage() const; - private: - LocalScope& m_scope; + TemporaryStorage(); }; // dereferenced pointer |