/** Registers the main function of an actor that will be launched from the deployment file */
void register_function(std::string name, int (*code)(int, char**));
- // FIXME: provide a register_function(std::string, std::vector<std::string>)
+ /** Registers the main function of an actor that will be launched from the deployment file */
+ void register_function(std::string name, void (*code)(std::vector<std::string>));
/** Registers a function as the default main function of actors
*
void load_deployment(std::string deploy);
protected:
- friend s4u::Host;
- friend s4u::Link;
- friend s4u::Storage;
+#ifndef DOXYGEN
+ friend Host;
+ friend Link;
+ friend Storage;
friend kernel::routing::NetPoint;
friend kernel::routing::NetZoneImpl;
friend kernel::resource::LinkImpl;
- void host_register(std::string name, simgrid::s4u::Host* host);
+ void host_register(std::string name, Host* host);
void host_unregister(std::string name);
- void link_register(std::string name, simgrid::s4u::Link* link);
+ void link_register(std::string name, Link* link);
void link_unregister(std::string name);
- void storage_register(std::string name, simgrid::s4u::Storage* storage);
+ void storage_register(std::string name, Storage* storage);
void storage_unregister(std::string name);
void netpoint_register(simgrid::kernel::routing::NetPoint* card);
void netpoint_unregister(simgrid::kernel::routing::NetPoint* card);
+#endif /*DOXYGEN*/
public:
size_t get_host_count();
+ /** @brief Returns the list of all hosts found in the platform */
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);
/** @deprecated See Engine::get_host_count() */
XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_host_count()") size_t getHostCount() { return get_host_count(); }
/** @deprecated See Engine::get_all_hosts() */
- XBT_ATTRIB_DEPRECATED_v322("Please use Engine::get_all_hosts()") void getHostList(std::vector<Host*>* whereTo);
- /** @deprecated See Engine::get_all_hosts() */
XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_hosts()") std::vector<Host*> getAllHosts()
{
return get_all_hosts();
}
/** @deprecated See Engine::get_link_count() */
XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_count()") size_t getLinkCount() { return get_link_count(); }
- /** @deprecated See Engine::get_all_links() */
- XBT_ATTRIB_DEPRECATED_v322("Please use Engine::get_all_links()") void getLinkList(std::vector<Link*>* list);
/** @deprecated See Engine::get_link_list() */
XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_list()") std::vector<Link*> getAllLinks()
{