-/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2020. 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 "src/kernel/resource/profile/FutureEvtSet.hpp"
+#include "src/kernel/resource/profile/Event.hpp"
+#include "src/kernel/resource/profile/Profile.hpp"
namespace simgrid {
namespace kernel {
namespace profile {
-
+
+simgrid::kernel::profile::FutureEvtSet future_evt_set; // FIXME: singleton antipattern
+
FutureEvtSet::FutureEvtSet() = default;
FutureEvtSet::~FutureEvtSet()
{
if (event_date > date || heap_.empty())
return nullptr;
- Event* event = heap_.top().second;
- Profile* profile = event->profile;
+ Event* event = heap_.top().second;
+ Profile* profile = event->profile;
DatedValue dateVal = profile->next(event);
*resource = event->resource;
- *value = dateVal.value_;
+ *value = dateVal.value_;
heap_.pop();
}
} // namespace profile
} // namespace kernel
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid