]> AND Public Git Repository - simgrid.git/blobdiff - include/simgrid/kernel/resource/Resource.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer "using" to "typedef".
[simgrid.git] / include / simgrid / kernel / resource / Resource.hpp
index d85f7c79c209856b75e96ae34299fc99d5bd9c94..8208360d8029c303dd34253e70ba2007368deebb 100644 (file)
@@ -34,6 +34,7 @@ protected:
     double scale;          /**< Current availability of the metric according to the profiles, in [0,1] */
     profile::Event* event; /**< The associated profile event associated to the metric */
   };
+  profile::Event* state_event_ = nullptr;
 
 public:
   /**
@@ -64,7 +65,7 @@ public:
   virtual void apply_event(profile::Event* event, double value) = 0;
 
   /** @brief Check if the current Resource is used (if it currently serves an action) */
-  virtual bool is_used() = 0;
+  virtual bool is_used() const = 0;
 
   /** @brief returns the current load due to activities (in flops per second, byte per second or similar)
    *
@@ -82,8 +83,6 @@ public:
 
   /** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */
   lmm::Constraint* get_constraint() const { return constraint_; }
-
-  profile::Event* state_event_ = nullptr;
 };
 } // namespace resource
 } // namespace kernel