From 3a20c7dbf7efa851a373f8ab8d4659bb977d6961 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 22 Feb 2015 18:37:37 +0100 Subject: Start using shared_ptr inside Flowgraph --- src/Flowgraph.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/Flowgraph.h') diff --git a/src/Flowgraph.h b/src/Flowgraph.h index 178b6a9..00b8d42 100644 --- a/src/Flowgraph.h +++ b/src/Flowgraph.h @@ -32,6 +32,7 @@ #include #include +#include class Node @@ -44,8 +45,8 @@ public: ModPlugin* plugin() { return myPlugin; } - std::vector myInputBuffers; - std::vector myOutputBuffers; + std::vector > myInputBuffers; + std::vector > myOutputBuffers; int process(); time_t processTime() { return myProcessTime; } @@ -62,15 +63,15 @@ protected: class Edge { public: - Edge(Node* src, Node* dst); + Edge(boost::shared_ptr& src, boost::shared_ptr& dst); ~Edge(); Edge(const Edge&); Edge& operator=(const Edge&); protected: - Node* mySrcNode; - Node* myDstNode; - Buffer* myBuffer; + boost::shared_ptr mySrcNode; + boost::shared_ptr myDstNode; + boost::shared_ptr myBuffer; }; @@ -86,10 +87,11 @@ public: bool run(); protected: - std::vector nodes; - std::vector edges; + std::vector > nodes; + std::vector > edges; time_t myProcessTime; }; #endif // FLOWGRAPH_H + -- cgit v1.2.3