summaryrefslogtreecommitdiffstats
path: root/src/Flowgraph.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-02-22 18:37:37 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-02-22 18:37:37 +0100
commit3a20c7dbf7efa851a373f8ab8d4659bb977d6961 (patch)
tree8c60dbf8805724f0fc11dc0a927d468624c24dcb /src/Flowgraph.h
parentc5c21c73c310c29675bff1a1f2da4ddd298c0f92 (diff)
downloaddabmod-3a20c7dbf7efa851a373f8ab8d4659bb977d6961.tar.gz
dabmod-3a20c7dbf7efa851a373f8ab8d4659bb977d6961.tar.bz2
dabmod-3a20c7dbf7efa851a373f8ab8d4659bb977d6961.zip
Start using shared_ptr inside Flowgraph
Diffstat (limited to 'src/Flowgraph.h')
-rw-r--r--src/Flowgraph.h18
1 files changed, 10 insertions, 8 deletions
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 <sys/types.h>
#include <vector>
+#include <boost/shared_ptr.hpp>
class Node
@@ -44,8 +45,8 @@ public:
ModPlugin* plugin() { return myPlugin; }
- std::vector<Buffer*> myInputBuffers;
- std::vector<Buffer*> myOutputBuffers;
+ std::vector<boost::shared_ptr<Buffer> > myInputBuffers;
+ std::vector<boost::shared_ptr<Buffer> > 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<Node>& src, boost::shared_ptr<Node>& dst);
~Edge();
Edge(const Edge&);
Edge& operator=(const Edge&);
protected:
- Node* mySrcNode;
- Node* myDstNode;
- Buffer* myBuffer;
+ boost::shared_ptr<Node> mySrcNode;
+ boost::shared_ptr<Node> myDstNode;
+ boost::shared_ptr<Buffer> myBuffer;
};
@@ -86,10 +87,11 @@ public:
bool run();
protected:
- std::vector<Node*> nodes;
- std::vector<Edge*> edges;
+ std::vector<boost::shared_ptr<Node> > nodes;
+ std::vector<boost::shared_ptr<Edge> > edges;
time_t myProcessTime;
};
#endif // FLOWGRAPH_H
+