summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/storage.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-17 12:38:40 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-17 12:38:40 +0100
commit927eb99e75325164a541c2638e1e607294019381 (patch)
tree5b5476456f0f957fc7492465ff08ace54e1a9e48 /flowgraph/storage.h
parentc9cb051fae190acfc36813e4a23759fb9b9c3df3 (diff)
Complete hierarchical evaluation (unittest and systemtest fixed)
Diffstat (limited to 'flowgraph/storage.h')
-rw-r--r--flowgraph/storage.h13
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