X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1e2a4672dd102fb81d2c2ffe1a93c973758a96bd..40ee10e13b61bfb28374d96ade010a262b5abd44:/include/simgrid/kernel/ProfileBuilder.hpp?ds=sidebyside diff --git a/include/simgrid/kernel/ProfileBuilder.hpp b/include/simgrid/kernel/ProfileBuilder.hpp index 4643c5a678..8ec4f7ca8e 100644 --- a/include/simgrid/kernel/ProfileBuilder.hpp +++ b/include/simgrid/kernel/ProfileBuilder.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2023. 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. */ @@ -9,10 +9,7 @@ #include #include -namespace simgrid { -namespace kernel { -namespace profile { - +namespace simgrid::kernel::profile { /** @brief Modeling of the availability profile (due to an external load) or the churn * @@ -42,18 +39,17 @@ std::ostream& operator << (std::ostream& out, const DatedValue& dv); */ class XBT_PUBLIC ProfileBuilder { public: - /** @brief A function called to populate the set of timed-values of a profile. * - * When the profile is repeating, the callback is called only once upon Profile construction. + * When the profile is repeating, the callback is called only once upon Profile construction. * Then the timed values are repeated after a fixed repeat_delay. * - * When the profile is not repeating, the callback is called each time the profile data has been exhausted. - * More precisely, each time an FutureEvtSet reached the end of the vector of timed values of the profile. + * When the profile is not repeating, the callback is called each time the profile data has been exhausted. + * More precisely, each time an FutureEvtSet reached the end of the vector of timed values of the profile. * - * Note that the callback is only supposed to append values to the values vector, not modify or remove existing ones, + * Note that the callback is only supposed to append values to the values vector, not modify or remove existing ones, * because other FutureEvtSet may still need previous values. - * + * * @param values The vector of the profile values, where new data can be appended. * */ @@ -62,22 +58,20 @@ public: static Profile* from_file(const std::string& path); static Profile* from_string(const std::string& name, const std::string& input, double periodicity); - static Profile* from_void(); + static Profile* from_void(); /** Create a profile from a callback - * - * @param name: The *unique* name of the profile - * @param cb: A callback object/function to populate the profile - * @param repeat_delay: Ignored if strictly negative. Otherwise, profile is repeating and repeat_delay is inserted between two iterations. - * - * @return the newly created profile - */ + * + * @param name: The *unique* name of the profile + * @param cb: A callback object/function to populate the profile + * @param repeat_delay: Ignored if strictly negative. Otherwise, profile is repeating and repeat_delay is inserted + * between two iterations. + * + * @return the newly created profile + */ static Profile* from_callback(const std::string& name, const std::function& cb, double repeat_delay); - }; -} // namespace profile -} // namespace kernel -} // namespace simgrid +} // namespace simgrid::kernel::profile #endif /* SIMGRID_KERNEL_PROFILEBUILDER_HPP */