Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / src / kernel / resource / profile / FutureEvtSet.hpp
index f565f0a..535325d 100644 (file)
@@ -1,15 +1,15 @@
-/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2023. 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. */
 
-#include <queue>
 #ifndef FUTUREEVTSET_HPP
 #define FUTUREEVTSET_HPP
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+#include "simgrid/forward.h"
+#include <queue>
+
+namespace simgrid::kernel::profile {
 
 /** @brief Future Event Set (collection of iterators over the traces)
  * That's useful to quickly know which is the next occurring event in a set of traces. */
@@ -24,12 +24,13 @@ public:
   void add_event(double date, Event* evt);
 
 private:
-  typedef std::pair<double, Event*> Qelt;
-  std::priority_queue<Qelt, std::vector<Qelt>, std::greater<Qelt>> heap_;
+  using Qelt = std::pair<double, Event*>;
+  std::priority_queue<Qelt, std::vector<Qelt>, std::greater<>> heap_;
 };
 
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+// FIXME: kill that singleton
+extern XBT_PRIVATE simgrid::kernel::profile::FutureEvtSet future_evt_set;
+
+} // namespace simgrid::kernel::profile
 
-#endif
\ No newline at end of file
+#endif