diff options
Diffstat (limited to 'flowgraph/data.h')
-rw-r--r-- | flowgraph/data.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/flowgraph/data.h b/flowgraph/data.h new file mode 100644 index 0000000..353567c --- /dev/null +++ b/flowgraph/data.h @@ -0,0 +1,51 @@ +#pragma once + +#include <cstdint> +#include <vector> + +namespace FlowGraph { + + // Explicitely not including size + enum class DataType + { + Size, + Int, + UInt, + Pointer, + Bool, + Char, + UChar, + }; + + class Storage; ///< forward declaration + + // Argument for Operations + // -> includes identity of data point, e.g. a local int variable + // Built up as a list of Data instances for global and local data points in parallel to FlowGraph + class Data + { + public: + Data(DataType type, std::shared_ptr<Storage> storage):m_type(type) {} + DataType type() const { return m_type; } + private: + const DataType m_type; + std::shared_ptr<Storage> m_storage; + }; + +} + +namespace GlobalData { + + // variable of simple or struct type + class Element + { + private: + size_t size; + std::vector<uint8_t> data; // may be empty if uninitialized + }; + + class Segment: public std::vector<Element> + { + }; + +} |