Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #256 from Flamefire/master
[simgrid.git] / src / kernel / resource / Resource.hpp
index 80481fb..c8eb5c6 100644 (file)
@@ -16,8 +16,7 @@ namespace resource {
  * @brief SURF resource interface class
  * @details This is the ancestor class of every resources in SimGrid, such as links, CPU or storage
  */
-XBT_PUBLIC_CLASS Resource
-{
+class XBT_PUBLIC Resource {
 public:
   /**
    * @brief Constructor of LMM Resources
@@ -26,12 +25,12 @@ public:
    * @param name The name of the Resource
    * @param constraint The lmm constraint associated to this Resource if it is part of a LMM component
    */
-  Resource(surf::Model * model, const std::string& name, lmm::Constraint* constraint);
+  Resource(Model * model, const std::string& name, lmm::Constraint* constraint);
 
   virtual ~Resource();
 
   /** @brief Get the Model of the current Resource */
-  surf::Model* model() const;
+  Model* model() const;
 
   /** @brief Get the name of the current Resource */
   const std::string& getName() const;
@@ -65,16 +64,17 @@ public:
 
 private:
   std::string name_;
-  surf::Model* model_;
+  Model* model_;
   bool isOn_ = true;
 
 public: /* LMM */
   /** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */
   kernel::lmm::Constraint* constraint() const;
 
-protected:
-  const kernel::lmm::Constraint* constraint_ = nullptr;
+private:
+  kernel::lmm::Constraint* const constraint_ = nullptr;
 
+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] */