Here are the basic data containers that every C programmer rewrites one day.
You won't need to do so yourself, you lucky one, because we did it for you.
+ However, if you are programming in C++ you might want to use C++ containers
+ instead.
@{ */
/** @defgroup XBT_dynar Dynar: generic dynamic array */
* This section describes the API to a dictionary structure that associates as string to a void* key. It provides the
* same functionality than an hash table.
*
+ * If you are using C++, you might want to use `std::unordered_map` instead.
+ *
* Here is a little example of use:
\verbatim
sprintf(buff,"another good stuff");
xbt_dict_set(mydict,"my data", strdup(buff), free); // previous data gets erased (and freed) by second add
\endverbatim
- *
*/
/** @defgroup XBT_dict_cons Dict constructor and destructor
* \ref XBT_dict section). You thus have to provide the function which will be used to free the content at
* structure creation (of type void_f_ppvoid_t or void_f_pvoid_t).
*
+ * If you are using C++, you might want to use `std::vector` instead.
+ *
* \section XBT_dynar_exscal Example with scalar
* \dontinclude dynar.cpp
*
/** @addtogroup XBT_fifo
* @brief This section describes the API to generic workqueue.
*
- * These functions provide the same kind of functionality as dynamic arrays but in time O(1).
- * However these functions use malloc/free way too much often.
+ * These functions provide the same kind of functionality as dynamic arrays
+ * but in time O(1). However these functions use malloc/free way too much often.
+ *
+ * If you are using C++, you might want to used std::list, std::deque or
+ * std::queue instead.
*/
+
/** @defgroup XBT_fifo_cons Fifo constructor and destructor
* @ingroup XBT_fifo
*
/** @addtogroup XBT_heap
* @brief This section describes the API to generic heap with O(log(n)) access.
*
+ * If you are using C++ you might want to use std::priority_queue instead.
+ *
* @{
*/
/* @brief heap datatype */
* It is basically a fifo but with restrictions so that it can be used as a set. Any operation (add, remove, belongs)
* is O(1) and no call to malloc/free is done.
*
+ * If you are using C++, you might want to use boost::intrusive::set instead.
*/
/** @defgroup XBT_swag_type Swag types
@ingroup XBT_swag