From a3b4cd4fdd4340c952eaa00bca9bebf817b901ae Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 15 Nov 2020 18:39:01 +0100 Subject: Fixed unit tests, prepared hierarchical evaluation via stack (WIP) --- flowgraph/graph.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'flowgraph/graph.h') diff --git a/flowgraph/graph.h b/flowgraph/graph.h index 265a3bd..15c6aef 100644 --- a/flowgraph/graph.h +++ b/flowgraph/graph.h @@ -2,18 +2,32 @@ #include "node.h" +#include #include #include -#include #include -#include namespace FlowGraph { - class Graph: public std::vector> + class Graph: public std::deque> { public: - Graph() {} + Graph(); + Graph(const std::deque>& nodes); + Graph(const Graph& other) = default; + ~Graph(); + + Graph& operator= (const Graph&) = default; + + // returns the outermost scope inside this graph + LocalScope& scope() const; + + // append other graph by joining the respective outermost scopes + void append(const Graph& other); + + void append(std::shared_ptr node); + + std::shared_ptr lastOp() const; }; } -- cgit v1.2.3