Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move the definition of resource's Metric as an inner class
[simgrid.git] / src / surf / surf_interface.cpp
index 3549820d09de69ad0463cd0dd92e6e45292978b4..78638e2edc5039875682e96054c4ce7f272daa6e 100644 (file)
@@ -337,7 +337,6 @@ void surf_exit()
     delete model;
   delete all_existing_models;
 
-  simgrid::surf::surfExitCallbacks();
 
   if (future_evt_set) {
     delete future_evt_set;
@@ -516,64 +515,6 @@ void Model::updateActionsStateFull(double /*now*/, double /*delta*/)
  * Resource *
  ************/
 
-namespace simgrid {
-namespace surf {
-
-Resource::Resource(Model* model, const std::string& name, lmm_constraint_t constraint)
-    : name_(name), model_(model), constraint_(constraint)
-{}
-
-Resource::~Resource() = default;
-
-bool Resource::isOn() const {
-  return isOn_;
-}
-bool Resource::isOff() const {
-  return not isOn_;
-}
-
-void Resource::turnOn()
-{
-  isOn_ = true;
-}
-
-void Resource::turnOff()
-{
-  isOn_ = false;
-}
-
-double Resource::getLoad()
-{
-  return constraint_->get_usage();
-}
-
-Model* Resource::model() const
-{
-  return model_;
-}
-
-const std::string& Resource::getName() const
-{
-  return name_;
-}
-
-const char* Resource::getCname() const
-{
-  return name_.c_str();
-}
-
-bool Resource::operator==(const Resource &other) const {
-  return name_ == other.name_;
-}
-
-lmm_constraint_t Resource::constraint() const
-{
-  return constraint_;
-}
-
-}
-}
-
 /**********
  * Action *
  **********/
@@ -585,7 +526,7 @@ Action::Action(simgrid::surf::Model* model, double cost, bool failed) : Action(m
 {
 }
 
-Action::Action(simgrid::surf::Model* model, double cost, bool failed, lmm_variable_t var)
+Action::Action(simgrid::surf::Model* model, double cost, bool failed, kernel::lmm::Variable* var)
     : remains_(cost), start_(surf_get_clock()), cost_(cost), model_(model), variable_(var)
 {
   if (failed)