Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
give a default value at field declaration, not everywhere in subclasses
[simgrid.git] / src / surf / surf_interface.hpp
index 3bccf4d..0d322d8 100644 (file)
@@ -62,16 +62,6 @@ namespace surf {
 }
 #endif
 
-// Deprecated:
-#define surf_callback(arg1, ...)  ::simgrid::surf::signal<arg1(__VA_ARGS__)>
-#define surf_callback_connect(callback, fun_ptr) callback.connect(fun_ptr)
-#define surf_callback_emit(callback, ...) callback(__VA_ARGS__)
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4251)
-// 4251: needs to have dll-interface to be used by clients of class
-#endif
-
 extern XBT_PRIVATE tmgr_history_t history;
 #define NO_MAX_DURATION -1.0
 
@@ -97,7 +87,7 @@ extern XBT_PRIVATE double sg_sender_gap;
 namespace simgrid {
 namespace surf {
 
-extern XBT_PRIVATE surf_callback(void, void) surfExitCallbacks;
+extern XBT_PRIVATE simgrid::surf::signal<void(void)> surfExitCallbacks;
 
 }
 }
@@ -302,7 +292,7 @@ protected:
   lmm_variable_t p_variable;
   double m_lastValue;
   double m_lastUpdate;
-  int m_suspended;
+  int m_suspended = 0;
   int m_indexHeap;
   enum heap_action_type m_hat;
 };
@@ -432,31 +422,28 @@ public:
    *
    * @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);
+  Resource(Model *model, const char *name);
 
   /**
    * @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, lmm_constraint_t constraint);
 
-  Resource(Model *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint, e_surf_resource_state_t stateInit);
+  Resource(Model *model, const char *name, 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);
+  Resource(Model *model, const char *name, e_surf_resource_state_t stateInit);
 
   virtual ~Resource();
 
@@ -466,9 +453,6 @@ public:
   /** @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]
@@ -496,7 +480,6 @@ public:
 
 private:
   const char *p_name;
-  xbt_dict_t p_properties;
   Model *p_model;
   bool m_running;
   e_surf_resource_state_t m_stateCurrent;
@@ -505,7 +488,7 @@ private:
 public: /* LMM */
   /** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component */
   lmm_constraint_t getConstraint();
-private:
+protected:
   lmm_constraint_t p_constraint;
 };