X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eb650ffefc6fb7d05ad74b4d5f79f402f4b7f878..1f7eb6e2052428f2463c4aa883b07b686b1b23bd:/include/simgrid/s4u/Engine.hpp diff --git a/include/simgrid/s4u/Engine.hpp b/include/simgrid/s4u/Engine.hpp index a42becaef6..b9c77074da 100644 --- a/include/simgrid/s4u/Engine.hpp +++ b/include/simgrid/s4u/Engine.hpp @@ -56,8 +56,18 @@ 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(); + void getLinkList(std::vector * list); /** @brief Run the simulation */ void run(); @@ -75,7 +85,7 @@ public: simgrid::s4u::NetZone* getNetzoneByNameOrNull(const char* name); /** @brief Retrieve the netcard of the given name (or nullptr if not found) */ - simgrid::kernel::routing::NetPoint* getNetpointByNameOrNull(const char* name); + simgrid::kernel::routing::NetPoint* getNetpointByNameOrNull(std::string name); void getNetpointList(std::vector * list); void netpointRegister(simgrid::kernel::routing::NetPoint * card); void netpointUnregister(simgrid::kernel::routing::NetPoint * card); @@ -117,13 +127,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