diff options
author | Kenneth Mortensen <mortensenit@users.noreply.github.com> | 2015-04-22 11:39:19 +0200 |
---|---|---|
committer | Kenneth Mortensen <mortensenit@users.noreply.github.com> | 2015-04-22 11:39:19 +0200 |
commit | d45f9b924c54fc40c228b8d3709e93fed7720705 (patch) | |
tree | 1192e317e6fdfae692f67843400b698c49ee7a1f /src/Flowgraph.h | |
parent | 191817b42ad86a250bbff02895e9646f51531672 (diff) | |
parent | 81775f47227c5d08a05b43ffb3855bff0a237c1d (diff) | |
download | dabmod-d45f9b924c54fc40c228b8d3709e93fed7720705.tar.gz dabmod-d45f9b924c54fc40c228b8d3709e93fed7720705.tar.bz2 dabmod-d45f9b924c54fc40c228b8d3709e93fed7720705.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
src/InputFileReader.cpp
Diffstat (limited to 'src/Flowgraph.h')
-rw-r--r-- | src/Flowgraph.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/Flowgraph.h b/src/Flowgraph.h index 178b6a9..1129668 100644 --- a/src/Flowgraph.h +++ b/src/Flowgraph.h @@ -1,6 +1,11 @@ /* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) + + Copyright (C) 2015 + Matthias P. Braendli, matthias.braendli@mpb.li + + http://opendigitalradio.org */ /* This file is part of ODR-DabMod. @@ -32,20 +37,21 @@ #include <sys/types.h> #include <vector> +#include <boost/shared_ptr.hpp> class Node { public: - Node(ModPlugin* plugin); + Node(boost::shared_ptr<ModPlugin> plugin); ~Node(); Node(const Node&); Node& operator=(const Node&); - ModPlugin* plugin() { return myPlugin; } + boost::shared_ptr<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; } @@ -54,7 +60,7 @@ public: } protected: - ModPlugin* myPlugin; + boost::shared_ptr<ModPlugin> myPlugin; time_t myProcessTime; }; @@ -62,15 +68,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; }; @@ -82,14 +88,16 @@ public: Flowgraph(const Flowgraph&); Flowgraph& operator=(const Flowgraph&); - void connect(ModPlugin* input, ModPlugin* output); + void connect(boost::shared_ptr<ModPlugin> input, + boost::shared_ptr<ModPlugin> output); 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 + |