X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bb38818fef8e6dd05e4c17c1b795952fec9b3776..3877d90836e4902835c5464074090c4d928dac6d:/include/simgrid/s4u/Actor.hpp diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 6ee97c4ab3..dcab10ea80 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -121,12 +121,11 @@ namespace s4u { /** @brief Simulation Agent */ class XBT_PUBLIC Actor : public simgrid::xbt::Extendable { -#ifndef DOXYGEN - friend Exec; - friend Mailbox; + friend simgrid::s4u::Exec; + friend simgrid::s4u::Mailbox; friend simgrid::kernel::actor::ActorImpl; friend simgrid::kernel::activity::MailboxImpl; -#endif + kernel::actor::ActorImpl* pimpl_ = nullptr; explicit Actor(smx_actor_t pimpl) : pimpl_(pimpl) {} @@ -258,6 +257,7 @@ public: */ void kill(); + /** Kill an actor from its ID */ static void kill(aid_t pid); /** Retrieves the actor that have the given PID (or nullptr if not existing) */ @@ -442,16 +442,18 @@ XBT_PUBLIC bool is_suspended(); /** @brief kill the actor. */ XBT_PUBLIC void exit(); -#ifndef DOXYGEN -/** @deprecated Please use std::function for first parameter */ -XBT_ATTRIB_DEPRECATED_v323("Please use std::function for first parameter.") XBT_PUBLIC - void on_exit(int_f_pvoid_pvoid_t fun, void* data); /** @brief Add a function to the list of "on_exit" functions. */ XBT_PUBLIC void on_exit(std::function fun, void* data); /** @brief Migrate the actor to a new host. */ XBT_PUBLIC void migrate(Host* new_host); +/** @} */ + +#ifndef DOXYGEN +/** @deprecated Please use std::function for first parameter */ +XBT_ATTRIB_DEPRECATED_v323("Please use std::function for first parameter.") XBT_PUBLIC + void on_exit(int_f_pvoid_pvoid_t fun, void* data); /** @deprecated See this_actor::get_name() */ XBT_ATTRIB_DEPRECATED_v323("Please use this_actor::get_name()") XBT_PUBLIC std::string getName(); /** @deprecated See this_actor::get_cname() */ @@ -473,7 +475,6 @@ XBT_ATTRIB_DEPRECATED_v324("Please use this_actor::exit()") XBT_PUBLIC void kill #endif } -/** @} */ }} // namespace simgrid::s4u