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 */
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();
simgrid::kernel::routing::NetPoint* netpoint_by_name_or_null(std::string name);
simgrid::s4u::NetZone* get_netzone_root();
+ void set_netzone_root(s4u::NetZone* netzone);
simgrid::s4u::NetZone* netzone_by_name_or_null(const char* name);
*/
void set_config(std::string str);
- simgrid::kernel::EngineImpl* pimpl;
-
private:
+ simgrid::kernel::EngineImpl* pimpl;
static s4u::Engine* instance_;
//////////////// Deprecated functions