Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Triggers the destructed callbacks on the full object
[simgrid.git] / src / surf / vm_hl13.hpp
index 311c0f8..ca0f380 100644 (file)
@@ -7,7 +7,7 @@
 #include "xbt/base.h"
 
 #include "host_clm03.hpp"
-#include "vm_interface.hpp"
+#include "virtual_machine.hpp"
 
 #ifndef SURF_VM_HPP_
 #define SURF_VM_HPP_
@@ -15,6 +15,9 @@
 #define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
                           // It corresponds to the cost of a VM running no tasks.
 
+namespace simgrid {
+namespace surf {
+
 /***********
  * Classes *
  ***********/
@@ -30,24 +33,24 @@ public:
   VMHL13Model();
   ~VMHL13Model(){};
 
-  VM *createVM(const char *name, surf_resource_t host_PM);
+  VirtualMachine *createVM(const char *name, sg_host_t host_PM) override;
   double shareResources(double now);
-  void adjustWeightOfDummyCpuActions() {};
+  void adjustWeightOfDummyCpuActions() override {};
   Action *executeParallelTask(int host_nb,
                               sg_host_t *host_list,
                                                          double *flops_amount,
                                                          double *bytes_amount,
-                                                         double rate);
-  void updateActionsState(double /*now*/, double /*delta*/);
+                                                         double rate) override;
+  void updateActionsState(double /*now*/, double /*delta*/) override;
 };
 
 /************
  * Resource *
  ************/
 
-class VMHL13 : public VM {
+class VMHL13 : public VirtualMachine {
 public:
-  VMHL13(VMModel *model, const char* name, xbt_dict_t props, surf_resource_t host_PM);
+  VMHL13(VMModel *model, const char* name, xbt_dict_t props, sg_host_t host_PM);
   ~VMHL13();
 
   void suspend();
@@ -56,12 +59,12 @@ public:
   void save();
   void restore();
 
-  void migrate(surf_resource_t ind_dst_pm);
+  void migrate(sg_host_t ind_dst_pm);
 
   e_surf_resource_state_t getState();
   void setState(e_surf_resource_state_t state);
 
-  surf_resource_t getPm(); // will be vm_ws_get_pm()
+  sg_host_t getPm(); // will be vm_ws_get_pm()
 
   void setBound(double bound);
   void setAffinity(Cpu *cpu, unsigned long mask);
@@ -78,4 +81,7 @@ public:
  * Action *
  **********/
 
+}
+}
+
 #endif /* SURF_VM_HPP_ */