Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Many tiny documentation improvements
[simgrid.git] / include / simgrid / s4u / Actor.hpp
index 84d9345..9e25315 100644 (file)
@@ -251,8 +251,9 @@ public:
    *  If you want to register to the termination of a given actor, use this_actor::on_exit() instead.*/
   static void on_destruction_cb(const std::function<void(Actor const&)>& cb) { on_destruction.connect(cb); }
 
-  /** Create an actor from a std::function<void()>.
-   *  If the actor is restarted, it gets a fresh copy of the function. */
+  /** Create an actor from a @c std::function<void()>.
+   *  If the actor is restarted, it gets a fresh copy of the function. 
+   *  @verbatim embed:rst:inline See the :ref:`example <s4u_ex_actors_create>`. @endverbatim */
   static ActorPtr create(const std::string& name, s4u::Host* host, const std::function<void()>& code);
   /** Create an actor, but don't start it yet.
    *
@@ -277,7 +278,8 @@ public:
 
   ActorPtr start(const std::function<void()>& code, std::vector<std::string> args);
 
-  /** Create an actor from a callable thing. */
+  /** Create an actor from a callable thing. 
+   *  @verbatim embed:rst:inline See the :ref:`example <s4u_ex_actors_create>`. @endverbatim */
   template <class F> static ActorPtr create(const std::string& name, s4u::Host* host, F code)
   {
     return create(name, host, std::function<void()>(std::move(code)));
@@ -285,7 +287,8 @@ public:
 
   /** Create an actor using a callable thing and its arguments.
    *
-   * Note that the arguments will be copied, so move-only parameters are forbidden */
+   * Note that the arguments will be copied, so move-only parameters are forbidden. 
+   * @verbatim embed:rst:inline See the :ref:`example <s4u_ex_actors_create>`. @endverbatim */
 
   template <class F, class... Args,
             // This constructor is enabled only if the call code(args...) is valid:
@@ -298,7 +301,8 @@ public:
     return create(name, host, std::bind(std::move(code), std::move(args)...));
   }
 
-  /** Create actor from function name and a vector of strings as arguments. */
+  /** Create actor from function name and a vector of strings as arguments. 
+   *  @verbatim embed:rst:inline See the :ref:`example <s4u_ex_actors_create>`. @endverbatim */
   static ActorPtr create(const std::string& name, s4u::Host* host, const std::string& function,
                          std::vector<std::string> args);