Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move the host list into the Engine
[simgrid.git] / include / simgrid / s4u / Engine.hpp
index 805a309..7953899 100644 (file)
@@ -56,6 +56,14 @@ public:
   /** @brief Load a deployment file and launch the actors that it contains */
   void loadDeployment(const char* deploy);
 
+protected:
+  friend s4u::Host;
+  void addHost(std::string name, simgrid::s4u::Host * host);
+  void delHost(std::string name);
+
+public:
+  simgrid::s4u::Host* hostByName(std::string name);
+  simgrid::s4u::Host* hostByNameOrNull(std::string name);
   size_t getHostCount();
   void getHostList(std::vector<Host*> * whereTo);
   size_t getLinkCount();
@@ -126,6 +134,9 @@ extern XBT_PRIVATE xbt::signal<void()> onSimulationEnd;
 
 /** Callback fired when the time jumps into the future */
 extern XBT_PRIVATE xbt::signal<void(double)> onTimeAdvance;
+
+/** Callback fired when the time cannot jump because of inter-actors deadlock */
+extern XBT_PRIVATE xbt::signal<void(void)> onDeadlock;
 }
 } // namespace simgrid::s4u