X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/82230d737404aa70c3c2b5824d97109f1f129d58..f6acb706fa20197049c849cf3021077c5fa97f93:/include/simgrid/s4u/Engine.hpp diff --git a/include/simgrid/s4u/Engine.hpp b/include/simgrid/s4u/Engine.hpp index 805a309301..c9d2318b07 100644 --- a/include/simgrid/s4u/Engine.hpp +++ b/include/simgrid/s4u/Engine.hpp @@ -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 * whereTo); size_t getLinkCount(); @@ -76,6 +84,9 @@ public: /** @brief Retrieve the netzone of the given name (or nullptr if not found) */ simgrid::s4u::NetZone* getNetzoneByNameOrNull(const char* name); + /** @brief Retrieves all netzones of the same type than the subtype of the whereto vector */ + template void getNetzoneByType(std::vector * whereto); + /** @brief Retrieve the netcard of the given name (or nullptr if not found) */ simgrid::kernel::routing::NetPoint* getNetpointByNameOrNull(std::string name); void getNetpointList(std::vector * list); @@ -119,13 +130,16 @@ private: /** Callback fired when the platform is created (ie, the xml file parsed), * right before the actual simulation starts. */ -extern XBT_PRIVATE xbt::signal onPlatformCreated; +extern XBT_PUBLIC(xbt::signal) onPlatformCreated; /** Callback fired when the main simulation loop ends, just before MSG_run (or similar) ends */ -extern XBT_PRIVATE xbt::signal onSimulationEnd; +extern XBT_PUBLIC(xbt::signal) onSimulationEnd; /** Callback fired when the time jumps into the future */ -extern XBT_PRIVATE xbt::signal onTimeAdvance; +extern XBT_PUBLIC(xbt::signal) onTimeAdvance; + +/** Callback fired when the time cannot jump because of inter-actors deadlock */ +extern XBT_PUBLIC(xbt::signal) onDeadlock; } } // namespace simgrid::s4u