Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert getCname to get_cname
[simgrid.git] / src / kernel / resource / Resource.cpp
index dc46230..6b9ffe1 100644 (file)
@@ -3,7 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "src/kernel/resource/Resource.hpp"
+#include "simgrid/kernel/resource/Resource.hpp"
 #include "src/kernel/lmm/maxmin.hpp" // Constraint
 #include "src/surf/surf_interface.hpp"
 
@@ -20,21 +20,21 @@ Resource::~Resource() = default;
 
 bool Resource::isOn() const
 {
-  return isOn_;
+  return is_on_;
 }
 bool Resource::isOff() const
 {
-  return not isOn_;
+  return not is_on_;
 }
 
 void Resource::turnOn()
 {
-  isOn_ = true;
+  is_on_ = true;
 }
 
 void Resource::turnOff()
 {
-  isOn_ = false;
+  is_on_ = false;
 }
 
 double Resource::getLoad()
@@ -47,12 +47,12 @@ Model* Resource::model() const
   return model_;
 }
 
-const std::string& Resource::getName() const
+const std::string& Resource::get_name() const
 {
   return name_;
 }
 
-const char* Resource::getCname() const
+const char* Resource::get_cname() const
 {
   return name_.c_str();
 }
@@ -64,7 +64,7 @@ bool Resource::operator==(const Resource& other) const
 
 kernel::lmm::Constraint* Resource::constraint() const
 {
-  return const_cast<kernel::lmm::Constraint*>(constraint_);
+  return constraint_;
 }
 
 } // namespace resource