summaryrefslogtreecommitdiffstats
path: root/src/Flowgraph.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-01 17:18:24 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-01 17:18:24 +0200
commit31edd6a85f52c855d54594dc9f8ceda694d3ebea (patch)
tree60ad2c84d28a495082e0b083e072a934bc142634 /src/Flowgraph.h
parent1c25545bb03ea074b5871be3234bf0d1be20a6a3 (diff)
downloaddabmod-31edd6a85f52c855d54594dc9f8ceda694d3ebea.tar.gz
dabmod-31edd6a85f52c855d54594dc9f8ceda694d3ebea.tar.bz2
dabmod-31edd6a85f52c855d54594dc9f8ceda694d3ebea.zip
Switch to C++11, remove boost::shared_ptr
Diffstat (limited to 'src/Flowgraph.h')
-rw-r--r--src/Flowgraph.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/Flowgraph.h b/src/Flowgraph.h
index 1129668..9c6c2d8 100644
--- a/src/Flowgraph.h
+++ b/src/Flowgraph.h
@@ -34,24 +34,23 @@
#include "porting.h"
#include "ModPlugin.h"
-
+#include <memory>
#include <sys/types.h>
#include <vector>
-#include <boost/shared_ptr.hpp>
class Node
{
public:
- Node(boost::shared_ptr<ModPlugin> plugin);
+ Node(std::shared_ptr<ModPlugin> plugin);
~Node();
Node(const Node&);
Node& operator=(const Node&);
- boost::shared_ptr<ModPlugin> plugin() { return myPlugin; }
+ std::shared_ptr<ModPlugin> plugin() { return myPlugin; }
- std::vector<boost::shared_ptr<Buffer> > myInputBuffers;
- std::vector<boost::shared_ptr<Buffer> > myOutputBuffers;
+ std::vector<std::shared_ptr<Buffer> > myInputBuffers;
+ std::vector<std::shared_ptr<Buffer> > myOutputBuffers;
int process();
time_t processTime() { return myProcessTime; }
@@ -60,7 +59,7 @@ public:
}
protected:
- boost::shared_ptr<ModPlugin> myPlugin;
+ std::shared_ptr<ModPlugin> myPlugin;
time_t myProcessTime;
};
@@ -68,15 +67,15 @@ protected:
class Edge
{
public:
- Edge(boost::shared_ptr<Node>& src, boost::shared_ptr<Node>& dst);
+ Edge(std::shared_ptr<Node>& src, std::shared_ptr<Node>& dst);
~Edge();
Edge(const Edge&);
Edge& operator=(const Edge&);
protected:
- boost::shared_ptr<Node> mySrcNode;
- boost::shared_ptr<Node> myDstNode;
- boost::shared_ptr<Buffer> myBuffer;
+ std::shared_ptr<Node> mySrcNode;
+ std::shared_ptr<Node> myDstNode;
+ std::shared_ptr<Buffer> myBuffer;
};
@@ -88,13 +87,13 @@ public:
Flowgraph(const Flowgraph&);
Flowgraph& operator=(const Flowgraph&);
- void connect(boost::shared_ptr<ModPlugin> input,
- boost::shared_ptr<ModPlugin> output);
+ void connect(std::shared_ptr<ModPlugin> input,
+ std::shared_ptr<ModPlugin> output);
bool run();
protected:
- std::vector<boost::shared_ptr<Node> > nodes;
- std::vector<boost::shared_ptr<Edge> > edges;
+ std::vector<std::shared_ptr<Node> > nodes;
+ std::vector<std::shared_ptr<Edge> > edges;
time_t myProcessTime;
};