Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Spelling fixes & a few cases of polishing the English (#329)
[simgrid.git] / docs / source / app_s4u.rst
index ffe1151..0f6b24a 100644 (file)
@@ -8,8 +8,8 @@ The S4U Interface
    <object id="TOC" data="graphical-toc.svg" width="100%" type="image/svg+xml"></object>
    <script>
    window.onload=function() { // Wait for the SVG to be loaded before changing it
-     var elem=document.querySelector("#TOC").contentDocument.getElementById("S4UBox")
-     elem.style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1";
+     var elem=document.querySelector("#TOC").contentDocument.getElementById("ActorBox")
+     elem.style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1;stroke:#000000;stroke-width:0.35277778;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1";
    }
    </script>
    <br/>
@@ -146,7 +146,7 @@ Activities
 **********
 
 Activities represent the actions that consume a resource, such as a
-:ref:`s4u::Comm <API_s4u_Comm>` that consumes the *transmiting power* of
+:ref:`s4u::Comm <API_s4u_Comm>` that consumes the *transmitting power* of
 :ref:`s4u::Link <API_s4u_Link>` resources.
 
 =======================
@@ -173,7 +173,7 @@ Finally, to wait at most until a specified time limit, use
 
    wait_for and wait_until are currently not implemented for Exec and Io activities.
 
-Every kind of activities can be asynchronous:
+Every kind of activity can be asynchronous:
 
   - :ref:`s4u::CommPtr <API_s4u_Comm>` are created with 
     :cpp:func:`s4u::Mailbox::put_async() <simgrid::s4u::Mailbox::put_async>` and
@@ -319,7 +319,7 @@ The last twist is that by default in the simulator, the data starts
 to be exchanged only when both the sender and the receiver are
 announced (it waits until both :cpp:func:`put() <simgrid::s4u::Mailbox::put()>`
 and :cpp:func:`get() <simgrid::s4u::Mailbox::get()>` are posted). 
-In TCP, since you establish connexions beforehand, the data starts to
+In TCP, since you establish connections beforehand, the data starts to
 flow as soon as the sender posts it, even if the receiver did not post
 its :cpp:func:`recv() <simgrid::s4u::Mailbox::recv()>` yet. 
 
@@ -343,14 +343,13 @@ Memory Management
 
 For sake of simplicity, we use `RAII
 <https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization>`_
-everywhere in S4U. This is an idiom where resources are automatically
+for many classes in S4U. This is an idiom where resources are automatically
 managed through the context. Provided that you never manipulate
 objects of type Foo directly but always FooPtr references (which are
 defined as `boost::intrusive_ptr
 <http://www.boost.org/doc/libs/1_61_0/libs/smart_ptr/intrusive_ptr.html>`_
-<Foo>), you will never have to explicitely release the resource that
+<Foo>), you will never have to explicitly release the resource that
 you use nor to free the memory of unused objects.
-
 Here is a little example:
 
 .. code-block:: cpp
@@ -365,7 +364,12 @@ Here is a little example:
   
    } // The mutex gets automatically freed because the only existing reference gets out of scope
 
-API C++ Reference
+Note that Mailboxes, Hosts and Links are not handled thought smart
+pointers (yet?). This means that it is currently impossible to destroy a
+mailbox or a link. You can still destroy an host (but probably
+shouldn't), using :cpp:func:`simgrid::s4u::Host::destroy`.
+
+C++ API Reference
 *****************
 
 .. _API_s4u_this_actor:
@@ -464,6 +468,32 @@ s4u::Exec
    :protected-members:
    :undoc-members:
 
+.. _API_s4u_ExecSeq:
+
+============
+s4u::ExecSeq
+============
+
+.. doxygentypedef:: ExecSeqPtr
+
+.. doxygenclass:: simgrid::s4u::ExecSeq
+   :members:
+   :protected-members:
+   :undoc-members:
+
+.. _API_s4u_ExecPar:
+
+============
+s4u::ExecPar
+============
+
+.. doxygentypedef:: ExecParPtr
+
+.. doxygenclass:: simgrid::s4u::ExecPar
+   :members:
+   :protected-members:
+   :undoc-members:
+
 .. _API_s4u_Host:
 
 =========
@@ -507,8 +537,6 @@ s4u::Mailbox
 
 Please also refer to the :ref:`full doc on s4u::Mailbox <s4u_mailbox>`.
 
-.. doxygentypedef:: MailboxPtr
-
 .. doxygenclass:: simgrid::s4u::Mailbox
    :members:
    :protected-members:
@@ -580,13 +608,12 @@ Python API Reference
 The Python API is generated with pybind11. It closely mimicks the C++
 API, to which you should refer for more information.
 
-=========
-Functions
-=========
+==========
+this_actor
+==========
 
-.. automodule:: simgrid
+.. automodule:: simgrid.this_actor
    :members:
-   :exclude-members: Actor, Host, Engine, Mailbox
 
 ===========
 Class Actor
@@ -595,6 +622,13 @@ Class Actor
 .. autoclass:: simgrid.Actor
    :members:
 
+==========
+Class Comm
+==========
+
+.. autoclass:: simgrid.Comm
+   :members:
+
 ============
 Class Engine
 ============
@@ -602,6 +636,13 @@ Class Engine
 .. autoclass:: simgrid.Engine
    :members:
 
+==========
+Class Exec
+==========
+
+.. autoclass:: simgrid.Exec
+   :members:
+
 ==========
 Class Host
 ==========