Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Taking into account last MSG modifications. No need to pass gras-log arguments to...
[simgrid.git] / include / xbt / dynar.h
index c95e619..062e944 100644 (file)
@@ -1,26 +1,24 @@
 /* $Id$ */
 
-/* dynar - a generic dynamic array                                         */
+/* dynar - a generic dynamic array                                          */
 
-/* Authors: Martin Quinson                                                  */
-/* Copyright (C) 2003 the OURAGAN project.                                  */
+/* Copyright (c) 2003, 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. */
 
 #ifndef _XBT_DYNAR_H
 #define _XBT_DYNAR_H
 
 #include "xbt/misc.h" /* BEGIN_DECL */
 
-BEGIN_DECL
+BEGIN_DECL()
 
+/** \brief Dictionnary data type 
+    \ingroup XBT_dynar
+*/
 typedef struct xbt_dynar_s *xbt_dynar_t;
 
-/* pointer to a function freeing something */
-typedef   void (void_f_ppvoid_t)(void**);
-typedef   void (void_f_pvoid_t) (void*);
-
 xbt_dynar_t  xbt_dynar_new(unsigned long elm_size, 
                             void_f_pvoid_t *free_func);
 void          xbt_dynar_free(xbt_dynar_t *dynar);
@@ -69,21 +67,25 @@ void xbt_dynar_cursor_first (const xbt_dynar_t dynar, int *cursor);
 void xbt_dynar_cursor_step  (const xbt_dynar_t dynar, int *cursor);
 int  xbt_dynar_cursor_get   (const xbt_dynar_t dynar, int *cursor, void *whereto);
 
+
 /**
+ \brief Dynar iterator
+ \ingroup XBT_dynar
  * xbt_dynar_foreach:
- * @_dynar: what to iterate over
- * @_cursor: an integer used as cursor
- * @_data:
- *
- * Iterates over the whole dynar. Example:
+ * \param _dynar what to iterate over
+ * \param _cursor an integer used as cursor
+ * \param _data
  *
- * <programlisting>
- * xbt_dynar_t *dyn;
- * int cpt;
- * string *str;
- * xbt_dynar_foreach (dyn,cpt,str) {
- *   printf("Seen %s\n",str);
- * }</programlisting>
+ * Iterates over the whole dynar. 
+ * \note An example of usage:
+ * \code
+xbt_dynar_t dyn;
+int cpt;
+string *str;
+xbt_dynar_foreach (dyn,cpt,str) {
+  printf("Seen %s\n",str);
+}
+\endcode
  */
 #define xbt_dynar_foreach(_dynar,_cursor,_data) \
        for (xbt_dynar_cursor_first(_dynar,&(_cursor))      ; \
@@ -98,5 +100,5 @@ int  xbt_dynar_cursor_get   (const xbt_dynar_t dynar, int *cursor, void *whereto
 void xbt_dynar_cursor_rm(xbt_dynar_t dynar,
                          int          *const cursor);
 
-END_DECL
+END_DECL()
 #endif /* _XBT_DYNAR_H */