Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this comment was seriously outdated
[simgrid.git] / include / xbt / dict.h
index 4f2a88c..0c0ec92 100644 (file)
@@ -1,12 +1,11 @@
 /* xbt/dict.h -- api to a generic dictionary                                */
 
-/* Copyright (c) 2004-2013. The SimGrid Team.
+/* Copyright (c) 2004-2014. The SimGrid Team.
  * 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. */
 
-
 #ifndef _XBT_DICT_H
 #define _XBT_DICT_H
 
@@ -77,6 +76,7 @@ XBT_PUBLIC(void) xbt_dict_set(xbt_dict_t dict, const char *key, void *data,
 XBT_PUBLIC(void *) xbt_dict_get(xbt_dict_t dict, const char *key);
 XBT_PUBLIC(void *) xbt_dict_get_or_null(xbt_dict_t dict, const char *key);
 XBT_PUBLIC(char *) xbt_dict_get_key(xbt_dict_t dict, const void *data);
+XBT_PUBLIC(char *) xbt_dict_get_elm_key(xbt_dictelm_t elem);
 XBT_PUBLIC(xbt_dictelm_t) xbt_dict_get_elm(xbt_dict_t dict, const char *key);
 XBT_PUBLIC(xbt_dictelm_t) xbt_dict_get_elm_or_null(xbt_dict_t dict, const char *key);
 
@@ -114,6 +114,12 @@ XBT_PUBLIC(uintptr_t) xbt_dicti_get(xbt_dict_t dict, uintptr_t key);
 XBT_PUBLIC(void) xbt_dicti_remove(xbt_dict_t dict, uintptr_t key);
 #endif
 
+struct s_xbt_dict_cursor {
+  xbt_dictelm_t current;
+  int line;
+  xbt_dict_t dict;
+};
+
 /** @} */
 /** @defgroup XBT_dict_curs Cursors on dictionaries
  *  @ingroup XBT_dict
@@ -137,11 +143,6 @@ XBT_PUBLIC(void) xbt_dicti_remove(xbt_dict_t dict, uintptr_t key);
  *  @{ */
 
   /** @brief Cursor on dictionaries (opaque type) */
-struct s_xbt_dict_cursor {
-  xbt_dictelm_t current;
-  int line;
-  xbt_dict_t dict;
-};
 typedef struct s_xbt_dict_cursor *xbt_dict_cursor_t;
 
 static inline xbt_dictelm_t xbt_dict_cursor_get_elm(xbt_dict_cursor_t cursor) {