Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
WIP stop using const char* in C++ layers
[simgrid.git] / src / s4u / s4u_link.cpp
index b1ce7b1..4fd78e8 100644 (file)
@@ -1,12 +1,11 @@
-/* Copyright (c) 2013-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved.          */
 
 /* 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 <algorithm>
 
-#include "simgrid/s4u/link.hpp"
+#include "simgrid/s4u/Link.hpp"
 #include "simgrid/sg_config.h"
 #include "simgrid/simix.hpp"
 #include "src/surf/network_interface.hpp"
@@ -85,7 +84,7 @@ Link* Link::byName(const char* name)
 }
 const char* Link::name()
 {
-  return this->pimpl_->getName();
+  return this->pimpl_->cname();
 }
 bool Link::isUsed()
 {
@@ -149,5 +148,14 @@ void Link::setLatencyTrace(tmgr_trace_t trace)
     this->pimpl_->setLatencyTrace(trace);
   });
 }
+
+/*************
+ * Callbacks *
+ *************/
+simgrid::xbt::signal<void(s4u::Link&)> Link::onCreation;
+simgrid::xbt::signal<void(s4u::Link&)> Link::onDestruction;
+simgrid::xbt::signal<void(s4u::Link&)> Link::onStateChange;
+simgrid::xbt::signal<void(surf::NetworkAction*, s4u::Host* src, s4u::Host* dst)> Link::onCommunicate;
+simgrid::xbt::signal<void(surf::NetworkAction*)> Link::onCommunicationStateChange;
 }
 }