From b426c99096644fc824883d01850ae3dc50e746ba Mon Sep 17 00:00:00 2001 From: Yauheni Akhotnikau Date: Thu, 9 Nov 2023 15:24:35 +0300 Subject: [PATCH] Fixes for Doxygen comments. --- dev/restinio/async_chain/common.hpp | 16 ++++++------- dev/restinio/async_chain/fixed_size.hpp | 20 +++++++++-------- dev/restinio/async_chain/growable_size.hpp | 26 ++++++++++++---------- 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/dev/restinio/async_chain/common.hpp b/dev/restinio/async_chain/common.hpp index a9007260..915eda9b 100644 --- a/dev/restinio/async_chain/common.hpp +++ b/dev/restinio/async_chain/common.hpp @@ -97,7 +97,7 @@ using generic_async_request_scheduler_t = /*! * @brief Special type to be used as an indicator that there are no more - * handlers in an async chain. + * schedulers in an async chain. * * This type will be used in on_next_result_t variant. * @@ -109,7 +109,7 @@ struct no_more_schedulers_t {}; * @brief Special type to be used as result of async_handling_controller's * on_next method. * - * The async_handling_controller_t::on_next may return an actual handler to + * The async_handling_controller_t::on_next may return an actual scheduler to * be called or (if there are no more handlers left) a special no_more_handler * value. This is described by on_next_result_t variant type. * @@ -165,7 +165,7 @@ class async_handling_controller_t virtual ~async_handling_controller_t() = default; /*! - * @brief Get reference to source request. + * @brief Get reference to the source request. * * Usage example: * @code @@ -188,11 +188,11 @@ class async_handling_controller_t private: /*! - * @brief Command to try find a next async handler to be invoked. + * @brief Command to try find a next scheduler to be invoked. * * Implementation of async_handling_controller_t should switch to the - * next handler in the chain and return the handler to be called next. - * If there are no such handlers, no_more_schedulers_t must be returned. + * next scheduler in the chain and return the scheduler to be called next. + * If there are no such schedulers, no_more_schedulers_t must be returned. * * @note * This method is intended to be called by next() function. @@ -208,7 +208,7 @@ namespace impl /*! * @brief Helper to make a negative response with "Not Implemented" status. * - * This helper will be used if there is no more handlers to call, but + * This helper will be used if there is no more schedulers to call, but * the request is still not handled. * * @tparam Request_Handle Type of request handle that holds the source request. @@ -225,7 +225,7 @@ make_not_implemented_response( const Request_Handle & req ) /*! * @brief Helper to make a negative response with "Internal Server Error" status. * - * This helper will be used if the current async handler returns + * This helper will be used if the current scheduler returns * schedule_result_t::failure. * * @tparam Request_Handle Type of request handle that holds the source request. diff --git a/dev/restinio/async_chain/fixed_size.hpp b/dev/restinio/async_chain/fixed_size.hpp index 0c835515..d6ba5856 100644 --- a/dev/restinio/async_chain/fixed_size.hpp +++ b/dev/restinio/async_chain/fixed_size.hpp @@ -17,12 +17,13 @@ namespace restinio::async_chain * @brief A holder of fixed-size chain of asynchronous handlers. * * @note - * An instance of that type is intended to be filled with actual handlers - * at the creation time. After that new handlers can't be added to the chain, + * An instance of that type is intended to be filled with actual schedulers + * at the creation time. After that new schedulers can't be added to the chain, * and old handlers can't be removed from the chain. * * Usage example for the case when there is no extra-data in a request object - * (please note that this is simplified example without actual asynchronous code): + * (please note that this is simplified example without actual asynchronous code, + * all schedulers work as synchronous handlers): * @code * struct my_traits : public restinio::default_traits_t { * using request_handler_t = restinio::async_chain::fixed_size_chain_t<3>; @@ -90,7 +91,8 @@ namespace restinio::async_chain * * Usage example for the case when some extra-data is incorporated into * a request object - * (please note that this is simplified example without actual asynchronous code): + * (please note that this is simplified example without actual asynchronous code, + * all schedulers work as synchronous handlers): * @code * struct my_extra_data_factory { * // A data formed by checker of HTTP-fields. @@ -164,7 +166,7 @@ namespace restinio::async_chain * ); * @endcode * - * @tparam Size The exact number of handlers in the chain. + * @tparam Size The exact number of schedulers in the chain. * * @tparam Extra_Data_Factory The type of extra-data-factory specified in * the server's traits. @@ -197,7 +199,7 @@ class fixed_size_chain_t * @brief Actual implementation of the controller interface. * * @note - * Object of this type holds a copy of the source array of handlers. + * Object of this type holds a copy of the source array of schedulers. */ class actual_controller_t final : public async_handling_controller_t< Extra_Data_Factory > @@ -206,7 +208,7 @@ class fixed_size_chain_t const actual_request_handle_t m_request; //! Request handlers. schedulers_array_t m_schedulers; - //! Index of the current handler to be used. + //! Index of the current scheduler to be used. /*! * @note * May be equal to or greater than m_schedulers.size() in the case @@ -246,7 +248,7 @@ class fixed_size_chain_t } }; - //! The array of request handlers. + //! The array of schedulers. /*! * @note * It's initialized in the constructor and then never changed. @@ -298,7 +300,7 @@ class fixed_size_chain_t } /*! - * Initiates execution of the first request handler in the chain. + * Initiates execution of the first scheduler in the chain. * * @note * Always returns request_handling_status_t::accepted. diff --git a/dev/restinio/async_chain/growable_size.hpp b/dev/restinio/async_chain/growable_size.hpp index 11e04b07..0530afde 100644 --- a/dev/restinio/async_chain/growable_size.hpp +++ b/dev/restinio/async_chain/growable_size.hpp @@ -25,14 +25,15 @@ namespace restinio::async_chain * @brief A holder of variable-size chain of asynchronous handlers. * * @note - * Once a list of handler is filled and an instance of growable_size_chain_t - * is created that instance can't be changed: a new handler can't be added, and - * an old handler can be removed. The creation of growable_size_chain_t + * Once a list of schedulers is filled and an instance of growable_size_chain_t + * is created that instance can't be changed: a new scheduler can't be added, and + * an old scheduler can be removed. The creation of growable_size_chain_t * instance is performed by the help of growable_size_chain_t::builder_t * class. * * Usage example for the case when there is no extra-data in a request object - * (please note that this is simplified example without actual asynchronous code): + * (please note that this is simplified example without actual asynchronous code, + * all schedulers work as synchronous handlers): * @code * struct my_traits : public restinio::default_traits_t { * using request_handler_t = restinio::async_chain::growable_size_chain_t; @@ -90,7 +91,8 @@ namespace restinio::async_chain * * Usage example for the case when some extra-data is incorporated into * a request object: - * (please note that this is simplified example without actual asynchronous code): + * (please note that this is simplified example without actual asynchronous code, + * all schedulers work as synchronous handlers): * @code * struct my_extra_data_factory { * // A data formed by checker of HTTP-fields. @@ -202,20 +204,20 @@ class growable_size_chain_t * @brief Actual implementation of the controller interface. * * @note - * Object of this type holds a copy of the source vector of handlers. + * Object of this type holds a copy of the source vector of schedulers. */ class actual_controller_t final : public async_handling_controller_t< Extra_Data_Factory > { //! The source request. const actual_request_handle_t m_request; - //! Request handlers. + //! Request schedulers. schedulers_vector_t m_schedulers; //! Index of the current scheduler to be used. /*! * @note * May be equal to or greater than m_schedulers.size() in the case - * when all handlers are already processed. + * when all schedulers are already processed. */ std::size_t m_current{}; @@ -261,7 +263,7 @@ class growable_size_chain_t * That instance can be obtained by release() method. * * @note - * New handlers can be added to the chain by add() method until + * New schedulers can be added to the chain by add() method until * release() is called. * * @attention @@ -278,7 +280,7 @@ class growable_size_chain_t {} /*! - * @brief Stop adding of new handlers and acquire the chain instance. + * @brief Stop adding of new schedulers and acquire the chain instance. * * @note * The builder object should not be used after the calling of @@ -314,7 +316,7 @@ class growable_size_chain_t }; private: - //! The vector of request handlers. + //! The vector of schedulers. schedulers_vector_t m_schedulers; /*! @@ -334,7 +336,7 @@ class growable_size_chain_t growable_size_chain_t() = delete; /*! - * Initiates execution of the first request handler in the chain. + * Initiates execution of the first scheduler in the chain. * * @note * Always returns request_handling_status_t::accepted.