summaryrefslogtreecommitdiffstats
path: root/mmss/mmss.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'mmss/mmss.hpp')
-rw-r--r--mmss/mmss.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/mmss/mmss.hpp b/mmss/mmss.hpp
index d7202e7..723e0d6 100644
--- a/mmss/mmss.hpp
+++ b/mmss/mmss.hpp
@@ -34,13 +34,13 @@
struct gmrf {
private:
- gmrf(MMSS::context_t *mmss0, const std::string &name0, unsigned rand_seed0, const MMSS::protocol_t *proto0) :
+ gmrf(MMSS::context_t *mmss0, const std::string &name0, unsigned rand_seed0, const std::shared_ptr<const MMSS::protocol_t> &proto0) :
mmss(mmss0), name(name0), rand_seed(rand_seed0), proto(proto0) {}
gmrf(gmrf const&) = delete;
gmrf& operator=(gmrf const&) = delete;
public:
- static std::shared_ptr<MMSS::node_t> create(MMSS::context_t *mmss, const std::string &name, unsigned rand_seed, const MMSS::protocol_t *proto) {
+ static std::shared_ptr<MMSS::node_t> create(MMSS::context_t *mmss, const std::string &name, unsigned rand_seed, const std::shared_ptr<const MMSS::protocol_t> &proto) {
MMSS::node_t *node = new MMSS::node_t(mmss, name, rand_seed, proto);
std::shared_ptr<MMSS::node_t> ptr(node);
@@ -60,7 +60,7 @@ public:
unsigned rand_seed;
- const MMSS::protocol_t *proto;
+ std::shared_ptr<const MMSS::protocol_t> proto;
};
struct gmrf_iface {
@@ -84,8 +84,8 @@ public:
std::string name;
gmrf_addr_t address;
- std::weak_ptr<MMSS::node_t> node;
- std::weak_ptr<MMSS::network_t> net;
+ MMSS::node_t *node;
+ MMSS::network_t *net;
};
@@ -132,7 +132,7 @@ public:
};
-const protocol_t* load_protocol(const char *module);
+std::shared_ptr<const protocol_t> load_protocol(const char *module);
bool read_config(context_t *mmss, config_t *conf, const char *filename);