Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics in AsCluster and friends
[simgrid.git] / src / surf / network_constant.cpp
index 62f97f3..bbe31a5 100644 (file)
@@ -18,13 +18,13 @@ void surf_network_model_init_Constant()
   xbt_dynar_push(all_existing_models, &surf_network_model);
 
   routing_model_create(NULL);
-
-  simgrid::surf::on_link.connect(netlink_parse_init);
 }
 
 namespace simgrid {
   namespace surf {
 
+    NetworkConstantModel::~NetworkConstantModel() {}
+
     Link* NetworkConstantModel::createLink(const char *name, double bw, double lat, e_surf_link_sharing_policy_t policy,
         xbt_dict_t properties) {
 
@@ -64,7 +64,7 @@ namespace simgrid {
             action->latency_ = 0.0;
           }
         }
-        action->updateRemains(action->getCost() * delta / action->m_latInit);
+        action->updateRemains(action->getCost() * delta / action->initialLatency_);
         if (action->getMaxDuration() != NO_MAX_DURATION)
           action->updateMaxDuration(delta);
 
@@ -92,31 +92,16 @@ namespace simgrid {
      **********/
     NetworkConstantAction::NetworkConstantAction(NetworkConstantModel *model_, double size, double latency)
     : NetworkAction(model_, size, false)
-    , m_latInit(latency)
+    , initialLatency_(latency)
     {
       latency_ = latency;
       if (latency_ <= 0.0) {
         stateSet_ = getModel()->getDoneActionSet();
         stateSet_->push_back(*this);
       }
-      variable_ = NULL;
     };
 
-    int NetworkConstantAction::unref()
-    {
-      refcount_--;
-      if (!refcount_) {
-        if (action_hook.is_linked())
-          stateSet_->erase(stateSet_->iterator_to(*this));
-        delete this;
-        return 1;
-      }
-      return 0;
-    }
-
-    void NetworkConstantAction::cancel()
-    {
-    }
+    NetworkConstantAction::~NetworkConstantAction() {}
 
   }
 }