Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
start snake_case()ing some private fields
[simgrid.git] / include / simgrid / kernel / resource / Resource.hpp
index f70ea2d..551ff4c 100644 (file)
@@ -6,7 +6,12 @@
 #ifndef SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP
 #define SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP
 
-#include "src/surf/surf_interface.hpp"
+#include <simgrid/forward.h>
+#include <xbt/signal.hpp>
+#include <xbt/str.h>
+#include <xbt/utility.hpp>
+
+#include <string>
 
 namespace simgrid {
 namespace kernel {
@@ -45,7 +50,7 @@ public:
    * @param event What happened
    * @param value [TODO]
    */
-  virtual void apply_event(tmgr_trace_event_t event, double value) = 0;
+  virtual void apply_event(TraceEvent* event, double value) = 0;
 
   /** @brief Check if the current Resource is used (if it currently serves an action) */
   virtual bool isUsed() = 0;
@@ -65,7 +70,7 @@ public:
 private:
   std::string name_;
   Model* model_;
-  bool isOn_ = true;
+  bool is_on_ = true;
 
 public: /* LMM */
   /** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */
@@ -76,9 +81,9 @@ private:
 
 protected:
   struct Metric {
-    double peak;              /**< The peak of the metric, ie its max value */
-    double scale;             /**< Current availability of the metric according to the traces, in [0,1] */
-    tmgr_trace_event_t event; /**< The associated trace event associated to the metric */
+    double peak;       /**< The peak of the metric, ie its max value */
+    double scale;      /**< Current availability of the metric according to the traces, in [0,1] */
+    TraceEvent* event; /**< The associated trace event associated to the metric */
   };
 };
 } // namespace resource