Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
prepare transition of context_factory: make it private
[simgrid.git] / src / simix / smx_private.hpp
index 054f2ec..a57df81 100644 (file)
@@ -16,11 +16,18 @@ namespace simgrid {
 namespace simix {
 
 class Global {
-public:
+  kernel::context::ContextFactory* context_factory_ = nullptr;
 
-  kernel::context::ContextFactory* context_factory = nullptr;
+public:
   kernel::actor::ActorImpl* maestro_ = nullptr;
-
+  kernel::context::ContextFactory* get_context_factory() const { return context_factory_; }
+  void set_context_factory(kernel::context::ContextFactory* factory) { context_factory_ = factory; }
+  bool has_context_factory() const { return context_factory_ != nullptr; }
+  void destroy_context_factory()
+  {
+    delete context_factory_;
+    context_factory_ = nullptr;
+  }
 };
 }
 }