summaryrefslogtreecommitdiffstats
path: root/mmss/config.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'mmss/config.hpp')
-rw-r--r--mmss/config.hpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/mmss/config.hpp b/mmss/config.hpp
index 48f0634..702f142 100644
--- a/mmss/config.hpp
+++ b/mmss/config.hpp
@@ -35,17 +35,22 @@
namespace MMSS {
class config_t : public nocopy_t {
-public:
+private:
+ context_t *mmss;
+
std::list<std::shared_ptr<network_t>> network;
std::list<std::shared_ptr<node_t>> nodes;
-};
-namespace Config {
+ config_t(context_t *mmss0) : mmss(mmss0) {}
-void add_network(context_t *mmss, config_t *conf, const char *name);
+public:
+ context_t* get_context() const {
+ return mmss;
+ }
-}
+ void add_network(const char *name);
-bool read_config(context_t *mmss, config_t *conf, const char *filename);
+ static std::shared_ptr<const config_t> read(context_t *mmss, const char *filename);
+};
}