Skip to content

Commit

Permalink
Fixes for Doxygen comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
eao197 committed Nov 9, 2023
1 parent c9fea19 commit b426c99
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 29 deletions.
16 changes: 8 additions & 8 deletions dev/restinio/async_chain/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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.
*
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down
20 changes: 11 additions & 9 deletions dev/restinio/async_chain/fixed_size.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 >
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
26 changes: 14 additions & 12 deletions dev/restinio/async_chain/growable_size.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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{};

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -314,7 +316,7 @@ class growable_size_chain_t
};

private:
//! The vector of request handlers.
//! The vector of schedulers.
schedulers_vector_t m_schedulers;

/*!
Expand All @@ -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.
Expand Down

0 comments on commit b426c99

Please sign in to comment.