Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
retrive -> retrieve
[simgrid.git] / include / xbt / dynar.h
index ae89b02..9ced1ee 100644 (file)
 #define _XBT_DYNAR_H
 
 #include "xbt/misc.h" /* SG_BEGIN_DECL */
+#include "xbt/function_types.h"
 
 SG_BEGIN_DECL()
 
 /** @addtogroup XBT_dynar
   * @brief DynArr are dynamically sized vector which may contain any type of variables.
   *
-  * <center><table><tr><td><b>Up </b>    <td> [\ref index]::[\ref XBT_API]
-  *                <tr><td><b>Prev</b>   <td> [\ref XBT_config]
-  *                <tr><td><b>Next</b>   <td> [\ref XBT_dict]
-  *                <tr><td><b>Down</b>   <td> \ref XBT_dynar_cons\n\ref XBT_dynar_array\n\ref XBT_dynar_perl\n\ref XBT_dynar_ctn\n\ref XBT_dynar_speed\n\ref XBT_dynar_cursor 
-  * </table></center>
-  *
   * These are the SimGrid version of the dynamically size arrays, which all C programmer recode one day or another.
   *  
   * For performance concerns, the content of DynArr must be homogeneous (in
@@ -31,7 +26,7 @@ SG_BEGIN_DECL()
   * structure creation (of type void_f_ppvoid_t or void_f_pvoid_t).
   *
   * \section XBT_dynar_exscal Example with scalar
-  * \dontinclude dynar_int.c
+  * \dontinclude dynar.c
   *
   * \skip Vars_decl
   * \skip dyn
@@ -44,17 +39,16 @@ SG_BEGIN_DECL()
   * \until xbt_dynar_free
   *
   * \section XBT_dynar_exptr Example with pointed data
-  * \dontinclude dynar_string.c
   * 
-  * \skip doxygen_first_cruft
-  * \skip f
-  * \until xbt_init
+  * \skip doxygen_string_cruft
+  * \skip function
+  * \until s2
   * \skip Populate_str
   * \skip dyn
   * \until }
   * \skip macro
   * \until dynar_free
-  * \skip xbt_exit
+  * \skip end_of_doxygen
   * \until }
   *
   */
@@ -62,10 +56,6 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_dynar_cons Dynar constructor and destructor
  *  @ingroup XBT_dynar
  *
- * <center><table><tr><td><b>Up </b>       <td> [\ref index]::[\ref XBT_API]::[\ref XBT_dynar]
- *                <tr><td><b>Jump to</b><td> --\>\ref XBT_dynar_cons\<--\n\ref XBT_dynar_array\n\ref XBT_dynar_perl\n\ref XBT_dynar_ctn\n\ref XBT_dynar_speed\n\ref XBT_dynar_cursor
- * </table></center>
- *
  *  @{
  */
    /** \brief Dynar data type (opaque type) */
@@ -75,6 +65,7 @@ SG_BEGIN_DECL()
   xbt_dynar_t   xbt_dynar_new(unsigned long elm_size, 
                             void_f_pvoid_t *free_func);
   void          xbt_dynar_free(xbt_dynar_t *dynar);
+  void          xbt_dynar_free_voidp(void *dynar);
   void          xbt_dynar_free_container(xbt_dynar_t *dynar);
 
   unsigned long xbt_dynar_length(const xbt_dynar_t dynar);
@@ -86,10 +77,6 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_dynar_array Dynar as a regular array
  *  @ingroup XBT_dynar
  *
- * <center><table><tr><td><b>Up </b>    <td> [\ref index]::[\ref XBT_API]::[\ref XBT_dynar]
- *                <tr><td><b>Jump to</b><td> \ref XBT_dynar_cons\n--\>\ref XBT_dynar_array\<--\n\ref XBT_dynar_perl\n\ref XBT_dynar_ctn\n\ref XBT_dynar_speed\n\ref XBT_dynar_cursor
- * </table></center>
- *
  *  @{
  */
 
@@ -105,10 +92,6 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_dynar_perl Perl-like use of dynars
  *  @ingroup XBT_dynar
  *
- * <center><table><tr><td><b>Up </b>    <td> [\ref index]::[\ref XBT_API]::[\ref XBT_dynar]
- *                <tr><td><b>Jump to</b><td> \ref XBT_dynar_cons\n\ref XBT_dynar_array\n--\>\ref XBT_dynar_perl\<--\n\ref XBT_dynar_ctn\n\ref XBT_dynar_speed\n\ref XBT_dynar_cursor
- * </table></center>
- *
  *  @{
  */
 
@@ -122,11 +105,7 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_dynar_ctn Direct manipulation to the dynars content
  *  @ingroup XBT_dynar
  *
- * <center><table><tr><td><b>Up </b>    <td> [\ref index]::[\ref XBT_API]::[\ref XBT_dynar]
- *                <tr><td><b>Jump to</b><td> \ref XBT_dynar_cons\n\ref XBT_dynar_array\n\ref XBT_dynar_perl\n--\>\ref XBT_dynar_ctn\<--\n\ref XBT_dynar_speed\n\ref XBT_dynar_cursor
- * </table></center>
- *
- *  Those functions do not retrive the content, but only their address.
+ *  Those functions do not retrieve the content, but only their address.
  *
  *  @{
  */
@@ -140,11 +119,7 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_dynar_speed Speed optimized access to dynars of scalars
  *  @ingroup XBT_dynar
  *
- * <center><table><tr><td><b>Up </b>    <td> [\ref index]::[\ref XBT_API]::[\ref XBT_dynar]
- *                <tr><td><b>Jump to</b><td> \ref XBT_dynar_cons\n\ref XBT_dynar_array\n\ref XBT_dynar_perl\n\ref XBT_dynar_ctn\n--\>\ref XBT_dynar_speed\<--\n\ref XBT_dynar_cursor
- * </table></center>
- *
- *  While the other functions use a memcpy to retrive the content into the
+ *  While the other functions use a memcpy to retrieve the content into the
  *  user provided area, those ones use a regular affectation. It only works
  *  for scalar values, but should be a little faster.
  *
@@ -180,10 +155,6 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_dynar_cursor Cursors on dynar
  *  @ingroup XBT_dynar
  *
- * <center><table><tr><td><b>Up </b>    <td> [\ref index]::[\ref XBT_API]::[\ref XBT_dynar]
- *                <tr><td><b>Jump to</b><td> \ref XBT_dynar_cons\n\ref XBT_dynar_array\n\ref XBT_dynar_perl\n\ref XBT_dynar_ctn\n\ref XBT_dynar_speed\n--\>\ref XBT_dynar_cursor\<--
- * </table></center>
- *
  * Cursors are used to iterate over the structure. Never add elements to the 
  * DynArr during the traversal. To remove elements, use the
  * xbt_dynar_cursor_rm() function