summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/storage.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-06 18:20:34 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-06 18:20:34 +0100
commit71c7fd62f8b5257b82cf32b0f747fcf313fcc617 (patch)
tree6f014b14d08080459a04a965912c62605d9015ca /flowgraph/storage.h
parent62aafc5c9273cb0b7a91bf2e4dee1ac2d3658bb3 (diff)
Prepare Token/Node handling
Diffstat (limited to 'flowgraph/storage.h')
-rw-r--r--flowgraph/storage.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/flowgraph/storage.h b/flowgraph/storage.h
index c2fa7c5..efd7d52 100644
--- a/flowgraph/storage.h
+++ b/flowgraph/storage.h
@@ -1,3 +1,4 @@
+// Different kinds of abstract storage locations: Constants, Global and Local Storage, Temporaries, ...
#pragma once
#include "data.h"
@@ -15,13 +16,13 @@ namespace FlowGraph {
class Storage
{
public:
- virtual ~Storage() {} // force class to be polymorphic
+ virtual ~Storage() {} // force class to be polymorphic, for smart pointers
};
class Constant: public Storage
{
public:
- Constant(std::vector<uint8_t> value) {} // little endian data
+ Constant(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;