- boost::intrusive::list_member_hook<> stateSetHook_;
- typedef boost::intrusive::member_hook<Action, boost::intrusive::list_member_hook<>, &Action::stateSetHook_>
- ActionOptions;
- typedef boost::intrusive::list<Action, ActionOptions> ActionList;
+/** @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.
+ *
+ * - A sequential execution activity encompasses 2 actions: one for the exec itself,
+ * and a time-limited sleep used as timeout detector.
+ * - A point-to-point communication activity encompasses 3 actions: one for the comm itself
+ * (which spans on all links of the path), and one infinite sleep used as failure detector
+ * on both sender and receiver hosts.
+ * - Synchronization activities may possibly be connected to no action.
+
+ */
+class XBT_PUBLIC Action {
+ friend ActionHeap;
+
+public:
+ /* Lazy update needs this Set hook to maintain a list of the tracked actions */
+ boost::intrusive::list_member_hook<> modified_set_hook_;
+ bool is_within_modified_set() const { return modified_set_hook_.is_linked(); }
+ typedef boost::intrusive::list<
+ Action, boost::intrusive::member_hook<Action, boost::intrusive::list_member_hook<>, &Action::modified_set_hook_>>
+ ModifiedSet;
+
+ boost::intrusive::list_member_hook<> state_set_hook_;
+ typedef boost::intrusive::list<
+ Action, boost::intrusive::member_hook<Action, boost::intrusive::list_member_hook<>, &Action::state_set_hook_>>
+ StateSet;