Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[Doc] Updated deployment description file.
[simgrid.git] / src / surf / vm_interface.hpp
index 0dede2e..64a4cef 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2014. The SimGrid Team.
+/* Copyright (c) 2004-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -24,20 +24,17 @@ class VM;
  *************/
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM creation *
- * @details Callback functions have the following signature: `void(VMPtr)`
+ * @brief Callbacks fired after VM creation. Signature: `void(VM*)`
  */
 extern surf_callback(void, VM*) VMCreatedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM destruction *
- * @details Callback functions have the following signature: `void(VMPtr)`
+ * @brief Callbacks fired after VM destruction. Signature: `void(VM*)`
  */
 extern surf_callback(void, VM*) VMDestructedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM State changed *
- * @details Callback functions have the following signature: `void(VMActionPtr)`
+ * @brief Callbacks after VM State changes. Signature: `void(VMAction*)`
  */
 extern surf_callback(void, VM*) VMStateChangedCallbacks;
 
@@ -50,7 +47,7 @@ extern surf_callback(void, VM*) VMStateChangedCallbacks;
  */
 class VMModel : public HostModel {
 public:
-  VMModel();
+  VMModel() :HostModel(){}
   ~VMModel(){};
 
   Host *createHost(const char *name){DIE_IMPOSSIBLE;}
@@ -65,9 +62,7 @@ public:
   virtual VM *createVM(const char *name, surf_resource_t host_PM)=0;
   void adjustWeightOfDummyCpuActions() {};
 
-  typedef boost::intrusive::list<VM,
-                                 boost::intrusive::constant_time_size<false> >
-          vm_list_t;
+  typedef boost::intrusive::list<VM, boost::intrusive::constant_time_size<false> > vm_list_t;
   static vm_list_t ws_vms;
 };
 
@@ -83,7 +78,7 @@ class VM : public Host,
            public boost::intrusive::list_base_hook<> {
 public:
   /**
-   * @brief VM constructor
+   * @brief Constructor
    *
    * @param model VMModel associated to this VM
    * @param name The name of the VM
@@ -94,44 +89,27 @@ public:
   VM(Model *model, const char *name, xbt_dict_t props,
                        RoutingEdge *netElm, Cpu *cpu);
 
-  /**
-   * @brief WdorkstationVM destructor
-   */
+  /** @brief Destructor */
   ~VM();
 
   void setState(e_surf_resource_state_t state);
 
-  /**
-   * @brief Suspend the VM
-   */
+  /** @brief Suspend the VM */
   virtual void suspend()=0;
 
-  /**
-   * @brief Resume the VM
-   */
+  /** @brief Resume the VM */
   virtual void resume()=0;
 
-  /**
-   * @brief Save the VM (Not yet implemented)
-   */
+  /** @brief Save the VM (Not yet implemented) */
   virtual void save()=0;
 
-  /**
-   * @brief Restore the VM (Not yet implemented)
-   */
+  /** @brief Restore the VM (Not yet implemented) */
   virtual void restore()=0;
 
-  /**
-   * @brief Migrate the VM to the destination host
-   *
-   * @param ind_vm_ws_dest The destination host
-   */
-  virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
+  /** @brief Migrate the VM to the destination host */
+  virtual void migrate(surf_resource_t dest_PM)=0;
 
-  /**
-   * @brief Get the physical machine hosting the VM
-   * @return The physical machine hosting the VM
-   */
+  /** @brief Get the physical machine hosting the VM */
   virtual surf_resource_t getPm()=0;
 
   virtual void setBound(double bound)=0;