Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case some resource::Action fields and cleanups
[simgrid.git] / include / simgrid / kernel / resource / Model.hpp
index 98bc158..541bbd9 100644 (file)
@@ -35,36 +35,36 @@ public:
   virtual ~Model();
 
   /** @brief Get the set of [actions](@ref Action) in *ready* state */
-  virtual ActionList* getReadyActionSet() const { return readyActionSet_; }
+  Action::StateSet* getReadyActionSet() const { return ready_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *running* state */
-  virtual ActionList* getRunningActionSet() const { return runningActionSet_; }
+  Action::StateSet* getRunningActionSet() const { return running_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *failed* state */
-  virtual ActionList* getFailedActionSet() const { return failedActionSet_; }
+  Action::StateSet* getFailedActionSet() const { return failed_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *done* state */
-  virtual ActionList* getDoneActionSet() const { return doneActionSet_; }
+  Action::StateSet* getDoneActionSet() const { return done_action_set_; }
 
   /** @brief Get the set of modified [actions](@ref Action) */
-  virtual ActionLmmListPtr getModifiedSet() const { return modifiedSet_; }
+  Action::ModifiedSet* getModifiedSet() const;
 
   /** @brief Get the maxmin system of the current Model */
-  lmm_system_t getMaxminSystem() const { return maxminSystem_; }
+  lmm::System* getMaxminSystem() const { return maxmin_system_; }
 
   /**
    * @brief Get the update mechanism of the current Model
    * @see e_UM_t
    */
-  e_UM_t getUpdateMechanism() const { return updateMechanism_; }
-  void setUpdateMechanism(e_UM_t mechanism) { updateMechanism_ = mechanism; }
+  e_UM_t getUpdateMechanism() const { return update_mechanism_; }
+  void setUpdateMechanism(e_UM_t mechanism) { update_mechanism_ = mechanism; }
 
   /** @brief Get Action heap */
-  heap_type& getActionHeap() { return actionHeap_; }
+  heap_type& getActionHeap() { return action_heap_; }
 
-  double actionHeapTopDate() const { return actionHeap_.top().first; }
+  double actionHeapTopDate() const { return action_heap_.top().first; }
   Action* actionHeapPop();
-  bool actionHeapIsEmpty() const { return actionHeap_.empty(); }
+  bool actionHeapIsEmpty() const { return action_heap_.empty(); }
 
   /**
    * @brief Share the resources between the actions
@@ -94,17 +94,15 @@ public:
   virtual bool nextOccuringEventIsIdempotent() { return true; }
 
 protected:
-  ActionLmmListPtr modifiedSet_;
-  lmm_system_t maxminSystem_ = nullptr;
-  bool selectiveUpdate_;
+  lmm::System* maxmin_system_ = nullptr;
 
 private:
-  e_UM_t updateMechanism_ = UM_UNDEFINED;
-  ActionList* readyActionSet_;   /**< Actions in state SURF_ACTION_READY */
-  ActionList* runningActionSet_; /**< Actions in state SURF_ACTION_RUNNING */
-  ActionList* failedActionSet_;  /**< Actions in state SURF_ACTION_FAILED */
-  ActionList* doneActionSet_;    /**< Actions in state SURF_ACTION_DONE */
-  heap_type actionHeap_;
+  e_UM_t update_mechanism_        = UM_UNDEFINED;
+  Action::StateSet* ready_action_set_   = new Action::StateSet(); /**< Actions in state SURF_ACTION_READY */
+  Action::StateSet* running_action_set_ = new Action::StateSet(); /**< Actions in state SURF_ACTION_RUNNING */
+  Action::StateSet* failed_action_set_  = new Action::StateSet(); /**< Actions in state SURF_ACTION_FAILED */
+  Action::StateSet* done_action_set_    = new Action::StateSet(); /**< Actions in state SURF_ACTION_DONE */
+  heap_type action_heap_;
 };
 
 } // namespace resource