Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[S4U] Engine: Add Engine::get_filtered_links
[simgrid.git] / include / simgrid / s4u / Engine.hpp
index 381563f..8d9477c 100644 (file)
@@ -27,7 +27,10 @@ namespace s4u {
 class XBT_PUBLIC Engine {
 public:
   /** Constructor, taking the command line parameters of your main function */
-  Engine(int* argc, char** argv);
+  explicit Engine(int* argc, char** argv);
+  /** Currently, only one instance is allowed to exist. This is why you can't copy or move it */
+  Engine(const Engine&) = delete;
+  Engine(Engine&&)      = delete;
 
   ~Engine();
   /** Finalize the default engine and all its dependencies */
@@ -95,11 +98,13 @@ protected:
 public:
   size_t get_host_count();
   std::vector<Host*> get_all_hosts();
+  std::vector<Host*> get_filtered_hosts(std::function<bool(Host*)> filter);
   simgrid::s4u::Host* host_by_name(std::string name);
   simgrid::s4u::Host* host_by_name_or_null(std::string name);
 
   size_t get_link_count();
   std::vector<Link*> get_all_links();
+  std::vector<Link*> get_filtered_links(std::function<bool(Link*)> filter);
 
   size_t get_storage_count();
   std::vector<Storage*> get_all_storages();