Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill dead code in the C interface to surf
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 22 Jan 2016 15:59:32 +0000 (16:59 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 22 Jan 2016 17:07:58 +0000 (18:07 +0100)
Every surf user should use the C++ interface anyway

(+ useless cosmetics not worthing a commit on their own)

src/include/surf/surf.h
src/surf/host_interface.hpp
src/surf/surf_c_bindings.cpp

index 275ac07..d46f235 100644 (file)
@@ -223,22 +223,6 @@ XBT_PUBLIC(surf_action_t) surf_model_extract_done_action_set(surf_model_t model)
  */
 XBT_PUBLIC(surf_action_t) surf_model_extract_failed_action_set(surf_model_t model);
 
-/**
- * @brief Pop an action from the ready actions set
- *
- * @param model The model from which the action is extracted
- * @return An action in ready state
- */
-XBT_PUBLIC(surf_action_t) surf_model_extract_ready_action_set(surf_model_t model);
-
-/**
- * @brief Pop an action from the running actions set
- *
- * @param model The model from which the action is extracted
- * @return An action in running state
- */
-XBT_PUBLIC(surf_action_t) surf_model_extract_running_action_set(surf_model_t model);
-
 /**
  * @brief Get the size of the running action set of a model
  *
index ce2c066..7766807 100644 (file)
@@ -47,10 +47,10 @@ namespace surf {
  * @brief SURF Host model interface class
  * @details A model is an object which handle the interactions between its Resources and its Actions
  */
-class HostModel : public Model{
+class HostModel : public Model {
 public:
   HostModel() : Model() {}
-  ~HostModel() {}
+  ~HostModel() override {}
 
   Host *createHost(const char *name, NetCard *net, Cpu *cpu, xbt_dict_t props);
   void addTraces() override {DIE_IMPOSSIBLE;}
index e627079..d9b620d 100644 (file)
@@ -185,22 +185,6 @@ surf_action_t surf_model_extract_failed_action_set(surf_model_t model){
   return res;
 }
 
-surf_action_t surf_model_extract_ready_action_set(surf_model_t model){
-  if (model->getReadyActionSet()->empty())
-       return NULL;
-  surf_action_t res = &model->getReadyActionSet()->front();
-  model->getReadyActionSet()->pop_front();
-  return res;
-}
-
-surf_action_t surf_model_extract_running_action_set(surf_model_t model){
-  if (model->getRunningActionSet()->empty())
-       return NULL;
-  surf_action_t res = &model->getRunningActionSet()->front();
-  model->getRunningActionSet()->pop_front();
-  return res;
-}
-
 int surf_model_running_action_set_size(surf_model_t model){
   return model->getRunningActionSet()->size();
 }