Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / s4u / s4u_Engine.cpp
index 4c7026b..5cb1a98 100644 (file)
@@ -80,6 +80,10 @@ void Engine::register_function(std::string name, int (*code)(int, char**))
 {
   SIMIX_function_register(name, code);
 }
+void Engine::register_function(std::string name, void (*code)(std::vector<std::string>))
+{
+  SIMIX_function_register(name, code);
+}
 void Engine::register_default(int (*code)(int, char**))
 {
   SIMIX_function_register_default(code);
@@ -93,16 +97,7 @@ size_t Engine::get_host_count()
 {
   return pimpl->hosts_.size();
 }
-/** @brief Fills the passed list with all hosts found in the platform
- *  @deprecated Please prefer Engine::getAllHosts()
- */
-void Engine::getHostList(std::vector<Host*>* list)
-{
-  for (auto const& kv : pimpl->hosts_)
-    list->push_back(kv.second);
-}
 
-/** @brief Returns the list of all hosts found in the platform */
 std::vector<Host*> Engine::get_all_hosts()
 {
   std::vector<Host*> res;
@@ -139,7 +134,7 @@ void Engine::host_unregister(std::string name)
 simgrid::s4u::Host* Engine::host_by_name(std::string name)
 {
   if (pimpl->hosts_.find(name) == pimpl->hosts_.end())
-    throw std::invalid_argument(std::string("Host not found: ") + name);
+    throw std::invalid_argument(std::string("Host not found: '") + name + std::string("'"));
   return pimpl->hosts_.at(name);
 }