Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove a level of indirection in sd::Global.
[simgrid.git] / src / simdag / simdag_private.hpp
index fc9403f..e452c3b 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2019. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -20,15 +19,11 @@ namespace simgrid{
 namespace sd{
 class Global {
 public:
-  explicit Global();
-  Global(const Global&) = delete;
-  Global& operator=(const Global&) = delete;
-  ~Global();
-  bool watch_point_reached;      /* has a task just reached a watch point? */
-  std::set<SD_task_t> *initial_tasks;
-  std::set<SD_task_t> *runnable_tasks;
-  std::set<SD_task_t> *completed_tasks;
-  std::set<SD_task_t> *return_set;
+  bool watch_point_reached = false; /* has a task just reached a watch point? */
+  std::set<SD_task_t> initial_tasks;
+  std::set<SD_task_t> runnable_tasks;
+  std::set<SD_task_t> completed_tasks;
+  std::set<SD_task_t> return_set;
 };
 
 std::set<SD_task_t>* simulate (double how_long);
@@ -52,7 +47,7 @@ struct s_SD_task_t {
 
   bool marked = false; /* used to check if the task DAG has some cycle*/
 
-  /* dependencies */
+  /* dependencies -- cannot be embedded in the struct since it's not handled as a real C++ class */
   std::set<SD_task_t> *inputs;
   std::set<SD_task_t> *outputs;
   std::set<SD_task_t> *predecessors;