Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further snake_case in routing
[simgrid.git] / src / s4u / s4u_link.cpp
index 269f3ab..d9a5089 100644 (file)
@@ -18,11 +18,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_link, s4u, "Logging specific to the S4U link
  * C API *
  *********/
 
-extern "C" {
-
 const char* sg_link_name(sg_link_t link)
 {
-  return link->getCname();
+  return link->get_cname();
 }
 sg_link_t sg_link_by_name(const char* name)
 {
@@ -68,7 +66,6 @@ void sg_link_exit()
 {
   simgrid::surf::LinkImpl::linksExit();
 }
-}
 
 /***********
  * C++ API *
@@ -83,21 +80,21 @@ Link* Link::byName(const char* name)
     return nullptr;
   return &res->piface_;
 }
-const std::string& Link::getName() const
+const std::string& Link::get_name() const
 {
-  return this->pimpl_->getName();
+  return this->pimpl_->get_name();
 }
-const char* Link::getCname() const
+const char* Link::get_cname() const
 {
-  return this->pimpl_->getCname();
+  return this->pimpl_->get_cname();
 }
 const char* Link::name()
 {
-  return getCname();
+  return get_cname();
 }
 bool Link::isUsed()
 {
-  return this->pimpl_->isUsed();
+  return this->pimpl_->is_used();
 }
 
 double Link::latency()
@@ -117,20 +114,16 @@ int Link::sharingPolicy()
 
 double Link::getUsage()
 {
-  return this->pimpl_->constraint()->get_usage();
+  return this->pimpl_->get_constraint()->get_usage();
 }
 
 void Link::turnOn()
 {
-  simgrid::simix::kernelImmediate([this]() {
-    this->pimpl_->turnOn();
-  });
+  simgrid::simix::kernelImmediate([this]() { this->pimpl_->turn_on(); });
 }
 void Link::turnOff()
 {
-  simgrid::simix::kernelImmediate([this]() {
-    this->pimpl_->turnOff();
-  });
+  simgrid::simix::kernelImmediate([this]() { this->pimpl_->turn_off(); });
 }
 
 void* Link::getData()