* @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
* @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;
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] */