summaryrefslogtreecommitdiffhomepage
path: root/flowgraph/graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'flowgraph/graph.h')
-rw-r--r--flowgraph/graph.h22
1 files changed, 18 insertions, 4 deletions
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 <deque>
#include <exception>
#include <memory>
-#include <string>
#include <stdexcept>
-#include <vector>
namespace FlowGraph {
- class Graph: public std::vector<std::shared_ptr<Node>>
+ class Graph: public std::deque<std::shared_ptr<Node>>
{
public:
- Graph() {}
+ Graph();
+ Graph(const std::deque<std::shared_ptr<Node>>& 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> node);
+
+ std::shared_ptr<Node> lastOp() const;
};
}