1 /* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef FUTUREEVTSET_HPP
8 #define FUTUREEVTSET_HPP
14 /** @brief Future Event Set (collection of iterators over the traces)
15 * That's useful to quickly know which is the next occurring event in a set of traces. */
16 class XBT_PUBLIC FutureEvtSet {
19 FutureEvtSet(const FutureEvtSet&) = delete;
20 FutureEvtSet& operator=(const FutureEvtSet&) = delete;
21 virtual ~FutureEvtSet();
22 double next_date() const;
23 Event* pop_leq(double date, double* value, resource::Resource** resource);
24 void add_event(double date, Event* evt);
27 typedef std::pair<double, Event*> Qelt;
28 std::priority_queue<Qelt, std::vector<Qelt>, std::greater<Qelt>> heap_;
31 } // namespace profile
33 } // namespace simgrid