summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/storage.h
diff options
context:
space:
mode:
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