+typedef std::pair<double, simgrid::kernel::resource::Action*> heap_element_type;
+class XBT_PUBLIC ActionHeap : public heap_type {
+ friend Action;
+
+public:
+ enum class Type {
+ latency = 100, /* this is a heap entry to warn us when the latency is payed */
+ max_duration, /* this is a heap entry to warn us when the max_duration limit (timeout) is reached */
+ normal, /* this is a normal heap entry stating the date to finish transmitting */
+ unset
+ };
+
+ double top_date() const;
+ void insert(Action* action, double date, ActionHeap::Type type);
+ void update(Action* action, double date, ActionHeap::Type type);
+ void remove(Action* action);
+ Action* pop();
+};
+
+/** @details An action is a consumption on a resource (e.g.: a communication for the network).
+ *
+ * It is related (but still different) from activities, that are the stuff on which an actor can be blocked.
+ * See simgrid::s4u::Activity for more details.
+ */