X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/65beede857f93e33c96e544f76b93793c973dc10..10675785aab38470f386150c08e4c3ab8fcc8a71:/include/xbt/config.h diff --git a/include/xbt/config.h b/include/xbt/config.h index e7c566ac87..7d35d6722c 100644 --- a/include/xbt/config.h +++ b/include/xbt/config.h @@ -1,7 +1,7 @@ /* config - Dictionary where the type of each cell is provided. */ /* This is useful to build named structs, like option or property sets. */ -/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2021. 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. */ @@ -56,36 +56,20 @@ /** @brief Configuration set's data type is opaque. */ #ifdef __cplusplus #include -typedef simgrid::config::Config* xbt_cfg_t; +using xbt_cfg_t = simgrid::config::Config*; #else typedef void* xbt_cfg_t; #endif -SG_BEGIN_DECL() +SG_BEGIN_DECL /* Set the value of the cell @a name in @a cfg with the provided value.*/ -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value") XBT_PUBLIC - void xbt_cfg_set_int(const char* name, int val); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value") XBT_PUBLIC - void xbt_cfg_set_double(const char* name, double val); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value") XBT_PUBLIC - void xbt_cfg_set_boolean(const char* name, const char* val); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::set_value") XBT_PUBLIC - void xbt_cfg_set_string(const char* name, const char* val); - +XBT_PUBLIC void sg_cfg_set_int(const char* name, int val); +XBT_PUBLIC void sg_cfg_set_double(const char* name, double val); +XBT_PUBLIC void sg_cfg_set_boolean(const char* name, const char* val); +XBT_PUBLIC void sg_cfg_set_string(const char* name, const char* val); /* @} */ -/** @defgroup XBT_cfg_decl Configuration type declaration and memory management - * @ingroup XBT_config - * - * @{ - */ - -/** @brief Callback types. They get the name of the modified entry, and the position of the changed value */ -typedef void (*xbt_cfg_cb_t)(const char* name); - -/** @} */ - /** @defgroup XBT_cfg_get Getting the stored values * @ingroup XBT_config * @@ -99,14 +83,10 @@ typedef void (*xbt_cfg_cb_t)(const char* name); * @{ */ -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::get_value") XBT_PUBLIC - int xbt_cfg_get_int(const char* name); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::get_value") XBT_PUBLIC - double xbt_cfg_get_double(const char* name); -XBT_ATTRIB_DEPRECATED_v325("Please use simgrid::config::get_value") XBT_PUBLIC - int xbt_cfg_get_boolean(const char* name); - +XBT_PUBLIC int sg_cfg_get_int(const char* name); +XBT_PUBLIC double sg_cfg_get_double(const char* name); +XBT_PUBLIC int sg_cfg_get_boolean(const char* name); /** @} */ -SG_END_DECL() +SG_END_DECL #endif /* XBT_CONFIG_H */