Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use doxygen's section instead of my poor approximation; link to the list of all exist...
[simgrid.git] / src / xbt / set.c
index 2d912e5..39c1032 100644 (file)
@@ -2,11 +2,10 @@
 
 /* set - data container consisting in dict+dynar                            */
 
-/* Authors: Martin Quinson                                                  */
-/* Copyright (C) 2004 the GRAS posse.                                       */
+/* Copyright (c) 2004 Martin Quinson. All rights reserved.                  */
 
 /* This program is free software; you can redistribute it and/or modify it
  under the terms of the license (GNU LGPL) which comes with this package. */
* under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/misc.h"
 #include "xbt/sysdep.h"
 
 #include "xbt/set.h"
 
+/** \defgroup XBT_set A generic set datatype
+  *  \brief A data container consisting in \ref XBT_dict and \ref XBT_dynar
+  */
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(set,xbt,"data container consisting in dict+dynar");
 
 /*####[ Type definition ]####################################################*/
@@ -27,14 +30,13 @@ typedef struct xbt_set_ {
 
 /*####[ Memory  ]############################################################*/
 /**
- * xbt_set_new:
- * @dst: where to
+ * \ingroup XBT_set 
+ * \return a new set
  *
  * Creates a new set.
  */
 xbt_set_t xbt_set_new (void) {
   xbt_set_t res=xbt_new(s_xbt_set_t,1);
-  xbt_error_t errcode;
 
   res->dict=xbt_dict_new ();
   res->dynar=xbt_dynar_new(sizeof(void*),NULL);
@@ -43,8 +45,8 @@ xbt_set_t xbt_set_new (void) {
 }
 
 /**
- * xbt_set_free:
- * @set:
+ * \ingroup XBT_set 
+ * \param set
  *
  * Frees a set.
  */
@@ -58,10 +60,10 @@ void  xbt_set_free(xbt_set_t *set) {
 }
 
 /**
- * xbt_set_add:
- * @set: set to populate
- * @elm: element to add. 
- * @free_ctn: How to add the data 
+ * \ingroup XBT_set 
+ * \param set set to populate
+ * \param elm element to add. 
+ * \param free_func How to add the data 
  *
  * Add an element to a set. 
  *
@@ -107,10 +109,10 @@ void xbt_set_add    (xbt_set_t      set,
 }
 
 /**
- * xbt_set_get_by_name:
- * @set:
- * @name: Name of the searched cell
- * @dst: where to put the found data into
+ * \ingroup XBT_set 
+ * \param set
+ * \param name Name of the searched cell
+ * \param dst where to put the found data into
  *
  * get a data stored in the cell by providing its name.
  */
@@ -123,11 +125,11 @@ xbt_error_t xbt_set_get_by_name    (xbt_set_t     set,
   return errcode;
 }
 /**
- * xbt_set_get_by_name_ext:
- * @set:
- * @name: Name of the searched cell
- * @name_len: length of the name, when strlen cannot be trusted
- * @dst: where to put the found data into
+ * \ingroup XBT_set 
+ * \param set
+ * \param name Name of the searched cell
+ * \param name_len length of the name, when strlen cannot be trusted
+ * \param dst where to put the found data into
  *
  * get a data stored in the cell by providing its name (and the length
  * of the name, when strlen cannot be trusted because you don't use a char*
@@ -142,10 +144,10 @@ xbt_error_t xbt_set_get_by_name_ext(xbt_set_t      set,
 }
 
 /**
- * xbt_set_get_by_code:
- * @set:
- * @id: what you're looking for
- * @dst: where to put the found data into
+ * \ingroup XBT_set 
+ * \param set
+ * \param id what you're looking for
+ * \param dst where to put the found data into
  *
  * get a data stored in the cell by providing its id. 
  * @warning, if the ID does not exists, you're getting into trouble
@@ -172,9 +174,9 @@ typedef struct xbt_set_cursor_ {
 } s_xbt_set_cursor_t;
 
 /**
- * xbt_set_cursor_first:
- * @set: on what to let the cursor iterate
- * @cursor: dest address
+ * \ingroup XBT_set 
+ * \param set on what to let the cursor iterate
+ * \param cursor dest address
  *
  * Create the cursor if it does not exists. Rewind it in any case.
  */
@@ -196,8 +198,8 @@ void         xbt_set_cursor_first       (xbt_set_t         set,
 }
 
 /**
- * xbt_set_cursor_step:
- * @cursor: the cursor
+ * \ingroup XBT_set 
+ * \param cursor the cursor
  *
  * Move to the next element. 
  */
@@ -206,9 +208,10 @@ void         xbt_set_cursor_step        (xbt_set_cursor_t cursor) {
 }
 
 /**
- * xbt_set_cursor_get_or_free:
- * @cursor: the cursor
- * @Returns: true if it's ok, false if there is no more data
+ * \ingroup XBT_set 
+ * \param curs the cursor
+ * \param elm an element
+ * \return true if it's ok, false if there is no more data
  *
  * Get current data
  */