- virtual void updateRemainingLazy(double now);
- void heapInsert(xbt_heap_t heap, double key, enum heap_action_type hat);
- void heapRemove(xbt_heap_t heap);
- double getRemains(); /**< Get the remains of an action */
- void updateIndexHeap(int i);
- lmm_variable_t getVariable() {return p_variable;}
- double getLastUpdate() {return m_lastUpdate;}
- void refreshLastUpdate() {m_lastUpdate = surf_get_clock();}
- enum heap_action_type getHat() {return m_hat;}
+ /**
+ * @brief Constructor of non-LMM Resources
+ *
+ * @param model Model associated to this Resource
+ * @param name The name of the Resource
+ * @param props Dictionary of properties associated to this Resource
+ */
+ Resource(Model *model, const char *name, xbt_dict_t props);
+
+ /**
+ * @brief Constructor of LMM Resources
+ *
+ * @param model Model associated to this Resource
+ * @param name The name of the Resource
+ * @param props Dictionary of properties associated to this Resource
+ * @param constraint The lmm constraint associated to this Resource if it is part of a LMM component
+ */
+ Resource(Model *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint);
+
+ Resource(Model *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint, e_surf_resource_state_t stateInit);
+
+ /**
+ * @brief Resource constructor
+ *
+ * @param model Model associated to this Resource
+ * @param name The name of the Resource
+ * @param props Dictionary of properties associated to this Resource
+ * @param stateInit the initial state of the Resource
+ */
+ Resource(Model *model, const char *name, xbt_dict_t props, e_surf_resource_state_t stateInit);
+
+ virtual ~Resource();
+
+ /** @brief Get the Model of the current Resource */
+ Model *getModel();
+
+ /** @brief Get the name of the current Resource */
+ const char *getName();
+
+ /** @brief Get the properties of the current Resource */
+ virtual xbt_dict_t getProperties();
+
+ /**
+ * @brief Update the state of the current Resource
+ * @details [TODO]
+ *
+ * @param event_type [TODO]
+ * @param value [TODO]
+ * @param date [TODO]
+ */
+ virtual void updateState(tmgr_trace_event_t event_type, double value, double date)=0;