summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'flowgraph/storage.h')
-rw-r--r--flowgraph/storage.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/flowgraph/storage.h b/flowgraph/storage.h
index fd3c085..7f648b0 100644
--- a/flowgraph/storage.h
+++ b/flowgraph/storage.h
@@ -2,6 +2,7 @@
#pragma once
#include "data.h"
+#include "scope.h"
#include <cstdint>
#include <string>
@@ -37,16 +38,7 @@ namespace FlowGraph {
std::string m_name;
};
- // Provide a context for local temporaries name generation
- class LocalScope
- {
- public:
- LocalScope() = default;
- size_t getNewIndex() { return m_index++; }
- private:
- size_t m_index{ 0 };
- };
-
+ // named values
class LocalStorage : public Storage
{
public:
@@ -62,9 +54,9 @@ namespace FlowGraph {
{
public:
TemporaryStorage(LocalScope& scope);
- const std::string& name() const { return m_name; }
+ std::string name() const;
private:
- std::string m_name;
+ LocalScope& m_scope;
};
// dereferenced pointer