Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move the NetCard related functions into a NetCard.cpp
[simgrid.git] / src / kernel / routing / NetCard.hpp
index 7a78c0a..9213dd4 100644 (file)
@@ -17,7 +17,6 @@
 namespace simgrid {
 namespace kernel {
 namespace routing {
-XBT_PUBLIC_DATA(simgrid::xbt::signal<void(NetCard*)>) netcardCreatedCallbacks;
 
 /** @ingroup SURF_routing_interface
  * @brief Network cards are the vertices in the graph representing the network, used to compute paths between nodes.
@@ -33,7 +32,7 @@ public:
   {
     if (containingAS != nullptr)
       id_ = containingAS->addComponent(this);
-    simgrid::kernel::routing::netcardCreatedCallbacks(this);
+    simgrid::kernel::routing::NetCard::onCreation(this);
   }
   ~NetCard() = default;
 
@@ -48,6 +47,8 @@ public:
   bool isHost() { return componentType_ == Type::Host; }
   bool isRouter() { return componentType_ == Type::Router; }
 
+  static simgrid::xbt::signal<void(NetCard*)> onCreation;
+
 private:
   unsigned int id_;
   std::string name_;